changeset 3589:e4ac2e2c2086 stable 7.3.0

branching: merge future 7.3.0 into stable Release belong to stable
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Wed, 21 Mar 2018 16:03:46 +0100
parents 382ea8cd8b66 (diff) 2e7a9f6df411 (current diff)
children d5adce52cef4 3e638a94ff18
files
diffstat 7 files changed, 37 insertions(+), 34 deletions(-) [+]
line wrap: on
line diff
--- a/hgext3rd/evolve/__init__.py	Wed Mar 21 15:34:29 2018 +0100
+++ b/hgext3rd/evolve/__init__.py	Wed Mar 21 16:03:46 2018 +0100
@@ -960,10 +960,10 @@
 
 def _prevupdate(repo, displayer, target, bookmark, dryrun):
     if dryrun:
-        repo.ui.write(('hg update %s;\n' % target))
+        repo.ui.write(_('hg update %s;\n') % target)
         if bookmark is not None:
-            repo.ui.write(('hg bookmark %s -r %s;\n'
-                           % (bookmark, target)))
+            repo.ui.write(_('hg bookmark %s -r %s;\n')
+                          % (bookmark, target))
     else:
         ret = hg.update(repo, target.rev())
         if not ret:
@@ -1040,7 +1040,7 @@
         wkctx = repo[None]
         wparents = wkctx.parents()
         if len(wparents) != 1:
-            raise error.Abort('merge in progress')
+            raise error.Abort(_('merge in progress'))
         if not opts['merge']:
             try:
                 cmdutil.bailifchanged(repo)
@@ -1094,7 +1094,7 @@
         wkctx = repo[None]
         wparents = wkctx.parents()
         if len(wparents) != 1:
-            raise error.Abort('merge in progress')
+            raise error.Abort(_('merge in progress'))
         if not opts['merge']:
             try:
                 cmdutil.bailifchanged(repo)
@@ -1182,9 +1182,9 @@
     bm = repo._activebookmark
     shouldmove = opts.get('move_bookmark') and bm is not None
     if opts.get('dry_run'):
-        ui.write(('hg update %s;\n' % children))
+        ui.write(_('hg update %s;\n') % children)
         if shouldmove:
-            ui.write(('hg bookmark %s -r %s;\n' % (bm, children)))
+            ui.write(_('hg bookmark %s -r %s;\n') % (bm, children))
     else:
         ret = hg.update(repo, children)
         if not ret:
