diff mercurial/hg.py @ 576:da11baf5de7b

Handle unknown files better on update -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Handle unknown files better on update If we spot an unknown file that's identical to one that's in the update, we get the updated one so that it shows up in the dirstate properly. manifest hash: 988aca64f255df67c27d1c6f8694ea098e4ec159 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) iD8DBQFCxyFyywK+sNU5EO8RAjmiAKCTgINXMPB1CxHt0OgHYPucfjCS7QCcDpJJ VgKqZS54hTAWN3jL2yllUhI= =iPQD -----END PGP SIGNATURE-----
author mpm@selenic.com
date Sat, 02 Jul 2005 15:21:22 -0800
parents 7f5ce4bbdd7b
children e33c85d2812a
line wrap: on
line diff
--- a/mercurial/hg.py	Sat Jul 02 13:40:15 2005 -0800
+++ b/mercurial/hg.py	Sat Jul 02 15:21:22 2005 -0800
@@ -1092,9 +1092,12 @@
         # construct a working dir manifest
         mw = m1.copy()
         mfw = mf1.copy()
+        umap = dict.fromkeys(u)
+
         for f in a + c + u:
             mw[f] = ""
             mfw[f] = util.is_exec(self.wjoin(f), mfw.get(f, False))
+
         for f in d:
             if f in mw: del mw[f]
 
@@ -1106,6 +1109,7 @@
             if linear_path and f not in m2:
                 self.dirstate.forget((f,))
 
+        # Compare manifests
         for f, n in mw.iteritems():
             if f in m2:
                 s = 0
@@ -1140,6 +1144,9 @@
                         s = 1
                     else:
                         mark[f] = 1
+                elif f in umap:
+                    # this unknown file is the same as the checkout
+                    get[f] = m2[f]
 
                 if not s and mfw[f] != mf2[f]:
                     if force: