version 1.87, 2006/04/29 05:31:28 |
version 1.88, 2006/05/05 01:29:59 |
|
|
|
|
/* |
/* |
* Checkout revision <rev> from RCSFILE <file>, writing it to the path <dst> |
* Checkout revision <rev> from RCSFILE <file>, writing it to the path <dst> |
* Currenly recognised <flags> are CO_LOCK, CO_UNLOCK and CO_REVDATE. |
* Currently recognised <flags> are CO_LOCK, CO_UNLOCK and CO_REVDATE. |
* |
* |
* Looks up revision based upon <lockname>, <author>, <state> and <date> |
* Looks up revision based upon <lockname>, <author>, <state> and <date> |
* |
* |
|
|
!(flags & CO_REVERT) && file->rf_ndelta != 0) |
!(flags & CO_REVERT) && file->rf_ndelta != 0) |
printf("revision %s", buf); |
printf("revision %s", buf); |
|
|
if (!(flags & QUIET) && (flags & CO_REVERT)) |
|
printf("done"); |
|
|
|
if (file->rf_ndelta != 0) { |
if (file->rf_ndelta != 0) { |
if ((bp = rcs_getrev(file, rev)) == NULL) { |
if ((bp = rcs_getrev(file, rev)) == NULL) { |
warnx("cannot find revision `%s'", buf); |
warnx("cannot find revision `%s'", buf); |
|
|
warnx("no revisions, so nothing can be %s", |
warnx("no revisions, so nothing can be %s", |
(flags & CO_LOCK) ? "locked" : "unlocked"); |
(flags & CO_LOCK) ? "locked" : "unlocked"); |
} else if (file->rf_ndelta != 0) { |
} else if (file->rf_ndelta != 0) { |
if (!(flags & QUIET) && !(flags & NEWFILE)) |
/* XXX - Not a good way to detect if a newline is needed. */ |
|
if (!(flags & QUIET) && !(flags & NEWFILE) && |
|
!(flags & CO_REVERT)) |
printf("\n"); |
printf("\n"); |
} |
} |
|
|