Files Vanish If Deleted Before Committing a Merge

Patrick Mézard patrick at mezard.eu
Sat Apr 28 13:04:07 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?

Fix submitted here for the merge case:

  http://selenic.com/pipermail/mercurial-devel/2012-April/039570.html

--
Patrick Mézard



More information about the Mercurial mailing list