Patchwork [1,of,3] record: change return value of recording code

login
register
mail settings
Submitter Laurent Charignon
Date March 25, 2015, 11:12 p.m.
Message ID <9742d0246c2039885c1b.1427325124@dev919.prn2.facebook.com>
Download mbox | patch
Permalink /patch/8272/
State Accepted
Headers show

Comments

Laurent Charignon - March 25, 2015, 11:12 p.m.
# HG changeset patch
# User Laurent Charignon <lcharignon@fb.com>
# Date 1427323917 25200
#      Wed Mar 25 15:51:57 2015 -0700
# Node ID 9742d0246c2039885c1b17c7ab70df95b115e789
# Parent  5b85a5bc5bbb9d8365953609d98e4dce7110e9b0
record: change return value of recording code

It makes it easier to include interactive mode to more commands that
require to get a reference to the newly created node

Patch

diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -186,9 +186,7 @@ 
 
             # Make all of the pathnames absolute.
             newfiles = [repo.wjoin(nf) for nf in newfiles]
-            commitfunc(ui, repo, *newfiles, **opts)
-
-            return 0
+            return commitfunc(ui, repo, *newfiles, **opts)
         finally:
             # 5. finally restore backed-up files
             try: