##// END OF EJS Templates
Fix misleading error and prompts during update/merge (issue556)
Thomas Arendsen Hein -
r5670:840e2b31 default
parent child Browse files
Show More
@@ -70,8 +70,9 b' def checkunknown(wctx, mctx):'
70 for f in wctx.unknown():
70 for f in wctx.unknown():
71 if f in man:
71 if f in man:
72 if mctx.filectx(f).cmp(wctx.filectx(f).data()):
72 if mctx.filectx(f).cmp(wctx.filectx(f).data()):
73 raise util.Abort(_("untracked local file '%s' differs"
73 raise util.Abort(_("untracked file in working directory differs"
74 " from remote version") % f)
74 " from file in requested revision: '%s'")
75 % f)
75
76
76 def checkcollision(mctx):
77 def checkcollision(mctx):
77 "check for case folding collisions in the destination context"
78 "check for case folding collisions in the destination context"
@@ -422,8 +423,9 b' def manifestmerge(repo, p1, p2, pa, over'
422 elif f in ma:
423 elif f in ma:
423 if n != ma[f] and not overwrite:
424 if n != ma[f] and not overwrite:
424 if repo.ui.prompt(
425 if repo.ui.prompt(
425 (_(" local changed %s which remote deleted\n") % f) +
426 _(" local changed %s which remote deleted\n"
426 _("(k)eep or (d)elete?"), _("[kd]"), _("k")) == _("d"):
427 "use (c)hanged version or (d)elete?") % f,
428 _("[cd]"), _("c")) == _("d"):
427 act("prompt delete", "r", f)
429 act("prompt delete", "r", f)
428 else:
430 else:
429 act("other deleted", "r", f)
431 act("other deleted", "r", f)
@@ -455,8 +457,9 b' def manifestmerge(repo, p1, p2, pa, over'
455 act("recreating", "g", f, m2.flags(f))
457 act("recreating", "g", f, m2.flags(f))
456 elif n != ma[f]:
458 elif n != ma[f]:
457 if repo.ui.prompt(
459 if repo.ui.prompt(
458 (_("remote changed %s which local deleted\n") % f) +
460 _("remote changed %s which local deleted\n"
459 _("(k)eep or (d)elete?"), _("[kd]"), _("k")) == _("k"):
461 "use (c)hanged version or leave (d)eleted?") % f,
462 _("[cd]"), _("c")) == _("c"):
460 act("prompt recreating", "g", f, m2.flags(f))
463 act("prompt recreating", "g", f, m2.flags(f))
461 else:
464 else:
462 act("remote created", "g", f, m2.flags(f))
465 act("remote created", "g", f, m2.flags(f))
@@ -10,7 +10,7 b' diff -r d9e5953b9dec b'
10 M b
10 M b
11 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
11 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
12 %% merge should fail
12 %% merge should fail
13 abort: untracked local file 'b' differs from remote version
13 abort: untracked file in working directory differs from file in requested revision: 'b'
14 %% merge of b expected
14 %% merge of b expected
15 merging for b
15 merging for b
16 merging b
16 merging b
General Comments 0
You need to be logged in to leave comments. Login now