Patchwork [3,of,4] copies: move variable document from checkcopies to mergecopies

login
register
mail settings
Submitter Pierre-Yves David
Date Oct. 16, 2016, 2:47 p.m.
Message ID <6f0dc570c4383ad42c57.1476629242@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/17129/
State Accepted
Headers show

Comments

Pierre-Yves David - Oct. 16, 2016, 2:47 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@ens-lyon.org>
# Date 1476314793 -7200
#      Thu Oct 13 01:26:33 2016 +0200
# Node ID 6f0dc570c4383ad42c572158af200d2142bbef4f
# Parent  823b3ea33d263ae3179cbbcf39e0ddfc7a938ce5
# EXP-Topic checkcopies
copies: move variable document from checkcopies to mergecopies

It appears that 'mergecopies' is the function consuming these data so we move
the documentation there.

Patch

diff --git a/mercurial/copies.py b/mercurial/copies.py
--- a/mercurial/copies.py
+++ b/mercurial/copies.py
@@ -331,7 +331,10 @@  def mergecopies(repo, c1, c2, ca):
     m2 = c2.manifest()
     ma = ca.manifest()
 
-    # see _checkcopies documentation below for these dicts
+    # gather data from _checkcopies:
+    # - diverge = record all diverges in this dict
+    # - copy = record all non-divergent copies in this dict
+    # - fullcopy = record all copies in this dict
     diverge = {} # divergence data is shared
     data1 = {'copy': {},
              'fullcopy': {},
@@ -507,10 +510,7 @@  def _checkcopies(ctx, f, m1, m2, base, l
     m2 = the destination manifest
     base = the changectx used as a merge base
     limit = the rev number to not search beyond
-    data = dictionary of dictionary to store copy data. The keys are:
-    - diverge = record all diverges in this dict
-    - copy = record all non-divergent copies in this dict
-    - fullcopy = record all copies in this dict
+    data = dictionary of dictionary to store copy data. (see mergecopies)
 
     note: limit is only an optimization, and there is no guarantee that
     irrelevant revisions will not be limited