Actions:
|
2020-10-12 02:37 AEST by Arthur Barrett - Derek Price describes a Patch to support diffing across dates within a branch. This allows commands such
as:
cvs -q rdiff -s -r"dabranch:2006/02/15 22:28" -r"dabranch:2006/02/17 00:28" MODULE
which are otherwise broken due only to command-line parsing erroneous restrictions. Thanks to Jonathan
Kamens who pointed out this bug in cvs originally here.
http://lists.gnu.org/archive/html/bug-cvs/2002-05/msg00487.html
diff -wru cvs-1.12.13/src/patch.c cvs-1.12.13-patched/src/patch.c
--- cvs-1.12.13/src/patch.c 2005-09-23 02:03:04.000000000 +0000
+++ cvs-1.12.13-patched/src/patch.c 2006-02-16 22:53:16.000000000 +0000
@@ -270,6 +270,7 @@
int which;
char *repository;
char *where;
+ char *cp;
TRACE ( TRACE_FUNCTION, "patch_proc ( %s, %s, %s, %d, %d, %s, %s )",
xwhere ? xwhere : "(null)",
@@ -292,7 +293,6 @@
/* if mfile isn't null, we need to set up to do only part of the module */
if (mfile != NULL)
{
- char *cp;
char *path;
/* if the portion of the module is a path, put the dir part on repos */
@@ -340,16 +340,30 @@
else
which = W_REPOS;
+
if (rev1 != NULL && !rev1_validated)
{
- tag_check_valid (rev1, argc - 1, argv + 1, local_specified, 0,
- repository, false);
+ //tag_check_valid (rev1, argc - 1, argv + 1, local_specified, 0, repository, false);
+ if ((cp = strchr(rev1, ':')) != NULL)
+ {
+ *cp++ = '\0';
+ date1 = Make_Date (cp);
+ if (! *rev1)
+ rev1 = NULL;
+ }
rev1_validated = 1;
}
+
if (rev2 != NULL && !rev2_validated)
{
- tag_check_valid (rev2, argc - 1, argv + 1, local_specified, 0,
- repository, false);
+ //tag_check_valid (rev2, argc - 1, argv + 1, local_specified, 0, repository, false);
+ if ((cp = strchr(rev2, ':')) != NULL)
+ {
+ *cp++ = '\0';
+ date2 = Make_Date (cp);
+ if (! *rev2)
+ rev2 = NULL;
+ }
rev2_validated = 1;
} |