D6235: copies: move comment about implementation of mergecopies() to end

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Sat Apr 13 02:33:59 EDT 2019


martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  When you start reading about mergecopies(), you want to know what it
  is, not that there are different implementations depending on config,
  so this patch moves that comment to the end.
  
  By the way, we don't seem to define what "copytracing" is. I'm just
  leaving it that way because I don't know what it is myself. It seems
  to be referred to only on mergecopies() (and not in pathcopies(), for
  example), so maybe "copytracing" is supposed to be exactly what
  mergecopies() does?

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D6235

AFFECTED FILES
  mercurial/copies.py

CHANGE DETAILS

diff --git a/mercurial/copies.py b/mercurial/copies.py
--- a/mercurial/copies.py
+++ b/mercurial/copies.py
@@ -425,8 +425,7 @@
 
 def mergecopies(repo, c1, c2, base):
     """
-    The function calling different copytracing algorithms on the basis of config
-    which find moves and copies between context c1 and c2 that are relevant for
+    Finds moves and copies between context c1 and c2 that are relevant for
     merging. 'base' will be used as the merge base.
 
     Copytracing is used in commands like rebase, merge, unshelve, etc to merge
@@ -467,6 +466,8 @@
     "dirmove" is a mapping of detected source dir -> destination dir renames.
     This is needed for handling changes to new files previously grafted into
     renamed directories.
+
+    This function calls different copytracing algorithms based on config.
     """
     # avoid silly behavior for update from empty dir
     if not c1 or not c2 or c1 == c2:



To: martinvonz, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list