merge: Fix bug where we overwrote local when local was newer
authormpm@selenic.com
Tue, 07 Jun 2005 19:00:56 -0800
changeset 273 4f8174389001
parent 272 467cea2bf2d8
child 274 5da941efbb52
merge: Fix bug where we overwrote local when local was newer -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 merge: Fix bug where we overwrote local when local was newer Spotted by Arun Sharma manifest hash: b81acb971c6471d95748cd349590cc70e448dce3 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) iD8DBQFCpl9oywK+sNU5EO8RAtseAJ92EEMovbVy0J1rFuxcGvED066m+ACfaWYF Q1/PcvkuH9aIqwMNkMK+aPU= =61JM -----END PGP SIGNATURE-----
mercurial/hg.py
--- a/mercurial/hg.py	Tue Jun 07 08:53:05 2005 -0800
+++ b/mercurial/hg.py	Tue Jun 07 19:00:56 2005 -0800
@@ -873,9 +873,10 @@
                 if n != m2[f]:
                     a = ma.get(f, nullid)
                     if n != a and m2[f] != a:
-                        self.ui.debug(" %s versions differ, do resolve\n" % f)
+                        self.ui.debug(" %s versions differ, resolve\n" % f)
                         merge[f] = (m1.get(f, nullid), m2[f])
-                    else:
+                    elif m2[f] != a:
+                        self.ui.debug(" remote %s is newer, get\n" % f)
                         get[f] = m2[f]
                 del m2[f]
             elif f in ma:
@@ -925,7 +926,7 @@
         files.sort()
         for f in files:
             if f[0] == "/": continue
-            self.ui.note(f, "\n")
+            self.ui.note("getting %s\n" % f)
             t = self.file(f).revision(get[f])
             try:
                 file(self.wjoin(f), "w").write(t)