Re: bk equivalent for "cvs diff -rHEAD -N -u"??
Rick Richardson <[email protected]> Thu, 14 Oct 2004 10:18:19 -0500
| Newsgroups | gmane.comp.version-control.bitkeeper.user |
|---|---|
| Message-ID | <[email protected]> |
On Thu, Oct 14, 2004 at 07:13:50AM -0700, Larry McVoy wrote:
> On Thu, Oct 14, 2004 at 08:59:14AM -0500, Rick Richardson wrote:
> >
> > I need to generate a recursive context diff patchset of all files I
> > have changed or added to my tree. The files are not committed yet,
> > and I do not want to commit them yet.
> >
> > Under CVS, this is as easy as:
> > cvs diff -rHEAD -N -u
> >
> > Under bitkeeper, the best I've been able to do so far is get a
> > patchset of the files I have modified. "bk diffs" doesn't allow the
> > "-N" diff option for new files.
>
> This is fixed in our internal tree, you can do a bk -xcr diffs -u and it
> does the right thing but that's not much help to you now. This will
> get the job done:
>
> #!/bin/sh
> cd `bk root`
> bk -r diffs -up
> bk gfiles -x | while read x
> do echo ==== New file $x ====
> diff -u /dev/null $x
> done
>
> You may want to fix up the headers on the new files, they won't patch -p1
> properly.
Hey thanks for the tip Larry. I ended up using this, which adds to
the patchset the files that have been bk new'ed, but does not add any
of the cruft files...
cd `bk root`
bk -r diffs -up
bk gfiles -p | while read x
do echo ==== New file $x ====
diff -u /dev/null $x |
sed -e 's@^--- @--- old@' -e 's@^[+][+][+] @+++ new/@'
done
N.B.:
$ bk help gfiles
No help for gfiles, check spelling.
$ bk version
BitKeeper version is bk-3.2.2c 20040630231915 for x86-glibc22-linux
Built by: [email protected] in /build/3.2.x-lm/src
Built on: Wed Jun 30 16:28:06 PDT 2004
Running on: Linux 2.4.20-31.9kexec
-Rick
--
Rick Richardson [email protected] http://home.mn.rr.com/richardsons/
Linux tools for geocaching http://geo.rkkda.com
Scientists will achieve human immortality by 2100. Do you want the
government (you) to pay for *me* to live forever? Think about *that* before
voting for government insurance programs. I could be around a long time.
_______________________________________________
Bitkeeper-users mailing list
[email protected]
http://bitmover.com/mailman/listinfo/bitkeeper-users
To unsubscribe from this list, go to the above URL, follow instruction at the bottom of the web page.