Files Vanish If Deleted Before Committing a Merge
Patrick Mézard
patrick at mezard.eu
Sat Apr 28 09:57:11 UTC 2012
Le 28/04/12 01:39, Jensen, Aaron a écrit :
> Windows 7 x64, Mercurial 2.1.1.
>
> We’ve noticed that during a merge, if I delete a file (i.e. using `rm
> file`) Mercurial removes that file from the repository. There is no
> record of the file’s removal.
>
> Add a file to the default branch. Merge that changeset into another
> branch. Delete the new file (i.e. `rm file`) from the file system.
> Commit the merge. The file is no longer in the branch’s manifest.
> The log command doesn’t show the file being deleted. However, when
> merging back to default, the file is removed and shows as removed by
> the log command. My transcript shows this and other strange behavior
> [1].
>
> I would expect Mercurial to abort the commit with a warning that a
> file is missing. Is the behavior I’m seeing by design?
Looks like a bug, either the missing file should be completely ignored as in the regular commit case, or the commit should abort. I would prefer the latter.
> I observe similar behavior when committing an added file that gets
> deleted [2].
I was surprised to see this, I was certain we were aborting in this case and even submitted a changelog describing how hg was different from svn in this area:
http://selenic.com/hg/rev/3d5d204a08c7
Too bad, but I do not see this changing anytime soon.
--
Patrick Mézard
More information about the Mercurial
mailing list