[PATCH STABLE] merge: document some internal return values

Greg Ward greg-hg at gerg.ca
Mon Dec 13 10:47:08 CST 2010


# HG changeset patch
# User Greg Ward <greg-hg at gerg.ca>
# Date 1292258791 18000
# Branch stable
# Node ID 250777443adcba4f423dd5f2e42970213968cbef
# Parent  a1a7da34e7c2bc55da0aac80aca5ecf483d42155
merge: document some internal return values.

diff --git a/mercurial/hg.py b/mercurial/hg.py
--- a/mercurial/hg.py
+++ b/mercurial/hg.py
@@ -398,7 +398,8 @@
     return stats[3] > 0
 
 def merge(repo, node, force=None, remind=True):
-    """branch merge with node, resolving changes"""
+    """Branch merge with node, resolving changes. Return true if any
+    unresolved conflicts."""
     stats = mergemod.update(repo, node, True, force, False)
     _showstats(repo, stats)
     if stats[3]:
diff --git a/mercurial/merge.py b/mercurial/merge.py
--- a/mercurial/merge.py
+++ b/mercurial/merge.py
@@ -255,6 +255,9 @@
     wctx is the working copy context
     mctx is the context to be merged into the working copy
     actx is the context of the common ancestor
+
+    Return a tuple of counts (updated, merged, removed, unresolved) that
+    describes how many files were affected by the update.
     """
 
     updated, merged, removed, unresolved = 0, 0, 0, 0
@@ -462,6 +465,8 @@
                  use 'hg update -C' to discard changes)
     3 = abort: uncommitted local changes
     4 = incompatible options (checked in commands.py)
+
+    Return the same tuple as applyupdates().
     """
 
     onode = node


More information about the Mercurial-devel mailing list