--- a/hgext3rd/evolve/evolvecmd.py	Wed Mar 21 15:34:29 2018 +0100
+++ b/hgext3rd/evolve/evolvecmd.py	Wed Mar 21 16:03:46 2018 +0100
@@ -14,6 +14,7 @@
 from mercurial import (
     bookmarks as bookmarksmod,
     cmdutil,
+    commands,
     context,
     copies,
     error,
@@ -45,7 +46,7 @@
 
 eh = exthelper.exthelper()
 _bookmarksupdater = rewriteutil.bookmarksupdater
-mergetoolopts = cmdutil.mergetoolopts
+mergetoolopts = commands.mergetoolopts
 
 def _solveone(ui, repo, ctx, evolvestate, dryrun, confirm,
               progresscb, category):
@@ -133,14 +134,14 @@
         roots = repo.revs('roots(%ld)', targetrevs)
         heads = repo.revs('heads(%ld)', targetrevs)
         if len(roots) > 1 or len(heads) > 1:
-            cheader = "ancestor '%s' split over multiple topological branches."\
-                      "\nchoose an evolve destination:" % orig
+            cheader = _("ancestor '%s' split over multiple topological"
+                        " branches.\nchoose an evolve destination:") % orig
             selectedrev = utility.revselectionprompt(ui, repo, list(heads),
                                                      cheader)
             if selectedrev is None:
-                msg = ("could not solve instability, "
-                       "ambiguous destination: "
-                       "parent split across two branches\n")
+                msg = _("could not solve instability, "
+                        "ambiguous destination: "
+                        "parent split across two branches\n")
                 ui.write_err(msg)
                 return (False, '')
             target = repo[selectedrev]
@@ -655,8 +656,8 @@
         newer = [n for n in newer if n and ctx.node() not in n]
         if newer:
             return base, tuple(ctx._repo[o] for o in newer[0])
-    raise error.Abort("base of divergent changeset %s not found" % ctx,
-                      hint='this case is not yet handled')
+    raise error.Abort(_("base of divergent changeset %s not found") % ctx,
+                      hint=_('this case is not yet handled'))
 
 def _aspiringdescendant(repo, revs):
     """Return a list of changectx which can be stabilized on top of pctx or
@@ -907,27 +908,28 @@
 
     if opts['continue']:
         if opts['any']:
-            raise error.Abort('cannot specify both "--any" and "--continue"')
+            raise error.Abort(_('cannot specify both "--any" and "--continue"'))
         if opts['all']:
-            raise error.Abort('cannot specify both "--all" and "--continue"')
+            raise error.Abort(_('cannot specify both "--all" and "--continue"'))
         if opts['rev']:
-            raise error.Abort('cannot specify both "--rev" and "--continue"')
+            raise error.Abort(_('cannot specify both "--rev" and "--continue"'))
         if opts['stop']:
-            raise error.Abort('cannot specify both "--stop" and "--continue"')
+            raise error.Abort(_('cannot specify both "--stop" and'
+                                ' "--continue"'))
 
     if opts['stop']:
         if opts['any']:
-            raise error.Abort('cannot specify both "--any" and "--stop"')
+            raise error.Abort(_('cannot specify both "--any" and "--stop"'))
         if opts['all']:
-            raise error.Abort('cannot specify both "--all" and "--stop"')
+            raise error.Abort(_('cannot specify both "--all" and "--stop"'))
         if opts['rev']:
-            raise error.Abort('cannot specify both "--rev" and "--stop"')
+            raise error.Abort(_('cannot specify both "--rev" and "--stop"'))
 
     if opts['rev']:
         if opts['any']:
-            raise error.Abort('cannot specify both "--rev" and "--any"')
+            raise error.Abort(_('cannot specify both "--rev" and "--any"'))
         if opts['all']:
-            raise error.Abort('cannot specify both "--rev" and "--all"')
+            raise error.Abort(_('cannot specify both "--rev" and "--all"'))
 
     # Backward compatibility
     if opts['unstable']:
@@ -1112,7 +1114,8 @@
         try:
             ctx = repo[utility._singlesuccessor(repo, repo['.'])]
         except utility.MultipleSuccessorsError as exc:
-            repo.ui.write_err('parent is obsolete with multiple successors:\n')
+            repo.ui.write_err(_('parent is obsolete with multiple'
+                                ' successors:\n'))
             for ln in exc.successorssets:
                 for n in ln:
                     displayer.show(repo[n])
@@ -1145,7 +1148,7 @@
     # Continuation handling
     if contopt:
         if not evolvestate:
-            raise error.Abort('no evolve to continue')
+            raise error.Abort(_('no interrupted evolve to continue'))
         evolvestate.load()
         continueevolve(ui, repo, evolvestate, progresscb)
         if evolvestate['command'] != 'evolve':
--- a/hgext3rd/evolve/utility.py	Wed Mar 21 15:34:29 2018 +0100
+++ b/hgext3rd/evolve/utility.py	Wed Mar 21 16:03:46 2018 +0100
@@ -155,12 +155,12 @@
     promptmsg = customheader + "\n"
     for idx, rev in enumerate(revs):
         curctx = repo[rev]
-        revmsg = "%d: [%s] %s\n" % (idx, curctx,
-                                    curctx.description().split("\n")[0])
+        revmsg = _("%d: [%s] %s\n" % (idx, curctx,
+                                      curctx.description().split("\n")[0]))
         promptmsg += revmsg
 
-    promptmsg += "q: quit the prompt\n"
-    promptmsg += "enter the index of the revision you want to select:"
+    promptmsg += _("q: quit the prompt\n")
+    promptmsg += _("enter the index of the revision you want to select:")
     idxselected = ui.prompt(promptmsg)
 
     intidx = None
--- a/tests/test-discovery-obshashrange.t	Wed Mar 21 15:34:29 2018 +0100
+++ b/tests/test-discovery-obshashrange.t	Wed Mar 21 16:03:46 2018 +0100
@@ -318,7 +318,7 @@
   * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> sending hello command (glob)
   * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> sending between command (glob)
   * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> remote: * (glob)
-  * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> remote: capabilities: _evoext_getbundle_obscommon _evoext_obshash_0 _evoext_obshash_1 _evoext_obshashrange_v1 batch branchmap bundle2=HG20%0Abookmarks%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Aobsmarkers%3DV0%2CV1%0Aphases%3Dheads%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps%0Arev-branch-cache changegroupsubset getbundle known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash (glob)
+  * marmoute @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> remote: capabilities: _evoext_getbundle_obscommon _evoext_obshash_0 _evoext_obshash_1 _evoext_obshashrange_v1 batch branchmap bundle2=HG20%0Abookmarks%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Aobsmarkers%3DV0%2CV1%0Aphases%3Dheads%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps changegroupsubset getbundle known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash (glob)
   * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> remote: 1 (glob)
   * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> preparing listkeys for "phases" (glob)
   * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> sending listkeys command (glob)
--- a/tests/test-evolve-topic.t	Wed Mar 21 15:34:29 2018 +0100
+++ b/tests/test-evolve-topic.t	Wed Mar 21 16:03:46 2018 +0100
@@ -335,7 +335,7 @@
   1 new orphan changesets
   rebasing 17:9bf430c106b7 "add jjj" (bar)
   1 new orphan changesets
-  $ hg log -Gr 12::
+  $ hg log -Gr 42b49017ff90::
   *  21 - {bar} 7542e76aba2c add jjj (draft)
   |
   *  20 - {bar} 7858bd7e9906 add iii (draft)
--- a/tests/test-topic-change.t	Wed Mar 21 15:34:29 2018 +0100
+++ b/tests/test-topic-change.t	Wed Mar 21 16:03:46 2018 +0100
@@ -98,7 +98,7 @@
      foo (8 changesets)
 Changing topics on some revisions (also testing issue 5441)
 
-  $ hg topic -r 12:: bar
+  $ hg topic -r abcedffeae90:: bar
   switching to topic bar
   changed topic on 4 changes
   $ hg glog
--- a/tests/test-wireproto.t	Wed Mar 21 15:34:29 2018 +0100
+++ b/tests/test-wireproto.t	Wed Mar 21 16:03:46 2018 +0100
@@ -195,7 +195,7 @@
   $ cat hg.pid >> $DAEMON_PIDS
 
   $ curl -s http://localhost:$HGPORT/?cmd=capabilities
-  _evoext_getbundle_obscommon batch branchmap bundle2=HG20%0Abookmarks%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Aobsmarkers%3DV0%2CV1%0Aphases%3Dheads%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps%0Arev-branch-cache changegroupsubset compression=*zlib getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash (no-eol) (glob)
+  _evoext_getbundle_obscommon batch branchmap bundle2=HG20%0Abookmarks%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Aobsmarkers%3DV0%2CV1%0Aphases%3Dheads%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps changegroupsubset compression=*zlib getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash (no-eol) (glob)
 
 Check we cannot use pushkey for marker exchange anymore