comparison 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
comparison
equal deleted inserted replaced
3659:1e9b535cd9be 3660:f018656ca3bf
7 * drop support for Mercurial 4.1 7 * drop support for Mercurial 4.1
8 * `--obsolete` and `--old-obsolete` flags for `hg graft` are dropped 8 * `--obsolete` and `--old-obsolete` flags for `hg graft` are dropped
9 * evolve: a new `--abort` flag which aborts an interrupted evolve 9 * evolve: a new `--abort` flag which aborts an interrupted evolve
10 resolving orphans 10 resolving orphans
11 * `hg evolve` now return 0 if there is nothing to evolve 11 * `hg evolve` now return 0 if there is nothing to evolve
12 * amend: a new `--patch` flag to make changes to wdir parent by editing patch
12 13
13 * fixed some memory leak issue 14 * fixed some memory leak issue
14 15
15 * templatekw: remove `obsfatedata` templatekw. Individuals fields are 16 * templatekw: remove `obsfatedata` templatekw. Individuals fields are
16 available in core as single template functions. 17 available in core as single template functions.