Allow a -D'date' option to be included with a -r'branch'
on a checkout. this allows us to do: cd /usr/src/sys cvs update -rRELENGE_2_2 -D"Yesterday" which has been a feature sorely needed for any project with active branches. warning: this breaks on usr.sbin/pkg_install for some reason. everything else works as advertised. (other things allready break on pkg_install, so it's not the fault of this patch, it just falls faul of another bug somewhere) If I had more time I'd make -r always accept the same syntax as -j (tag:data)
This commit is contained in:
parent
43bdc1e901
commit
34bda5731d
|
@ -1857,9 +1857,9 @@ RCS_getdatebranch (rcs, date, branch)
|
||||||
free (xbranch);
|
free (xbranch);
|
||||||
if (p == vers->branches->list)
|
if (p == vers->branches->list)
|
||||||
{
|
{
|
||||||
/* FIXME: This case would seem to imply that the RCS file is
|
/* This happens when you have a couple of branches off a revision,
|
||||||
somehow invalid. Should we give an error message? */
|
and your branch has not diverged, but another has. */
|
||||||
return (NULL);
|
return (xstrdup (cur_rev));
|
||||||
}
|
}
|
||||||
|
|
||||||
p = findnode (rcs->versions, p->key);
|
p = findnode (rcs->versions, p->key);
|
||||||
|
|
|
@ -491,7 +491,7 @@ update_fileproc (callerdat, finfo)
|
||||||
&& tag != NULL
|
&& tag != NULL
|
||||||
&& finfo->rcs != NULL)
|
&& finfo->rcs != NULL)
|
||||||
{
|
{
|
||||||
char *rev = RCS_getversion (finfo->rcs, tag, NULL, 1, NULL);
|
char *rev = RCS_getversion (finfo->rcs, tag, date, 1, NULL);
|
||||||
if (rev != NULL
|
if (rev != NULL
|
||||||
&& !RCS_nodeisbranch (finfo->rcs, tag))
|
&& !RCS_nodeisbranch (finfo->rcs, tag))
|
||||||
nonbranch = 1;
|
nonbranch = 1;
|
||||||
|
|
Loading…
Reference in New Issue