Mercurial > evolve
view MANIFEST.in @ 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 | b3dbba6e34c9 |
children | 48b30ff742cb |
line wrap: on
line source
exclude contrib recursive-exclude contrib * exclude hgext3rd/evolve/hack recursive-exclude hgext3rd/evolve/hack * exclude hgext3rd/evolve/legacy.py exclude Makefile exclude tests/test-drop.t exclude tests/test-inhibit.t exclude tests/test-oldconvert.t exclude docs/tutorial/.netlify include COPYING include docs/figures/hgview-example.png include docs/makefile include docs/*.py include docs/README include docs/*.rst include docs/static/*.svg include docs/tutorials/*.t include hgext3rd/__init__.py include hgext3rd/evolve/*.py include hgext3rd/evolve/thirdparty/*.py include hgext3rd/topic/*.py include hgext3rd/topic/README include MANIFEST.in include README include CHANGELOG include setup.py include tests/*.py include tests/*.sh include tests/testlib/*.sh include tests/*.t recursive-include docs/tutorial *.rst recursive-include docs/tutorial *.css include docs/tutorial/standalone.html recursive-include docs/tutorial *.js recursive-include docs/tutorial *.md recursive-include docs/tutorial *.py recursive-include docs/tutorial *.sh recursive-include docs/tutorial *.t prune debian recursive-include docs/figures *.svg