bug-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: rdiff


From: Paul Edwards
Subject: Re: rdiff
Date: Sat, 24 May 2003 10:24:37 GMT

"Paul Edwards" <kerravon@nosppaam.w3.to> wrote in message 
news:U9oza.2156$iv4.24083@news-server.bigpond.net.au...
> Any ideas on where to fix it for the -r xxx -r yyy variation?

I think this will fix the premature assumption that because the
version numbers are different, the files must "obviously" be
different too, in both diff and rdiff.  I'll test it out later...

Diffs against cvs1-11-5

Index: patch.c
===================================================================
RCS file: /cvs/ccvs/src/patch.c,v
retrieving revision 1.80
diff -c -r1.80 patch.c
*** patch.c 28 Dec 2002 17:56:59 -0000 1.80
--- patch.c 24 May 2003 10:17:51 -0000
***************
*** 463,507 ****
   goto out2;
      }

-     if (patch_short)
-     {
-  cvs_output ("File ", 0);
-  cvs_output (finfo->fullname, 0);
-  if (vers_tag == NULL)
-  {
-      cvs_output (" is new; current revision ", 0);
-      cvs_output (vers_head, 0);
-      cvs_output ("\n", 1);
-  }
-  else if (vers_head == NULL)
-  {
-      cvs_output (" is removed; not included in ", 0);
-      if (rev2 != NULL)
-      {
-   cvs_output ("release tag ", 0);
-   cvs_output (rev2, 0);
-      }
-      else if (date2 != NULL)
-      {
-   cvs_output ("release date ", 0);
-   cvs_output (date2, 0);
-      }
-      else
-   cvs_output ("current release", 0);
-      cvs_output ("\n", 1);
-  }
-  else
-  {
-      cvs_output (" changed from revision ", 0);
-      cvs_output (vers_tag, 0);
-      cvs_output (" to ", 0);
-      cvs_output (vers_head, 0);
-      cvs_output ("\n", 1);
-  }
-  ret = 0;
-  goto out2;
-     }
-
      /* Create 3 empty files.  I'm not really sure there is any advantage
       * to doing so now rather than just waiting until later.
       *
--- 463,468 ----
***************
*** 590,595 ****
--- 551,595 ----
   case 0:    /* nothing to do */
       break;
   case 1:
+     if (patch_short)
+     {
+  cvs_output ("File ", 0);
+  cvs_output (finfo->fullname, 0);
+  if (vers_tag == NULL)
+  {
+      cvs_output (" is new; current revision ", 0);
+      cvs_output (vers_head, 0);
+      cvs_output ("\n", 1);
+  }
+  else if (vers_head == NULL)
+  {
+      cvs_output (" is removed; not included in ", 0);
+      if (rev2 != NULL)
+      {
+   cvs_output ("release tag ", 0);
+   cvs_output (rev2, 0);
+      }
+      else if (date2 != NULL)
+      {
+   cvs_output ("release date ", 0);
+   cvs_output (date2, 0);
+      }
+      else
+   cvs_output ("current release", 0);
+      cvs_output ("\n", 1);
+  }
+  else
+  {
+      cvs_output (" changed from revision ", 0);
+      cvs_output (vers_tag, 0);
+      cvs_output (" to ", 0);
+      cvs_output (vers_head, 0);
+      cvs_output ("\n", 1);
+  }
+  ret = 0;
+  goto out;
+     }
+
       /*
        * The two revisions are really different, so read the first two
        * lines of the diff output file, and munge them to include more
Index: diff.c
===================================================================
RCS file: /cvs/ccvs/src/diff.c,v
retrieving revision 1.93
diff -c -r1.93 diff.c
*** diff.c 28 Dec 2002 17:56:59 -0000 1.93
--- diff.c 24 May 2003 10:17:53 -0000
***************
*** 956,963 ****
   /* now, see if we really need to do the diff */
   if (strcmp (use_rev1, use_rev2) == 0)
       return DIFF_SAME;
!  else
!      return DIFF_DIFFERENT;
      }

      if ((diff_rev1 || diff_date1) && use_rev1 == NULL)
--- 956,963 ----
   /* now, see if we really need to do the diff */
   if (strcmp (use_rev1, use_rev2) == 0)
       return DIFF_SAME;
!  /*else
!      return DIFF_DIFFERENT;*/
      }

      if ((diff_rev1 || diff_date1) && use_rev1 == NULL)
***************
*** 1003,1010 ****
      {
   if (strcmp (use_rev1, use_rev2) == 0)
       return DIFF_SAME;
!  else
!      return DIFF_DIFFERENT;
      }

      if (use_rev1 == NULL
--- 1003,1010 ----
      {
   if (strcmp (use_rev1, use_rev2) == 0)
       return DIFF_SAME;
!  /*else
!      return DIFF_DIFFERENT;*/
      }

      if (use_rev1 == NULL




reply via email to

[Prev in Thread] Current Thread [Next in Thread]