diff mercurial/filemerge.py @ 10944:6f1894d6a6b0 stable

filemerge: use working dir parent as ancestor for backward wdir merge I checked the tests, they were bogus in the first place
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Mon, 19 Apr 2010 20:41:53 +0200
parents 184cdb66263e
children 523330d567cf
line wrap: on
line diff
--- a/mercurial/filemerge.py	Mon Apr 19 20:30:31 2010 +0200
+++ b/mercurial/filemerge.py	Mon Apr 19 20:41:53 2010 +0200
@@ -135,6 +135,9 @@
     if not fco.cmp(fcd.data()): # files identical?
         return None
 
+    if fca == fco: # backwards, use working dir parent as ancestor
+        fca = fcd.parents()[0]
+
     ui = repo.ui
     fd = fcd.path()
     binary = isbin(fcd) or isbin(fco) or isbin(fca)