merge with stable
authorMatt Mackall <mpm@selenic.com>
Tue, 21 Jun 2011 17:27:20 -0500
changeset 14714 8deebb577751
parent 14710 640bfe96ddcf (current diff)
parent 14713 88a53081fb21 (diff)
child 14724 b5c60df21b4b
merge with stable
--- a/mercurial/commands.py	Tue Jun 21 15:26:44 2011 -0500
+++ b/mercurial/commands.py	Tue Jun 21 17:27:20 2011 -0500
@@ -4182,7 +4182,7 @@
 
     if not pats and not opts.get('all'):
         raise util.Abort(_('no files or directories specified'),
-                         hint=_('use --all to revert all files'))
+                         hint=_('use --all to discard all changes'))
 
     ctx = scmutil.revsingle(repo, opts.get('rev'))
     node = ctx.node()
--- a/mercurial/dispatch.py	Tue Jun 21 15:26:44 2011 -0500
+++ b/mercurial/dispatch.py	Tue Jun 21 17:27:20 2011 -0500
@@ -654,7 +654,7 @@
         return runcommand(lui, repo, cmd, fullargs, ui, options, d,
                           cmdpats, cmdoptions)
     finally:
-        if repo:
+        if repo != req.repo:
             repo.close()
 
 def _runcommand(ui, options, cmd, cmdfunc):
--- a/mercurial/hook.py	Tue Jun 21 15:26:44 2011 -0500
+++ b/mercurial/hook.py	Tue Jun 21 17:27:20 2011 -0500
@@ -107,7 +107,7 @@
     if 'HG_URL' in env and env['HG_URL'].startswith('remote:http'):
         r = util.system(cmd, environ=env, cwd=cwd, out=ui)
     else:
-        r = util.system(cmd, environ=env, cwd=cwd)
+        r = util.system(cmd, environ=env, cwd=cwd, out=ui.fout)
     if r:
         desc, r = util.explainexit(r)
         if throw:
--- a/tests/test-confused-revert.t	Tue Jun 21 15:26:44 2011 -0500
+++ b/tests/test-confused-revert.t	Tue Jun 21 17:27:20 2011 -0500
@@ -60,7 +60,7 @@
 
   $ hg revert
   abort: no files or directories specified
-  (use --all to revert all files)
+  (use --all to discard all changes)
   [255]
 
 Revert should be ok now:
--- a/tests/test-revert.t	Tue Jun 21 15:26:44 2011 -0500
+++ b/tests/test-revert.t	Tue Jun 21 17:27:20 2011 -0500
@@ -186,7 +186,7 @@
 
   $ hg revert -rtip
   abort: no files or directories specified
-  (use --all to revert all files)
+  (use --all to discard all changes)
   [255]
 
 should succeed