Multiple working directories for a single repo
Matt Mackall
mpm at selenic.com
Tue Nov 20 20:14:41 UTC 2007
On Tue, Nov 20, 2007 at 09:21:42PM +0200, Lauri Alanko wrote:
> On Tue, Nov 20, 2007 at 09:54:52AM -0800, Doug Philips wrote:
> > On Tuesday, November 20, 2007, at 09:55AM, "Christian Boos" indited:
> > >OTOH, the essential role of "hg rollback", besides removing the last
> > >changeset, is to restore the /dirstate/, i.e. the preparatory steps for
> > >your commit.
> >
> > Ahhhh, I had missed that "little" detail. Or not so little after all. Thanks!
> >
> > So it seems that there are a few possibilities:
> > a) Don't have more than one working directory per repo.
> > b) Know what you are doing and manually make sure that your other working directories will be OK if you do a rollback in of them.
> > c) Have hg help out and warn/prevent rollback if other working directories would be affect (with a force override of course).
> > d) ???
>
> d) Remove rollback's revision-destruction functionality but retain the
> dirstate. That is already working directory -specific, so there is no
> problem with multiple working directories doing "restore the revision
> and dirstate that were in effect before the commit" -rollbacks. The
> bogus revision can be cleaned up later by some other means.
That's putting the cart before the horse. Rollback's -purpose- is to
undo transactions. The dirstate fiddling it does is completely
secondary. Making rollback "pretend" to undo a transaction by simply
restoring the old dirstate would be a disaster.
--
Mathematics is the supreme nostalgia of our time.
More information about the Mercurial
mailing list