mercurial/merge.py
changeset 16094 0776a6cababe
parent 16093 7e30f5f2285f
child 16095 3eab42088be4
equal deleted inserted replaced
16093:7e30f5f2285f 16094:0776a6cababe
   243                     act("prompt delete", "r", f)
   243                     act("prompt delete", "r", f)
   244                 else:
   244                 else:
   245                     act("prompt keep", "a", f)
   245                     act("prompt keep", "a", f)
   246             elif n[20:] == "a": # added, no remote
   246             elif n[20:] == "a": # added, no remote
   247                 act("remote deleted", "f", f)
   247                 act("remote deleted", "f", f)
   248             elif n[20:] != "u":
   248             else:
   249                 act("other deleted", "r", f)
   249                 act("other deleted", "r", f)
   250 
   250 
   251     for f, n in m2.iteritems():
   251     for f, n in m2.iteritems():
   252         if partial and not partial(f):
   252         if partial and not partial(f):
   253             continue
   253             continue
   263                     f2, f, f, fmerge(f2, f, f2), False)
   263                     f2, f, f, fmerge(f2, f, f2), False)
   264             else: # case 3,20 A/B/A
   264             else: # case 3,20 A/B/A
   265                 act("remote moved to " + f, "m",
   265                 act("remote moved to " + f, "m",
   266                     f2, f, f, fmerge(f2, f, f2), True)
   266                     f2, f, f, fmerge(f2, f, f2), True)
   267         elif f not in ma:
   267         elif f not in ma:
   268             act("remote created", "g", f, m2.flags(f))
   268             if (not overwrite
       
   269                 and _checkunknownfile(repo, p1, p2, f)):
       
   270                 rflags = fmerge(f, f, f)
       
   271                 act("remote differs from untracked local",
       
   272                     "m", f, f, f, rflags, False)
       
   273             else:
       
   274                 act("remote created", "g", f, m2.flags(f))
   269         elif n != ma[f]:
   275         elif n != ma[f]:
   270             if repo.ui.promptchoice(
   276             if repo.ui.promptchoice(
   271                 _("remote changed %s which local deleted\n"
   277                 _("remote changed %s which local deleted\n"
   272                   "use (c)hanged version or leave (d)eleted?") % f,
   278                   "use (c)hanged version or leave (d)eleted?") % f,
   273                 (_("&Changed"), _("&Deleted")), 0) == 0:
   279                 (_("&Changed"), _("&Deleted")), 0) == 0:
   557                 # Allow jumping branches if clean and specific rev given
   563                 # Allow jumping branches if clean and specific rev given
   558                 pa = p1
   564                 pa = p1
   559 
   565 
   560         ### calculate phase
   566         ### calculate phase
   561         action = []
   567         action = []
   562         wc.status(unknown=True) # prime cache
       
   563         folding = not util.checkcase(repo.path)
   568         folding = not util.checkcase(repo.path)
   564         if not force:
   569         if not force:
   565             _checkunknown(repo, wc, p2)
   570             _checkunknown(repo, wc, p2)
   566         if folding:
   571         if folding:
   567             _checkcollision(p2, branchmerge and p1)
   572             _checkcollision(p2, branchmerge and p1)