Commentary: "Why I Switched to Git From Mercurial"
Mike Meyer
mwm at mired.org
Tue May 18 22:59:33 UTC 2010
On Wed, 19 May 2010 00:40:45 +0200
Benoit Boissinot <bboissin at gmail.com> wrote:
> On Wed, May 19, 2010 at 12:18 AM, Mike Meyer <mwm at mired.org> wrote:
> > On May 18, 2010, at 8:08 AM, David Dyer-Bennet wrote:
> >> My experience of working in a good VCS is precisely that once I commit
> >> something, I can't lose it short of a server crash with data loss
> >
> > Just out of curiosity, is this what happened in the case quoted? There
> > weren't any details, but it sounded like the mq extension lost
> > data. Is that possible once the data is committed, or did some
> > uncommitted mq patch set get lost? The two would seem to be entirely
> > different cases to me.
>
> When a patch is not applied, it lives only in patch format in .hg/patches.
> If you then issue `hg qdel` is effectively deletes the patch from the
> folder, and removes it from the serie file. There are no backups
> unless you use --keep.
So this is *not* a case where hg lost something that was committed. So
it's not a problem that would cause someone to stop trusting hg, or
even stop using it in and of itself.
An extension for handling in-progress patch sets deletes the patch set
when asked to do so. Since the data wasn't being managed by hg (even
though it was being managed *with* hg), I don't see how that's a
problem with hg. If the patch set had been committed in another repo,
you could cause the loss by deleting the repo, but that's clearly not
a problem with hg. If the patch set had been committed to a branch,
you couldn't couldn't lose the data with regular hg commands, but
in-repo branches are a bit heavy for this kid of thing.
All three of these things are ways of dealing with hg not having
lightweight branches. If mq has problems, possibly a different
solution should be used. Personally, I've not found one I like as well
as just cloning the repo, but that's just me.
Really needing lightweight branches along with no suitable extension
(this making mq unsuitable) might cause someone to stop using hg. But
then claiming that hg loses data is simply fud.
<mike
--
Mike Meyer <mwm at mired.org> http://www.mired.org/consulting.html
Independent Network/Unix/Perforce consultant, email for more information.
O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
More information about the Mercurial
mailing list