# HG changeset patch # User Pierre-Yves David # Date 1607376463 -3600 # Node ID b986e3342827e7b9419c5df2f67e4ebd96e35ccb # Parent bd31462a86a2f201dec9bc92cb79f606acdc235e debugsetparents: add various warning in the help message 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. Differential Revision: https://phab.mercurial-scm.org/D9534 diff -r bd31462a86a2 -r b986e3342827 mercurial/debugcommands.py --- a/mercurial/debugcommands.py Mon Dec 28 03:18:16 2020 +0100 +++ b/mercurial/debugcommands.py Mon Dec 07 22:27:43 2020 +0100 @@ -3441,12 +3441,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. """ diff -r bd31462a86a2 -r b986e3342827 tests/test-help.t --- a/tests/test-help.t Mon Dec 28 03:18:16 2020 +0100 +++ b/tests/test-help.t Mon Dec 07 22:27:43 2020 +0100 @@ -1068,6 +1068,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