我正在寻找git提交的对应部分——在Mercurial中修改,即一种方法来修改我的工作副本链接到的提交。我只对最后一次提交感兴趣,而不是任意更早的提交。
修订程序的要求如下:
if possible, it should not require any extensions. It must not require non-default extensions, i.e. extensions which do not come with an official Mercurial installation. if the commit to amend is one head of my current branch, no new head should be created. If the commit is not head, a new head may be created. the procedure should be safe in a way that if for whatever reasons the amending fails, I want to have the same working copy and repository state restored as before the amending. With other words, if the amending itself can fail, there should be a fail-safe procedure to restore the working copy and repository state. I'm referring to "failures" which lie in the nature of the amend-procedure (like e.g. conflicts), not to file-system-related problems (like access restrictions, not being able to lock a file for writing, ...)
更新(1):
该过程必须是可自动化的,因此它可以由GUI客户端执行,而不需要任何用户交互。
更新(2):
工作目录中的文件不能被触摸(某些被修改的文件上可能存在文件系统锁)。这特别意味着,可能的方法在任何时候都不需要干净的工作目录。