A tale of user-friendliness with "hg merge" and "hg rollback".
Rob Landley
rob at landley.net
Mon Oct 12 21:23:14 UTC 2009
On Monday 12 October 2009 15:32:00 Benoit Boissinot wrote:
> On Mon, Oct 12, 2009 at 10:06 PM, Rob Landley <rob at landley.net> wrote:
> > I've been maintaining a little project in mercurial for a few years now,
> > but I always had people send me patches instead of doing pulls and
> > dealing with branches.
> >
> > [snip]
> >
> > So now I just want to just get the repository back to a state where I
> > understood it, so I do an "hg rollback". Hoping this would not only kick
> > out this weird abstract uncommitted merge object, but maybe even remove
> > the one commit I'd pulled from Mark that was hiding all my recent work,
> > which was showing up as "tip".
> >
> > Except that doing this seems to have destroyed the entire repository.
> > After the rollback, the entire repository was... gone. "hg log -v"
> > listed nothing. "hg branches" listed nothing. Even giving it explicit
> > revision numbers well back in the history ("hg log -r 800") produced
> > _nothing_.
>
> Every revlog from the repo disappeared, the repo is basically empty now.
> Any other hint to help us understand what might have happened (FS, OS,
> etc.) ?
Ubuntu 9.04, 64-bit. But I think I've figured it out. My bash command history
for that window says:
hg clone http://landley.net/code/firmware
cd firmware
ls
hg rollback
hg log -v | less
Repository was gone at that point.
I'd forgotten I did this in a fresh checkout of the repository (in an attempt
to make that weird not-quite-there uncommitted merge commit go away). The
rollback didn't trim off the last commit in the repository, it apparently undid
the _clone_. (Which was not the behavior I expected, but I suppose makes
sense in retrospect.)
I still don't understand what an uncommitted merge commit _means_, or why such
a halfway state would exit. Nor why it tries so hard to involve the current
working store in pulling somebody else's repository. Or why it needs a merge
commit to fix up a one line change in an area I hadn't touched in ages.
But I think I at least understand why that repository suddenly evaporated now.
Rob
--
Latency is more important than throughput. It's that simple. - Linus Torvalds
More information about the Mercurial
mailing list