restart R when bootstrapping or restoring

This adds a restart flag to the restore function which defaults to !dry.run. It's a big ugly as internal uses of restore now need to remember to pass restart = FALSE but I couldn't clearly see another way to get this done. Let me know what you think.
Definitely seems plausible that we might want to, but I didn't understand
the uses cases well enough to plumb that right now.


On Tue, Jun 10, 2014 at 2:30 PM, Kevin Ushey <notifications@github.com>
wrote:

> In R/utils.R:
>
> > @@ -345,3 +345,14 @@ swap <- function(vec, from, to = NULL) {
> >    tmp[is.na(tmp)] <- vec[is.na(tmp)]
> >    return(tmp)
> >  }
> > +
> > +
> > +attemptRestart <- function() {
>
> Do we want to pass any arguments down to restart()? It might make sense
> down the line if we want to restart, then execute some code (it would help
> us avoid the dance with library.new, library.old)
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/rstudio/packrat/pull/73/files#r13610512>.
>