Ralf S. Engelschall wrote:
On Tue, Jan 15, 2008, Thomas Moschny wrote:
On Tuesday 15 January 2008, Ralf S. Engelschall wrote:
So, it would be also nice
to have the "hunk restriction" feature for "mtn diff":
$ mtn diff file11:-2,-4
You can use filterdiff from the very useful patchutils[1]
collection for that:
mtn diff file11 | filterdiff -# 1,3,5-
would show hunks one, three and all hunks starting from the fifth.
Selecting hunks based on which lines they contain is also possible.
Ok, right, for "mtn diff" this works. But unfortunately, for the main
purpose, the partial per-file commit, it still doesn' help... :-(
Yeah, what I do is save the full diff somewhere, get the partial diff
with filterdiff, save it to a tmp file, revert all changes, apply the
partial diff, commit, apply the full diff back. Lather, rinse,
repeat.
It's truly cumbersome. It would be awesome to have an easier way
to do
it, something like
mtn diff | filterdiff -# 1,3,5 -x "*executor.c" | mtn commitdiff
where the "commitdiff" would get the diff and commit only that part.
Not sure this is the right API (in fact it still looks cumbersome),
but
implementing filterdiff inside monotone does not seem a truly
interesting prospect ...