changeset 5670:840e2b315c1f

Fix misleading error and prompts during update/merge (issue556)
author Thomas Arendsen Hein <thomas@intevation.de>
date Wed, 26 Dec 2007 22:47:16 +0100
parents a0eb8a418442
children b5605d88dc27 1ce185f3c640
files mercurial/merge.py tests/test-merge1.out
diffstat 2 files changed, 10 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/merge.py	Tue Dec 25 22:21:51 2007 +0100
+++ b/mercurial/merge.py	Wed Dec 26 22:47:16 2007 +0100
@@ -70,8 +70,9 @@
     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 @@
         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 @@
                 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))
--- a/tests/test-merge1.out	Tue Dec 25 22:21:51 2007 +0100
+++ b/tests/test-merge1.out	Wed Dec 26 22:47:16 2007 +0100
@@ -10,7 +10,7 @@
 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