D587: copytrace: add `hg help copytrace`

pulkit (Pulkit Goyal) phabricator at mercurial-scm.org
Sat Sep 2 14:16:03 EDT 2017


pulkit updated this revision to Diff 1583.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D587?vs=1519&id=1583

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

AFFECTED FILES
  contrib/wix/help.wxs
  mercurial/help.py
  mercurial/help/copytrace.txt
  tests/test-globalopts.t
  tests/test-help.t
  tests/test-hgweb-json.t

CHANGE DETAILS

diff --git a/tests/test-hgweb-json.t b/tests/test-hgweb-json.t
--- a/tests/test-hgweb-json.t
+++ b/tests/test-hgweb-json.t
@@ -1561,6 +1561,10 @@
         "topic": "config"
       },
       {
+        "summary": "Copytracing in Mercurial",
+        "topic": "copytrace"
+      },
+      {
         "summary": "Date Formats",
         "topic": "dates"
       },
diff --git a/tests/test-help.t b/tests/test-help.t
--- a/tests/test-help.t
+++ b/tests/test-help.t
@@ -105,6 +105,7 @@
    bundlespec    Bundle File Formats
    color         Colorizing Outputs
    config        Configuration Files
+   copytrace     Copytracing in Mercurial
    dates         Date Formats
    diffs         Diff Formats
    environment   Environment Variables
@@ -183,6 +184,7 @@
    bundlespec    Bundle File Formats
    color         Colorizing Outputs
    config        Configuration Files
+   copytrace     Copytracing in Mercurial
    dates         Date Formats
    diffs         Diff Formats
    environment   Environment Variables
@@ -860,6 +862,7 @@
    bundlespec    Bundle File Formats
    color         Colorizing Outputs
    config        Configuration Files
+   copytrace     Copytracing in Mercurial
    dates         Date Formats
    diffs         Diff Formats
    environment   Environment Variables
@@ -1975,6 +1978,13 @@
   Configuration Files
   </td></tr>
   <tr><td>
+  <a href="/help/copytrace">
+  copytrace
+  </a>
+  </td><td>
+  Copytracing in Mercurial
+  </td></tr>
+  <tr><td>
   <a href="/help/dates">
   dates
   </a>
diff --git a/tests/test-globalopts.t b/tests/test-globalopts.t
--- a/tests/test-globalopts.t
+++ b/tests/test-globalopts.t
@@ -343,6 +343,7 @@
    bundlespec    Bundle File Formats
    color         Colorizing Outputs
    config        Configuration Files
+   copytrace     Copytracing in Mercurial
    dates         Date Formats
    diffs         Diff Formats
    environment   Environment Variables
@@ -427,6 +428,7 @@
    bundlespec    Bundle File Formats
    color         Colorizing Outputs
    config        Configuration Files
+   copytrace     Copytracing in Mercurial
    dates         Date Formats
    diffs         Diff Formats
    environment   Environment Variables
diff --git a/mercurial/help/copytrace.txt b/mercurial/help/copytrace.txt
new file mode 100644
--- /dev/null
+++ b/mercurial/help/copytrace.txt
@@ -0,0 +1,33 @@
+Mercurial does not stores information about copies or moves if you don't use
+`hg move` or `hg copy`.
+
+Copytracing is tracing copies or moves which user did when performing commands
+like rebase, merge, unshelve etc. to merge files that were move/copied in one
+merge parent and modified in another. Let's take a quick example::
+
+  o       3   Current head
+  |
+  .
+  .   o   4   More modifications to a.txt
+  |  /
+  o /     2   Renamed a.txt to b.txt
+  |/
+  o       1   Modified a.txt
+  |
+  o       0   Added a.txt
+
+Let's say that now we want to rebase revision '4' with description "more
+modifictaions to a.txt" on revision '3' with description "current head".
+Mercurial tries that but wait, there is no 'a.txt' in the "current head" and it
+will show you the following annoying message:
+
+```
+other [source] changed a which local [dest] deleted
+use (c)hanged version, leave (d)eleted, or leave (u)nresolved?
+```
+
+Copytracing is disabled by default as the default copytracing method is slow.
+You can turn that on by setting the following::
+
+  [experimental]
+  disablecopytrace = False
diff --git a/mercurial/help.py b/mercurial/help.py
--- a/mercurial/help.py
+++ b/mercurial/help.py
@@ -216,6 +216,7 @@
     return ''.join(lines)
 
 helptable = sorted([
+    (['copytrace'], _("Copytracing in Mercurial"), loaddoc('copytrace')),
     (['bundlespec'], _("Bundle File Formats"), loaddoc('bundlespec')),
     (['color'], _("Colorizing Outputs"), loaddoc('color')),
     (["config", "hgrc"], _("Configuration Files"), loaddoc('config')),
diff --git a/contrib/wix/help.wxs b/contrib/wix/help.wxs
--- a/contrib/wix/help.wxs
+++ b/contrib/wix/help.wxs
@@ -18,6 +18,7 @@
           <File Name="bundlespec.txt" />
           <File Name="color.txt" />
           <File Name="config.txt" KeyPath="yes" />
+          <File Name="copytrace.txt" />
           <File Name="dates.txt" />
           <File Name="diffs.txt" />
           <File Name="environment.txt" />



To: pulkit, #hg-reviewers
Cc: mharbison72, mercurial-devel


More information about the Mercurial-devel mailing list