[Bug 5410] New: Add patch-editing support to `hg record`
bugzilla at mercurial-scm.org
bugzilla at mercurial-scm.org
Wed Nov 2 17:52:35 UTC 2016
https://bz.mercurial-scm.org/show_bug.cgi?id=5410
Bug ID: 5410
Summary: Add patch-editing support to `hg record`
Product: Mercurial
Version: unspecified
Hardware: PC
OS: Windows
Status: UNCONFIRMED
Severity: feature
Priority: wish
Component: record
Assignee: bugzilla at selenic.com
Reporter: scovich at gmail.com
CC: mercurial-devel at selenic.com
Created attachment 1939
--> https://bz.mercurial-scm.org/attachment.cgi?id=1939&action=edit
Augmented record.py targeting mercurial-2.8
One very nice feature of git is the ability to edit patches in place (with a
suitable patch-enlightened editor) and commit the result rather than the code
that was actually in the working directory. This makes it vastly easier to
disentangle multiple code changes into separate commits.
I am attaching two versions of the record extension that implement this
feature: the first targets mercurial-2.8 that I have been using for several
years now, and the second is a lightly tested update for mercurial-3.7 that
works around the disappearance of the `mercurial.hg.revert()` function.
The augmented extension is reasonably well documented, using `-p` to request
patch editing.
I know of two weaknesses that cause the commit to fail with an exception throw:
- file rename or copy operations
- some input diff contains a complaint about the lack of a newline
I have not attempted to address those weaknesses because they have not been
sufficiently annoying to be worth the trouble of figuring out.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Mercurial-devel
mailing list