mercurial/hg.py
changeset 296 a3d83bf86755
parent 292 09364bcebdf0
child 299 7c239fad0f27
equal deleted inserted replaced
295:38919e1c254d 296:a3d83bf86755
   906 
   906 
   907         for f, n in mw.iteritems():
   907         for f, n in mw.iteritems():
   908             if f in m2:
   908             if f in m2:
   909                 s = 0
   909                 s = 0
   910 
   910 
       
   911                 # are files different?
   911                 if n != m2[f]:
   912                 if n != m2[f]:
   912                     a = ma.get(f, nullid)
   913                     a = ma.get(f, nullid)
       
   914                     # are both different from the ancestor?
   913                     if n != a and m2[f] != a:
   915                     if n != a and m2[f] != a:
   914                         self.ui.debug(" %s versions differ, resolve\n" % f)
   916                         self.ui.debug(" %s versions differ, resolve\n" % f)
   915                         merge[f] = (m1.get(f, nullid), m2[f])
   917                         merge[f] = (m1.get(f, nullid), m2[f])
   916                         # merge executable bits
   918                         # merge executable bits
   917                         # "if we changed or they changed, change in merge"
   919                         # "if we changed or they changed, change in merge"
   918                         a, b, c = mfa.get(f, 0), mfw[f], mf2[f]
   920                         a, b, c = mfa.get(f, 0), mfw[f], mf2[f]
   919                         mode = ((a^b) | (a^c)) ^ a
   921                         mode = ((a^b) | (a^c)) ^ a
   920                         merge[f] = (m1.get(f, nullid), m2[f], mode)
   922                         merge[f] = (m1.get(f, nullid), m2[f], mode)
   921                         s = 1
   923                         s = 1
   922                     elif m2[f] != a:
   924                     # is this an unmodified file or are we clobbering?
       
   925                     elif mw[f] == m1[f] or force:
   923                         self.ui.debug(" remote %s is newer, get\n" % f)
   926                         self.ui.debug(" remote %s is newer, get\n" % f)
   924                         get[f] = m2[f]
   927                         get[f] = m2[f]
   925                         s = 1
   928                         s = 1
   926 
   929 
   927                 if not s and mfw[f] != mf2[f]:
   930                 if not s and mfw[f] != mf2[f]: