monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Monotone-devel] Perhaps strange request: partial per-file commit


From: Alvaro Herrera
Subject: Re: [Monotone-devel] Perhaps strange request: partial per-file commit
Date: Tue, 15 Jan 2008 13:02:04 -0300
User-agent: Mutt/1.5.17 (2007-11-01)

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 ...

-- 
Alvaro Herrera       Valdivia, Chile   ICBM: S 39º 48' 55.3", W 73º 15' 24.7"
Y dijo Dios: "Que sea Satanás, para que la gente no me culpe de todo a mí."
"Y que hayan abogados, para que la gente no culpe de todo a Satanás"




reply via email to

[Prev in Thread] Current Thread [Next in Thread]