rollback, i18n: avoid parameterized message stable
authorWagner Bruna <wbruna@softwareexpress.com.br>
Mon, 21 Feb 2011 20:58:54 -0300
branchstable
changeset 13455 053c042118bc
parent 13454 afc84a879ac8
child 13456 ab3f4ee48adc
rollback, i18n: avoid parameterized message
mercurial/localrepo.py
tests/test-newbranch.t
tests/test-rename-after-merge.t
--- a/mercurial/localrepo.py	Mon Feb 21 23:27:45 2011 +0100
+++ b/mercurial/localrepo.py	Mon Feb 21 20:58:54 2011 -0300
@@ -742,9 +742,13 @@
                 self.invalidate()
                 self.dirstate.invalidate()
                 self.destroyed()
-                self.ui.status(_("working directory now based on "
-                                 "revision %s\n") % (
-                    _(' and ').join(str(p.rev()) for p in self.parents())))
+                parents = tuple([p.rev() for p in self.parents()])
+                if len(parents) > 1:
+                    self.ui.status(_("working directory now based on "
+                                     "revisions %d and %d\n") % parents)
+                else:
+                    self.ui.status(_("working directory now based on "
+                                     "revision %d\n") % parents)
             else:
                 self.ui.warn(_("no rollback information available\n"))
                 return 1
--- a/tests/test-newbranch.t	Mon Feb 21 23:27:45 2011 +0100
+++ b/tests/test-newbranch.t	Mon Feb 21 20:58:54 2011 -0300
@@ -106,7 +106,7 @@
 
   $ hg rollback
   repository tip rolled back to revision 4 (undo commit)
-  working directory now based on revision 4 and 3
+  working directory now based on revisions 4 and 3
 
   $ cp $branchcache .hg/bc-invalid
 
--- a/tests/test-rename-after-merge.t	Mon Feb 21 23:27:45 2011 +0100
+++ b/tests/test-rename-after-merge.t	Mon Feb 21 20:58:54 2011 -0300
@@ -98,7 +98,7 @@
 
   $ hg rollback
   repository tip rolled back to revision 2 (undo commit)
-  working directory now based on revision 2 and 1
+  working directory now based on revisions 2 and 1
 
   $ hg up -C .
   2 files updated, 0 files merged, 2 files removed, 0 files unresolved