mercurial/hg.py
changeset 576 da11baf5de7b
parent 575 7f5ce4bbdd7b
child 578 e33c85d2812a
equal deleted inserted replaced
575:7f5ce4bbdd7b 576:da11baf5de7b
  1090         mark = {}
  1090         mark = {}
  1091 
  1091 
  1092         # construct a working dir manifest
  1092         # construct a working dir manifest
  1093         mw = m1.copy()
  1093         mw = m1.copy()
  1094         mfw = mf1.copy()
  1094         mfw = mf1.copy()
       
  1095         umap = dict.fromkeys(u)
       
  1096 
  1095         for f in a + c + u:
  1097         for f in a + c + u:
  1096             mw[f] = ""
  1098             mw[f] = ""
  1097             mfw[f] = util.is_exec(self.wjoin(f), mfw.get(f, False))
  1099             mfw[f] = util.is_exec(self.wjoin(f), mfw.get(f, False))
       
  1100 
  1098         for f in d:
  1101         for f in d:
  1099             if f in mw: del mw[f]
  1102             if f in mw: del mw[f]
  1100 
  1103 
  1101             # If we're jumping between revisions (as opposed to merging),
  1104             # If we're jumping between revisions (as opposed to merging),
  1102             # and if neither the working directory nor the target rev has
  1105             # and if neither the working directory nor the target rev has
  1104             # prevent the dirstate from listing the file when it is no
  1107             # prevent the dirstate from listing the file when it is no
  1105             # longer in the manifest.
  1108             # longer in the manifest.
  1106             if linear_path and f not in m2:
  1109             if linear_path and f not in m2:
  1107                 self.dirstate.forget((f,))
  1110                 self.dirstate.forget((f,))
  1108 
  1111 
       
  1112         # Compare manifests
  1109         for f, n in mw.iteritems():
  1113         for f, n in mw.iteritems():
  1110             if f in m2:
  1114             if f in m2:
  1111                 s = 0
  1115                 s = 0
  1112 
  1116 
  1113                 # is the wfile new since m1, and match m2?
  1117                 # is the wfile new since m1, and match m2?
  1138                         self.ui.debug(" remote %s is newer, get\n" % f)
  1142                         self.ui.debug(" remote %s is newer, get\n" % f)
  1139                         get[f] = m2[f]
  1143                         get[f] = m2[f]
  1140                         s = 1
  1144                         s = 1
  1141                     else:
  1145                     else:
  1142                         mark[f] = 1
  1146                         mark[f] = 1
       
  1147                 elif f in umap:
       
  1148                     # this unknown file is the same as the checkout
       
  1149                     get[f] = m2[f]
  1143 
  1150 
  1144                 if not s and mfw[f] != mf2[f]:
  1151                 if not s and mfw[f] != mf2[f]:
  1145                     if force:
  1152                     if force:
  1146                         self.ui.debug(" updating permissions for %s\n" % f)
  1153                         self.ui.debug(" updating permissions for %s\n" % f)
  1147                         util.set_exec(self.wjoin(f), mf2[f])
  1154                         util.set_exec(self.wjoin(f), mf2[f])