mercurial/localrepo.py
changeset 1597 96b47ef8f740
parent 1590 bae3f3f993d6
child 1615 83238c1db6de
equal deleted inserted replaced
1596:41366b7d6709 1597:96b47ef8f740
   398                 fp1, fp2 = nullid, nullid
   398                 fp1, fp2 = nullid, nullid
   399             else:
   399             else:
   400                 fp1 = m1.get(f, nullid)
   400                 fp1 = m1.get(f, nullid)
   401                 fp2 = m2.get(f, nullid)
   401                 fp2 = m2.get(f, nullid)
   402 
   402 
   403             # is the same revision on two branches of a merge?
       
   404             if fp2 == fp1:
       
   405                 fp2 = nullid
       
   406 
       
   407             if fp2 != nullid:
   403             if fp2 != nullid:
   408                 # is one parent an ancestor of the other?
   404                 # is one parent an ancestor of the other?
   409                 fpa = r.ancestor(fp1, fp2)
   405                 fpa = r.ancestor(fp1, fp2)
   410                 if fpa == fp1:
   406                 if fpa == fp1:
   411                     fp1, fp2 = fp2, nullid
   407                     fp1, fp2 = fp2, nullid
   412                 elif fpa == fp2:
   408                 elif fpa == fp2:
   413                     fp2 = nullid
   409                     fp2 = nullid
   414 
   410 
   415                 # is the file unmodified from the parent?
   411                 # is the file unmodified from the parent?
   416                 if not meta and t == r.read(fp1):
   412                 if not meta and t == r.read(fp1) and fp2 == nullid:
   417                     # record the proper existing parent in manifest
   413                     # record the proper existing parent in manifest
   418                     # no need to add a revision
   414                     # no need to add a revision
   419                     new[f] = fp1
   415                     new[f] = fp1
   420                     continue
   416                     continue
   421 
   417