# HG changeset patch # User Thomas Arendsen Hein # Date 2007-12-26 21:47:16 # Node ID 840e2b315c1fcd92ff4e2770fb822bf8a9127083 # Parent a0eb8a418442958b340f87dbae7e026555f88750 Fix misleading error and prompts during update/merge (issue556) diff --git a/mercurial/merge.py b/mercurial/merge.py --- a/mercurial/merge.py +++ b/mercurial/merge.py @@ -70,8 +70,9 @@ def checkunknown(wctx, mctx): for f in wctx.unknown(): if f in man: if mctx.filectx(f).cmp(wctx.filectx(f).data()): - raise util.Abort(_("untracked local file '%s' differs" - " from remote version") % f) + raise util.Abort(_("untracked file in working directory differs" + " from file in requested revision: '%s'") + % f) def checkcollision(mctx): "check for case folding collisions in the destination context" @@ -422,8 +423,9 @@ def manifestmerge(repo, p1, p2, pa, over elif f in ma: if n != ma[f] and not overwrite: if repo.ui.prompt( - (_(" local changed %s which remote deleted\n") % f) + - _("(k)eep or (d)elete?"), _("[kd]"), _("k")) == _("d"): + _(" local changed %s which remote deleted\n" + "use (c)hanged version or (d)elete?") % f, + _("[cd]"), _("c")) == _("d"): act("prompt delete", "r", f) else: act("other deleted", "r", f) @@ -455,8 +457,9 @@ def manifestmerge(repo, p1, p2, pa, over act("recreating", "g", f, m2.flags(f)) elif n != ma[f]: if repo.ui.prompt( - (_("remote changed %s which local deleted\n") % f) + - _("(k)eep or (d)elete?"), _("[kd]"), _("k")) == _("k"): + _("remote changed %s which local deleted\n" + "use (c)hanged version or leave (d)eleted?") % f, + _("[cd]"), _("c")) == _("c"): act("prompt recreating", "g", f, m2.flags(f)) else: act("remote created", "g", f, m2.flags(f)) diff --git a/tests/test-merge1.out b/tests/test-merge1.out --- a/tests/test-merge1.out +++ b/tests/test-merge1.out @@ -10,7 +10,7 @@ diff -r d9e5953b9dec b M b 0 files updated, 0 files merged, 1 files removed, 0 files unresolved %% merge should fail -abort: untracked local file 'b' differs from remote version +abort: untracked file in working directory differs from file in requested revision: 'b' %% merge of b expected merging for b merging b