bug-cvs
[Top][All Lists]
Advanced

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

Re: Ambiguous commit message in cvs-1.12


From: Mark D. Baushke
Subject: Re: Ambiguous commit message in cvs-1.12
Date: Thu, 02 Sep 2004 16:18:44 -0700

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> 
> It seems that CVS-1.12 has changed smoe of its messages.
> Such changes are very inconvenient in and of themselves for front-ends like
> PCL-CVS, since you have to update the front-end to correctly parse the new
> messages, but one of those changes is even worse because it makes the result
> ambiguous.  Here is a sample session that shows the problem:
> 
>    $ cvs commit -m"test"
>    cvs commit: Examining A
>    cvs commit: Examining A/B1
>    cvs commit: Examining A/B2
>    /cvsroot/test/A/B1/foo,v  <--  foo
>    new revision: 1.6; previous revision: 1.5
>    /cvsroot/test/A/B2/bar,v  <--  bar
>    new revision: 1.3; previous revision: 1.2
>    $ 
> 
> Apparently two files were commited: A/B1/foo and A/B2/bar, but it's pretty
> difficult to figure it out, especially given the fact that a `modules' file
> might have mapped /cvsroot/test/A/B1 to A and /cvsroot/test/A/B2 to A/B1.
> 
> The old format included a line like "Checking in A/B1/foo;" which resolved
> those ambiguities.
> 
> Ideally (from the point of view of PCL-CVS) the change should be reverted,
> but at the very least it should be fixed to include the necessary
> extra info.
> One obvious possibility is to replace the "<-- foo" with "<-- A/B1/foo".

So, which alternative do you want #a or #b?
Untested patches for both follow my .signature.
In both cases, the sanity.sh would require a fair
amount of work to put in place.

        -- Mark

a) Re-instate the 'Checking in <fullname>;' line

--- src/checkin.c~      Tue May 11 10:33:52 2004        1.50
+++ src/checkin.c       Thu Sep  2 16:11:04 2004
@@ -27,6 +27,19 @@ Checkin (int type, struct file_info *fin
     int set_time;
     char *tocvsPath = NULL;
 
+    /* Hmm.  This message goes to stdout and the "foo,v  <--  foo"
+       message from "ci" goes to stderr.  This doesn't make a whole
+       lot of sense, but making everything go to stdout can only be
+       gracefully achieved once RCS_checkin is librarified.  */
+    /* Re-introduced for PCL-CVS clients to get the pathname for the
+       file being committed. */
+    if (!quiet)
+    {
+        cvs_output ("Checking in ", 0);
+        cvs_output (finfo->fullname, 0);
+        cvs_output (";\n", 0);
+    }
+
     tocvsPath = wrap_tocvs_process_file (finfo->file);
     if (!noexec)
     {

b) Alter the simple name to be a fullname in the RCS mapping.

--- src/commit.c        Thu Sep  2 15:50:16 2004        1.237
+++ src/commit.c        Thu Sep  2 16:15:31 2004
@@ -1778,7 +1778,7 @@ remove_file (struct file_info *finfo, ch
     {
        cvs_output (old_path, 0);
        cvs_output ("  <--  ", 0);
-       cvs_output (finfo->file, 0);
+       cvs_output (finfo->fullname, 0);
        cvs_output ("\nnew revision: delete; previous revision: ", 0);
        cvs_output (prev_rev, 0);
        cvs_output ("\n", 0);




reply via email to

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