mercurial/localrepo.py
changeset 20556 db0740a487ab
parent 20469 6b4c789d618d
child 20567 de8eb208b7d0
equal deleted inserted replaced
20555:4add43865a9b 20556:db0740a487ab
  1121                 fparent1, fparent2 = nullid, newfparent
  1121                 fparent1, fparent2 = nullid, newfparent
  1122             else:
  1122             else:
  1123                 self.ui.warn(_("warning: can't find ancestor for '%s' "
  1123                 self.ui.warn(_("warning: can't find ancestor for '%s' "
  1124                                "copied from '%s'!\n") % (fname, cfname))
  1124                                "copied from '%s'!\n") % (fname, cfname))
  1125 
  1125 
       
  1126         elif fparent1 == nullid:
       
  1127             fparent1, fparent2 = fparent2, nullid
  1126         elif fparent2 != nullid:
  1128         elif fparent2 != nullid:
  1127             # is one parent an ancestor of the other?
  1129             # is one parent an ancestor of the other?
  1128             fparentancestor = flog.ancestor(fparent1, fparent2)
  1130             fparentancestor = flog.ancestor(fparent1, fparent2)
  1129             if fparentancestor == fparent1:
  1131             if fparentancestor == fparent1:
  1130                 fparent1, fparent2 = fparent2, nullid
  1132                 fparent1, fparent2 = fparent2, nullid