[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Copying parts of a repository, excluding revisions post-TAGNAME...
From: |
Greg A. Woods |
Subject: |
Re: Copying parts of a repository, excluding revisions post-TAGNAME... |
Date: |
Wed, 31 Dec 2003 16:17:19 -0500 (EST) |
[ On Wednesday, December 31, 2003 at 11:30:20 (-0800), Leander Hasty wrote: ]
> Subject: Copying parts of a repository, excluding revisions post-TAGNAME...
>
> However, we're not entitled to any of their source on this project past
> a certain release, which is tagged in their repository.
Are you proposing that they do this to a copy of their repository before
they provide you with that copy?
> Digging through "man 5 rcsfile" and "doc/RCSFILE", it seems like it
> would be possible to write a script to process each ,v file, determine
> the version associated with the TAGNAME, and then trim out any entries
> in the rcs file that have a version greater than this number.
It depends on how much they use branches but potentially doing what you
desire could be a lot simpler than messing with RCS file internals.
"man 1 rlog"
"man 1 rcs"
If there are no branches then it's trivial (well other than the minor
complication that there's no way to say "after" or "not" in the way
ranges are specified to RCS commands):
cd cvsroot-copy-dir
find . -type f -name '*,v' -print |
while read fn ; do
aftertagrev=$(rlog -N -r${TAGNAME} ${fn} | awk '
$1 == "revision" {
split($2, a, ".");
print a[1] "." ++a[2];
}')
rcs -o${aftertagrev}: ${fn}
done
--
Greg A. Woods
+1 416 218-0098 VE3TCP RoboHack <address@hidden>
Planix, Inc. <address@hidden> Secrets of the Weird <address@hidden>