changeset 19236:39ea540dc154 stable

merge with i18n
author Matt Mackall <mpm@selenic.com>
date Thu, 23 May 2013 17:53:19 -0500
parents b592fd33233a (diff) ddfdccc9d5a4 (current diff)
children 1bef6f99a12d e078ea9b4ce4 6c072c2d09a7
files
diffstat 5 files changed, 23 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/blackbox.py	Tue May 21 19:36:23 2013 -0300
+++ b/hgext/blackbox.py	Thu May 23 17:53:19 2013 -0500
@@ -126,7 +126,8 @@
     if not repo.local():
         return
 
-    ui.setrepo(repo)
+    if util.safehasattr(ui, 'setrepo'):
+        ui.setrepo(repo)
 
 @command('^blackbox',
     [('l', 'limit', 10, _('the number of events to show')),
--- a/mercurial/commands.py	Tue May 21 19:36:23 2013 -0300
+++ b/mercurial/commands.py	Thu May 23 17:53:19 2013 -0500
@@ -1310,6 +1310,8 @@
     Returns 0 on success, 1 if nothing changed.
     """
     if opts.get('subrepos'):
+        if opts.get('amend'):
+            raise util.Abort(_('cannot amend with --subrepos'))
         # Let --subrepos on the command line override config setting.
         ui.setconfig('ui', 'commitsubrepos', True)
 
@@ -1322,7 +1324,7 @@
 
     if opts.get('amend'):
         if ui.configbool('ui', 'commitsubrepos'):
-            raise util.Abort(_('cannot amend recursively'))
+            raise util.Abort(_('cannot amend with ui.commitsubrepos enabled'))
 
         old = repo['.']
         if old.phase() == phases.public:
--- a/mercurial/dispatch.py	Tue May 21 19:36:23 2013 -0300
+++ b/mercurial/dispatch.py	Thu May 23 17:53:19 2013 -0500
@@ -62,7 +62,16 @@
             ferr.write(_("hg: parse error: %s\n") % inst.args[0])
         return -1
 
-    return _runcatch(req)
+    msg = ' '.join(' ' in a and repr(a) or a for a in req.args)
+    starttime = time.time()
+    ret = None
+    try:
+        ret = _runcatch(req)
+        return ret
+    finally:
+        duration = time.time() - starttime
+        req.ui.log("commandfinish", "%s exited %s after %0.2f seconds\n",
+                   msg, ret or 0, duration)
 
 def _runcatch(req):
     def catchterm(*args):
@@ -764,16 +773,10 @@
     msg = ' '.join(' ' in a and repr(a) or a for a in fullargs)
     ui.log("command", '%s\n', msg)
     d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
-    starttime = time.time()
-    ret = None
     try:
-        ret = runcommand(lui, repo, cmd, fullargs, ui, options, d,
-                         cmdpats, cmdoptions)
-        return ret
+        return runcommand(lui, repo, cmd, fullargs, ui, options, d,
+                          cmdpats, cmdoptions)
     finally:
-        duration = time.time() - starttime
-        ui.log("commandfinish", "%s exited %s after %0.2f seconds\n",
-               cmd, ret, duration)
         if repo and repo != req.repo:
             repo.close()
 
--- a/tests/test-blackbox.t	Tue May 21 19:36:23 2013 -0300
+++ b/tests/test-blackbox.t	Thu May 23 17:53:19 2013 -0500
@@ -26,7 +26,7 @@
   $ hg add a
   $ hg blackbox
   1970/01/01 00:00:00 bob> add a
-  1970/01/01 00:00:00 bob> add exited 0 after * seconds (glob)
+  1970/01/01 00:00:00 bob> add a exited 0 after * seconds (glob)
 
 incoming change tracking
 
@@ -58,7 +58,7 @@
   $ hg blackbox -l 3
   1970/01/01 00:00:00 bob> pull
   1970/01/01 00:00:00 bob> 1 incoming changes - new heads: d02f48003e62
-  1970/01/01 00:00:00 bob> pull exited None after * seconds (glob)
+  1970/01/01 00:00:00 bob> pull exited 0 after * seconds (glob)
 
 we must not cause a failure if we cannot write to the log
 
@@ -118,7 +118,7 @@
   $ hg blackbox -l 3
   1970/01/01 00:00:00 bob> strip tip
   1970/01/01 00:00:00 bob> saved backup bundle to $TESTTMP/blackboxtest2/.hg/strip-backup/*-backup.hg (glob)
-  1970/01/01 00:00:00 bob> strip exited 0 after * seconds (glob)
+  1970/01/01 00:00:00 bob> strip tip exited 0 after * seconds (glob)
 
 extension and python hooks - use the eol extension for a pythonhook
 
@@ -133,7 +133,7 @@
   1970/01/01 00:00:00 bob> update
   1970/01/01 00:00:00 bob> pythonhook-preupdate: hgext.eol.preupdate finished in * seconds (glob)
   1970/01/01 00:00:00 bob> exthook-update: echo hooked finished in * seconds (glob)
-  1970/01/01 00:00:00 bob> update exited False after * seconds (glob)
+  1970/01/01 00:00:00 bob> update exited 0 after * seconds (glob)
 
 log rotation
 
--- a/tests/test-progress.t	Tue May 21 19:36:23 2013 -0300
+++ b/tests/test-progress.t	Thu May 23 17:53:19 2013 -0500
@@ -167,7 +167,6 @@
 
   $ hg -y loop 8
   \r (no-eol) (esc)
-  loop [====>                                     ] 1/8 1m18s\r (no-eol) (esc)
   loop [=========>                                ] 2/8 1m07s\r (no-eol) (esc)
   loop [===============>                            ] 3/8 56s\r (no-eol) (esc)
   loop [=====================>                      ] 4/8 45s\r (no-eol) (esc)
@@ -204,7 +203,6 @@
 Time estimates should not fail when there's no end point:
   $ hg -y loop -- -4
   \r (no-eol) (esc)
-  loop [ <=>                                              ] 1\r (no-eol) (esc)
-  loop [  <=>                                             ] 2\r (no-eol) (esc)
-  loop [   <=>                                            ] 3\r (no-eol) (esc)
+  loop [ <=>                                              ] 2\r (no-eol) (esc)
+  loop [  <=>                                             ] 3\r (no-eol) (esc)
                                                               \r (no-eol) (esc)