[Top][All Lists]

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

Re: [Gnu-arch-users] Generating *context* diffs out of changesets

From: Aaron Bentley
Subject: Re: [Gnu-arch-users] Generating *context* diffs out of changesets
Date: Tue, 26 Jul 2005 09:09:34 -0400
User-agent: Debian Thunderbird 1.0.2 (X11/20050331)

Emilio Lopes wrote:

> Sometimes I choose to implement a feature in several independent steps.  A
> simple example:
>    - patch 40 implemented the first step
>    - patch 41 was an update from CVS
>    - patch 42 implement the second step of the new feature
> Now I want to send a single *context* diff (generated with 'diff -c')
> generated out of changesets 40 and 42, ignoring patch 41 of course.

I don't think that's a generally solvable problem if you require that
changes introduced by 41 not appear.  42 may depend on the changes
introduced by 41.

> How, if at all, can I accomplish this with tla?

One option is to take a CVS tree, replay patch-40 and patch-42 into it,
and do normal diff against a revlib or pristine tree

tla get address@hidden/project--cvs--0 workdir
tla replay -d workdir address@hidden/project--devel--0--patch-40
tla replay -d workdir address@hidden/project--devel--0--patch-42
diff ...

With baz, you could do one merge instead of two replays

baz apply-delta --diff3 address@hidden/project--devel--0--patch-40

and then do the diff.

It's a lot easier if you don't have patch-41 in the middle.  Then you
can just diff two revlib trees:

diff -r $(tla library-find address@hidden/project--devel--0--patch-40)
$(tla library-find address@hidden/project--devel--0--patch-42)

It's also easier if you use unified diffs instead of context diffs,
because the output of 'tla changes -diffs ' or 'tla delta --diffs' is a
valid patch.

Aaron Bentley
Director of Technology
Panometrics, Inc.

reply via email to

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