comparison mercurial/debugcommands.py @ 46201:b986e3342827

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
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Mon, 07 Dec 2020 22:27:43 +0100
parents d6afa9c149c3
children 083438d6f403
comparison
equal deleted inserted replaced
46200:bd31462a86a2 46201:b986e3342827
3439 s.serve_forever() 3439 s.serve_forever()
3440 3440
3441 3441
3442 @command(b'debugsetparents', [], _(b'REV1 [REV2]')) 3442 @command(b'debugsetparents', [], _(b'REV1 [REV2]'))
3443 def debugsetparents(ui, repo, rev1, rev2=None): 3443 def debugsetparents(ui, repo, rev1, rev2=None):
3444 """manually set the parents of the current working directory 3444 """manually set the parents of the current working directory (DANGEROUS)
3445 3445
3446 This is useful for writing repository conversion tools, but should 3446 This command is not what you are looking for and should not be used. Using
3447 be used with care. For example, neither the working directory nor the 3447 this command will most certainly results in slight corruption of the file
3448 dirstate is updated, so file status may be incorrect after running this 3448 level histories withing your repository. DO NOT USE THIS COMMAND.
3449 command. 3449
3450 The command update the p1 and p2 field in the dirstate, and not touching
3451 anything else. This useful for writing repository conversion tools, but
3452 should be used with extreme care. For example, neither the working
3453 directory nor the dirstate is updated, so file status may be incorrect
3454 after running this command. Only used if you are one of the few people that
3455 deeply unstand both conversion tools and file level histories. If you are
3456 reading this help, you are not one of this people (most of them sailed west
3457 from Mithlond anyway.
3458
3459 So one last time DO NOT USE THIS COMMAND.
3450 3460
3451 Returns 0 on success. 3461 Returns 0 on success.
3452 """ 3462 """
3453 3463
3454 node1 = scmutil.revsingle(repo, rev1).node() 3464 node1 = scmutil.revsingle(repo, rev1).node()