I need to generate diffs between my previous patch and the current one. Unsuprisingly (as Alexander is on vacation), the previous patch was not applied.
When diffing against CVS, I usually just do "cvs diff -u". In this case, I have checked out a new tree from CVS, applied the old diff on that tree (so I have a tree that is the way CVS would look if my previous patch was applied). Now what?
I tried running "diff -u -r wine.ref wine". The problem is that this generated tons of diffs in files in the "CVS" directory. Don't ask me why there were differences there.
Any other ideas? I know other people have done this before...
Shachar
I tried running "diff -u -r wine.ref wine". The problem is that this generated tons of diffs in files in the "CVS" directory. Don't ask me why there were differences there.
This is the right way, you just have to tweak the arguments to diff or grep away some stuff (CVS for example).
Use -x or -X options combined with grep [-v]
-x PAT --exclude=PAT Exclude files that match PAT. -X FILE --exclude-from=FILE Exclude files that match any pattern in FILE
Johan Dahlin wrote:
I tried running "diff -u -r wine.ref wine". The problem is that this generated tons of diffs in files in the "CVS" directory. Don't ask me why there were differences there.
This is the right way, you just have to tweak the arguments to diff or grep away some stuff (CVS for example).
Use -x or -X options combined with grep [-v]
-x PAT --exclude=PAT Exclude files that match PAT. -X FILE --exclude-from=FILE Exclude files that match any pattern in FILE
Thanks! I must have misread the documentation. Programing at half past 1 AM is not as effective as it might be.
Shachar
On Thursday 29 May 2003 05:33 pm, Shachar Shemesh wrote:
Johan Dahlin wrote:
I tried running "diff -u -r wine.ref wine". The problem is that this generated tons of diffs in files in the "CVS" directory. Don't ask me why there were differences there.
This is the right way, you just have to tweak the arguments to diff or grep away some stuff (CVS for example).
Use -x or -X options combined with grep [-v]
-x PAT --exclude=PAT Exclude files that match PAT. -X FILE --exclude-from=FILE Exclude files that match any pattern in FILE
Thanks! I must have misread the documentation. Programing at half past 1 AM is not as effective as it might be.
Shachar
you can also try my winetreediff thingy. it is almost reliable, and attempts to diff only the sources -- you can build in-tree and it will magically ignore everything but the sources. Although occasionally one must add or delete things as the wine directory structure changes, the scripts are otherwise stable. You will have to change the hard-coded path to /home/greg/bin to wherever you put the files.
The best way to use it (expensive in disk space, but who cares?) is to make two copies of wine at least. Personally I keep three: a vanilla cvs, a "testing" tree, for which I don't have any particular policy, and a "devel" tree which is usually full of my latest work. All stuff is generated as -p0.
Let's say I want to generate a diff (diffB) relative to some other diff (diffA), relative to cvs: I just do:
# revert testing to vanilla state cd ~/src/wine/testing winetreediff ../vanilla | patch -p0 -R # patch it patch -p0 < ~/src/wine/patches/diffA # now generate a diff of the devel tree vs. testing cd ~/src/wine/devel winetreediff ../testing > ~/src/wine/patches/diffB
of course, doing it this way, you loose all the pretty CVS markups in your patches.