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

Laurent Charignon lcharignon at fb.com
Wed Mar 25 23:12:04 UTC 2015


# HG changeset patch
# User Laurent Charignon <lcharignon at 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

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:


More information about the Mercurial-devel mailing list