diff CHANGELOG @ 3660:f018656ca3bf

amend: add a new flag `--patch` to `hg amend` This patch adds a new flag `--patch` to `hg amend` which pops up an editor with the patch of working directory parent which you can change, and when you exit the editor the patch with changes is applied to current working directory with old changeset being obsoleted in favour of new one created by the applied patch. If supplied filenames, only those filenames are present in the popped editor and rest files stay the same way in the commit as they were. The extension of the file which opens up in editor is '.diff', we cannot have it as '.patch' as there will be develwarns related to that. We need to change to patch core and undo some change to achieve this. The implementation does not use any core API rather it has picked chunks from API which are required. One main reason to not use core import API is that we have to change wdir parent before using patch.patch() which I will like to avoid to make sure we handle merge cases too. While writing this patch I have spend lot of time try to use internal API's to work for this but none of them served the purpose well. If I have time in future and work on similar problem again, I am going to write better high-level API's which uses patchstore to achieve this. A new test file test-amend-patch.t which contains a lot of testing of the feature.
author Pulkit Goyal <7895pulkit@gmail.com>
date Sun, 18 Mar 2018 23:48:06 +0530
parents b36e38e3a176
children a346b1641dfa
line wrap: on
line diff
--- a/CHANGELOG	Thu Apr 12 13:30:28 2018 +0800
+++ b/CHANGELOG	Sun Mar 18 23:48:06 2018 +0530
@@ -9,6 +9,7 @@
   * evolve: a new `--abort` flag which aborts an interrupted evolve
             resolving orphans
   * `hg evolve` now return 0 if there is nothing to evolve
+  * amend: a new `--patch` flag to make changes to wdir parent by editing patch
 
   * fixed some memory leak issue