marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  I am tired to see people shooting themself in the foot with this. So lets add
  more warning. At that point we should probably rename it or add extra
  confirmation flag. This is a debug command anyway we can break BC on it.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  mercurial/debugcommands.py
  tests/test-help.t

CHANGE DETAILS

diff --git a/tests/test-help.t b/tests/test-help.t
--- a/tests/test-help.t
+++ b/tests/test-help.t
@@ -1063,6 +1063,7 @@
    debugserve    run a server with advanced settings
    debugsetparents
                  manually set the parents of the current working directory
+                 (DANGEROUS)
    debugsidedata
                  dump the side data for a cl/manifest/file revision
    debugssl      test a secure connection to a server
diff --git a/mercurial/debugcommands.py b/mercurial/debugcommands.py
--- a/mercurial/debugcommands.py
+++ b/mercurial/debugcommands.py
@@ -3412,12 +3412,22 @@
 
 @command(b'debugsetparents', [], _(b'REV1 [REV2]'))
 def debugsetparents(ui, repo, rev1, rev2=None):
-    """manually set the parents of the current working directory
-
-    This is useful for writing repository conversion tools, but should
-    be used with care. For example, neither the working directory nor the
-    dirstate is updated, so file status may be incorrect after running this
-    command.
+    """manually set the parents of the current working directory (DANGEROUS)
+
+    This command is not what you are looking for and should not be used. Using
+    this command will most certainly results in slight corruption of the file
+    level histories withing your repository. DO NOT USE THIS COMMAND.
+
+    The command update the p1 and p2 field in the dirstate, and not touching
+    anything else. This useful for writing repository conversion tools, but
+    should be used with extreme care. For example, neither the working
+    directory nor the dirstate is updated, so file status may be incorrect
+    after running this command. Only used if you are one of the few people that
+    deeply unstand both conversion tools and file level histories. If you are
+    reading this help, you are not one of this people (most of them sailed west
+    from Mithlond anyway.
+
+    So one last time DO NOT USE THIS COMMAND.
 
     Returns 0 on success.
     """



To: marmoute, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to