cvs-cvs
[Top][All Lists]
Advanced

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

[Cvs-cvs] ccvs/src ChangeLog add.c base.c base.h checkin....


From: Derek Robert Price
Subject: [Cvs-cvs] ccvs/src ChangeLog add.c base.c base.h checkin....
Date: Tue, 16 Sep 2008 21:00:24 +0000

CVSROOT:        /cvsroot/cvs
Module name:    ccvs
Changes by:     Derek Robert Price <dprice>     08/09/16 21:00:23

Modified files:
        src            : ChangeLog add.c base.c base.h checkin.c 
                         classify.c client.c edit.c edit.h entries.c 
                         entries.h no_diff.c remove.c sanity.sh server.c 
                         server.h update.c 

Log message:
        * add.c (build_entry): Accept struct file_info in lieu of multiple
        args.  Change all callers.  Move to avoid prototypes.
        (add_directory): Move to avoid prototypes.
        * base.c (validate_change): Accept struct file_info in lieu of
        multiple args.  Add quotes to error messages.
        (ibase_copy): Change all callers.
        (base_merge): Add GNULIB quoting.
        (base_diff): Make struct file_info arg const.
        * client.c (call_in_directory): Callback accepts struct file_info in
        lieu of multiple args.
        (copy_a_file, update_entries, client_base_checkout,
        -client_base_signatures, client_base_copy, client_base_merge,
        client_base_diff, remove_entry, remove_entry_and_file, set_static,
        clear_static, set_sticky, template, clear_template, notified_a_file):
        Update callbacks likewise.  Some GNULIB quoting updates.
        * edit.c (edit_file): Ditto.
        (edit_fileproc): Update to use new edit_file() API.
        * edit.h (edit_file): Update prototype to match.
        * entries.h (Register): Update prototype.
        * entries.c (Register): Accept struct file_info in lieu of multiple
        args and...
        * add.c, checkin.c, classify.c, edit.c, no_diff.c, remove.c,
        update.c: ...change all callers.
        * server.c (server_base_diff), server.h (server_base_diff): Mark
        struct file_info arg as const.
        * sanity.sh: Update to compensate for quoting changes.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/ChangeLog?cvsroot=cvs&r1=1.3588&r2=1.3589
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/add.c?cvsroot=cvs&r1=1.137&r2=1.138
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/base.c?cvsroot=cvs&r1=1.9&r2=1.10
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/base.h?cvsroot=cvs&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/checkin.c?cvsroot=cvs&r1=1.61&r2=1.62
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/classify.c?cvsroot=cvs&r1=1.44&r2=1.45
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/client.c?cvsroot=cvs&r1=1.474&r2=1.475
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/edit.c?cvsroot=cvs&r1=1.105&r2=1.106
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/edit.h?cvsroot=cvs&r1=1.15&r2=1.16
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/entries.c?cvsroot=cvs&r1=1.75&r2=1.76
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/entries.h?cvsroot=cvs&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/no_diff.c?cvsroot=cvs&r1=1.40&r2=1.41
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/remove.c?cvsroot=cvs&r1=1.65&r2=1.66
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/sanity.sh?cvsroot=cvs&r1=1.1202&r2=1.1203
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/server.c?cvsroot=cvs&r1=1.484&r2=1.485
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/server.h?cvsroot=cvs&r1=1.50&r2=1.51
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/update.c?cvsroot=cvs&r1=1.281&r2=1.282

Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/ChangeLog,v
retrieving revision 1.3588
retrieving revision 1.3589
diff -u -b -r1.3588 -r1.3589
--- ChangeLog   16 Sep 2008 20:25:42 -0000      1.3588
+++ ChangeLog   16 Sep 2008 21:00:09 -0000      1.3589
@@ -1,6 +1,33 @@
 2008-09-16  Derek R. Price  <address@hidden>
 
-       * src/client.c (handle_clear_static_directory): Skip unneeded check.
+       * add.c (build_entry): Accept struct file_info in lieu of multiple
+       args.  Change all callers.  Move to avoid prototypes.
+       (add_directory): Move to avoid prototypes.
+       * base.c (validate_change): Accept struct file_info in lieu of
+       multiple args.  Add quotes to error messages.
+       (ibase_copy): Change all callers.
+       (base_merge): Add GNULIB quoting.
+       (base_diff): Make struct file_info arg const.
+       * client.c (call_in_directory): Callback accepts struct file_info in
+       lieu of multiple args.
+       (copy_a_file, update_entries, client_base_checkout,
+       -client_base_signatures, client_base_copy, client_base_merge,
+       client_base_diff, remove_entry, remove_entry_and_file, set_static,
+       clear_static, set_sticky, template, clear_template, notified_a_file):
+       Update callbacks likewise.  Some GNULIB quoting updates.
+       * edit.c (edit_file): Ditto.
+       (edit_fileproc): Update to use new edit_file() API.
+       * edit.h (edit_file): Update prototype to match.
+       * entries.h (Register): Update prototype.
+       * entries.c (Register): Accept struct file_info in lieu of multiple
+       args and...
+       * add.c, checkin.c, classify.c, edit.c, no_diff.c, remove.c,
+       update.c: ...change all callers.
+       * server.c (server_base_diff), server.h (server_base_diff): Mark
+       struct file_info arg as const.
+       * sanity.sh: Update to compensate for quoting changes.
+
+       * client.c (handle_clear_static_directory): Skip unneeded check.
 
        * client.c (arg_should_not_be_sent_to_server): Avoid memory leak.
 

Index: add.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/add.c,v
retrieving revision 1.137
retrieving revision 1.138
diff -u -b -r1.137 -r1.138
--- add.c       15 Sep 2008 16:38:11 -0000      1.137
+++ add.c       16 Sep 2008 21:00:19 -0000      1.138
@@ -53,10 +53,200 @@
 #include <assert.h>
 
 
-static int add_directory (struct file_info *finfo);
-static int build_entry (const char *repository, const char *user,
-                        const char *options, const char *message,
-                        List * entries, const char *tag);
+
+/*
+ * Builds an entry for a new file and sets up "CVS/file",[pt] by
+ * interrogating the user.  Returns non-zero on error.
+ */
+static int
+build_entry (const struct file_info *finfo, const char *options,
+             const char *message, const char *tag)
+{
+    char *fname;
+    char *line;
+    FILE *fp;
+
+    if (noexec)
+       return 0;
+
+    /*
+     * The requested log is read directly from the user and stored in the
+     * file user,t.  If the "message" argument is set, use it as the
+     * initial creation log (which typically describes the file).
+     */
+    fname = Xasprintf ("%s/%s%s", CVSADM, finfo->file, CVSEXT_LOG);
+    fp = xfopen (fname, "w+");
+    if (message && fputs (message, fp) == EOF)
+           error (1, errno, "cannot write to %s", fname);
+    if (fclose (fp) == EOF)
+        error (1, errno, "cannot close %s", fname);
+    free (fname);
+
+    /*
+     * Create the entry now, since this allows the user to interrupt us above
+     * without needing to clean anything up (well, we could clean up the
+     * ,t file, but who cares).
+     */
+    line = Xasprintf ("Initial %s", finfo->file);
+    Register (finfo, "0", line, options, tag, NULL, NULL);
+    free (line);
+    return 0;
+}
+
+
+
+/*
+ * The specified user file is really a directory.  So, let's make sure that
+ * it is created in the RCS source repository, and that the user's directory
+ * is updated to include a CVS directory.
+ * 
+ * Returns 1 on failure, 0 on success.
+ */
+static int
+add_directory (const struct file_info *finfo)
+{
+    const char *repository = finfo->repository;
+    List *entries = finfo->entries;
+    const char *dir = finfo->file;
+
+    char *rcsdir = NULL;
+    struct saved_cwd cwd;
+    char *message = NULL;
+    char *tag, *date;
+    int nonbranch;
+    char *attrs;
+
+    assert (strchr (dir, '/') == NULL);
+    assert (fncmp (dir, CVSADM));
+
+    /* before we do anything else, see if we have any per-directory tags */
+    ParseTag (&tag, &date, &nonbranch);
+
+    /* Remember the default attributes from this directory, so we can apply
+       them to the new directory.  */
+    fileattr_startdir (repository);
+    attrs = fileattr_getall (NULL);
+    fileattr_free ();
+
+    /* now, remember where we were, so we can get back */
+    if (save_cwd (&cwd))
+    {
+       error (0, errno, "Failed to save current directory.");
+       return 1;
+    }
+    if (CVS_CHDIR (dir) < 0)
+    {
+       error (0, errno, "cannot chdir to %s", finfo->fullname);
+       return 1;
+    }
+    if (!server_active && isfile (CVSADM))
+    {
+       error (0, 0, "%s/%s already exists", finfo->fullname, CVSADM);
+       goto out;
+    }
+
+    rcsdir = Xasprintf ("%s/%s", repository, dir);
+    if (isfile (rcsdir) && !isdir (rcsdir))
+    {
+       error (0, 0, "%s is not a directory; %s not added", rcsdir,
+              finfo->fullname);
+       goto out;
+    }
+
+    /* setup the log message */
+    message = Xasprintf ("Directory %s added to the repository\n%s%s%s%s%s%s",
+                        rcsdir,
+                        tag ? "--> Using per-directory sticky tag `" : "",
+                        tag ? tag : "", tag ? "'\n" : "",
+                        date ? "--> Using per-directory sticky date `" : "",
+                        date ? date : "", date ? "'\n" : "");
+
+    if (!isdir (rcsdir))
+    {
+       Node *p;
+       List *ulist;
+       struct logfile_info *li;
+
+       /* There used to be some code here which would prompt for
+          whether to add the directory.  The details of that code had
+          bitrotted, but more to the point it can't work
+          client/server, doesn't ask in the right way for GUIs, etc.
+          A better way of making it harder to accidentally add
+          directories would be to have to add and commit directories
+          like for files.  The code was #if 0'd at least since CVS 1.5.  */
+
+       if (!noexec && !cvs_mkdir (rcsdir, NULL, MD_REPO) && errno != EEXIST)
+           goto out;
+
+       /* Now set the default file attributes to the ones we inherited
+          from the parent directory.  */
+       fileattr_startdir (rcsdir);
+       fileattr_setall (NULL, attrs);
+       fileattr_write ();
+       fileattr_free ();
+       if (attrs != NULL)
+       {
+           free (attrs);
+           attrs = NULL;
+       }
+
+       /*
+        * Set up an update list with a single title node for Update_Logfile
+        */
+       ulist = getlist ();
+       p = getnode ();
+       p->type = UPDATE;
+       p->delproc = update_delproc;
+       p->key = xstrdup ("- New directory");
+       li = xmalloc (sizeof (struct logfile_info));
+       li->type = T_TITLE;
+       li->tag = xstrdup (tag);
+       li->rev_old = li->rev_new = NULL;
+       p->data = li;
+       (void) addnode (ulist, p);
+       Update_Logfile (rcsdir, message, NULL, ulist);
+       dellist (&ulist);
+    }
+
+    if (server_active)
+       WriteTemplate (finfo->fullname, 1, rcsdir);
+    else
+       Create_Admin (".", finfo->fullname, rcsdir, tag, date, nonbranch, 0, 1);
+
+    if (tag)
+       free (tag);
+    if (date)
+       free (date);
+
+    if (restore_cwd (&cwd))
+       error (1, errno, "Failed to restore current directory, `%s'.",
+              cwd.name);
+    free_cwd (&cwd);
+
+    Subdir_Register (entries, NULL, dir);
+
+    if (!really_quiet)
+       cvs_output (message, 0);
+
+    free (rcsdir);
+    free (message);
+    if (attrs != NULL)
+       free (attrs);
+
+    return 0;
+
+out:
+    if (restore_cwd (&cwd))
+       error (1, errno, "Failed to restore current directory, `%s'.",
+              cwd.name);
+    free_cwd (&cwd);
+    if (message) free (message);
+    if (rcsdir != NULL)
+       free (rcsdir);
+    return 0;
+}
+
+
 
 static const char *const add_usage[] =
 {
@@ -421,8 +611,8 @@
                    else
                    {
                        /* There is a user file, so build the entry for it */
-                       if (build_entry (repository, finfo.file, vers->options,
-                                        message, entries, vers->tag) != 0)
+                       if (build_entry (&finfo, vers->options, message,
+                                        vers->tag) != 0)
                            err++;
                        else
                        {
@@ -552,7 +742,7 @@
                            if (vers->tag)
                                free (bbuf);
                        }
-                       Register (entries, finfo.file, "0",
+                       Register (&finfo, "0",
                                  timestamp ? timestamp : vers->ts_user,
                                  vers->options, vers->tag, vers->date, NULL);
                        if (timestamp) free (timestamp);
@@ -656,8 +846,7 @@
                             error (0, 0, "`%s', version %s, resurrected",
                                    finfo.fullname, vers->vn_user);
                    }
-                   Register (entries, finfo.file, vers->vn_user,
-                              tmp, vers->options,
+                   Register (&finfo, vers->vn_user, tmp, vers->options,
                              vers->tag, vers->date, NULL);
                    if (tmp) free (tmp);
 #ifdef SERVER_SUPPORT
@@ -737,197 +926,3 @@
 
     return err;
 }
-
-
-
-/*
- * The specified user file is really a directory.  So, let's make sure that
- * it is created in the RCS source repository, and that the user's directory
- * is updated to include a CVS directory.
- * 
- * Returns 1 on failure, 0 on success.
- */
-static int
-add_directory (struct file_info *finfo)
-{
-    const char *repository = finfo->repository;
-    List *entries = finfo->entries;
-    const char *dir = finfo->file;
-
-    char *rcsdir = NULL;
-    struct saved_cwd cwd;
-    char *message = NULL;
-    char *tag, *date;
-    int nonbranch;
-    char *attrs;
-
-    assert (strchr (dir, '/') == NULL);
-    assert (fncmp (dir, CVSADM));
-
-    /* before we do anything else, see if we have any per-directory tags */
-    ParseTag (&tag, &date, &nonbranch);
-
-    /* Remember the default attributes from this directory, so we can apply
-       them to the new directory.  */
-    fileattr_startdir (repository);
-    attrs = fileattr_getall (NULL);
-    fileattr_free ();
-
-    /* now, remember where we were, so we can get back */
-    if (save_cwd (&cwd))
-    {
-       error (0, errno, "Failed to save current directory.");
-       return 1;
-    }
-    if (CVS_CHDIR (dir) < 0)
-    {
-       error (0, errno, "cannot chdir to %s", finfo->fullname);
-       return 1;
-    }
-    if (!server_active && isfile (CVSADM))
-    {
-       error (0, 0, "%s/%s already exists", finfo->fullname, CVSADM);
-       goto out;
-    }
-
-    rcsdir = Xasprintf ("%s/%s", repository, dir);
-    if (isfile (rcsdir) && !isdir (rcsdir))
-    {
-       error (0, 0, "%s is not a directory; %s not added", rcsdir,
-              finfo->fullname);
-       goto out;
-    }
-
-    /* setup the log message */
-    message = Xasprintf ("Directory %s added to the repository\n%s%s%s%s%s%s",
-                        rcsdir,
-                        tag ? "--> Using per-directory sticky tag `" : "",
-                        tag ? tag : "", tag ? "'\n" : "",
-                        date ? "--> Using per-directory sticky date `" : "",
-                        date ? date : "", date ? "'\n" : "");
-
-    if (!isdir (rcsdir))
-    {
-       Node *p;
-       List *ulist;
-       struct logfile_info *li;
-
-       /* There used to be some code here which would prompt for
-          whether to add the directory.  The details of that code had
-          bitrotted, but more to the point it can't work
-          client/server, doesn't ask in the right way for GUIs, etc.
-          A better way of making it harder to accidentally add
-          directories would be to have to add and commit directories
-          like for files.  The code was #if 0'd at least since CVS 1.5.  */
-
-       if (!noexec && !cvs_mkdir (rcsdir, NULL, MD_REPO) && errno != EEXIST)
-           goto out;
-
-       /* Now set the default file attributes to the ones we inherited
-          from the parent directory.  */
-       fileattr_startdir (rcsdir);
-       fileattr_setall (NULL, attrs);
-       fileattr_write ();
-       fileattr_free ();
-       if (attrs != NULL)
-       {
-           free (attrs);
-           attrs = NULL;
-       }
-
-       /*
-        * Set up an update list with a single title node for Update_Logfile
-        */
-       ulist = getlist ();
-       p = getnode ();
-       p->type = UPDATE;
-       p->delproc = update_delproc;
-       p->key = xstrdup ("- New directory");
-       li = xmalloc (sizeof (struct logfile_info));
-       li->type = T_TITLE;
-       li->tag = xstrdup (tag);
-       li->rev_old = li->rev_new = NULL;
-       p->data = li;
-       (void) addnode (ulist, p);
-       Update_Logfile (rcsdir, message, NULL, ulist);
-       dellist (&ulist);
-    }
-
-    if (server_active)
-       WriteTemplate (finfo->fullname, 1, rcsdir);
-    else
-       Create_Admin (".", finfo->fullname, rcsdir, tag, date, nonbranch, 0, 1);
-
-    if (tag)
-       free (tag);
-    if (date)
-       free (date);
-
-    if (restore_cwd (&cwd))
-       error (1, errno, "Failed to restore current directory, `%s'.",
-              cwd.name);
-    free_cwd (&cwd);
-
-    Subdir_Register (entries, NULL, dir);
-
-    if (!really_quiet)
-       cvs_output (message, 0);
-
-    free (rcsdir);
-    free (message);
-    if (attrs != NULL)
-       free (attrs);
-
-    return 0;
-
-out:
-    if (restore_cwd (&cwd))
-       error (1, errno, "Failed to restore current directory, `%s'.",
-              cwd.name);
-    free_cwd (&cwd);
-    if (message) free (message);
-    if (rcsdir != NULL)
-       free (rcsdir);
-    return 0;
-}
-
-
-
-/*
- * Builds an entry for a new file and sets up "CVS/file",[pt] by
- * interrogating the user.  Returns non-zero on error.
- */
-static int
-build_entry (const char *repository, const char *user, const char *options,
-             const char *message, List *entries, const char *tag)
-{
-    char *fname;
-    char *line;
-    FILE *fp;
-
-    if (noexec)
-       return 0;
-
-    /*
-     * The requested log is read directly from the user and stored in the
-     * file user,t.  If the "message" argument is set, use it as the
-     * initial creation log (which typically describes the file).
-     */
-    fname = Xasprintf ("%s/%s%s", CVSADM, user, CVSEXT_LOG);
-    fp = xfopen (fname, "w+");
-    if (message && fputs (message, fp) == EOF)
-           error (1, errno, "cannot write to %s", fname);
-    if (fclose (fp) == EOF)
-        error (1, errno, "cannot close %s", fname);
-    free (fname);
-
-    /*
-     * Create the entry now, since this allows the user to interrupt us above
-     * without needing to clean anything up (well, we could clean up the
-     * ,t file, but who cares).
-     */
-    line = Xasprintf ("Initial %s", user);
-    Register (entries, user, "0", line, options, tag, NULL, NULL);
-    free (line);
-    return 0;
-}

Index: base.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/base.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- base.c      16 Sep 2008 16:45:47 -0000      1.9
+++ base.c      16 Sep 2008 21:00:19 -0000      1.10
@@ -23,9 +23,12 @@
 /* Verify interface.  */
 #include "base.h"
 
-/* Standard headers.  */
+/* Standards  */
 #include <assert.h>
 
+/* GNULIB */
+#include "quote.h"
+
 /* CVS headers.  */
 #include "difflib.h"
 #include "server.h"
@@ -350,8 +353,7 @@
  * accidentally overwriting a user's changes.
  */
 bool
-validate_change (enum update_existing existp, const char *filename,
-                const char *fullname)
+validate_change (enum update_existing existp, const struct file_info *finfo)
 {
     /* Note that checking this separately from writing the file is
        a race condition: if the existence or lack thereof of the
@@ -362,11 +364,12 @@
        does the right thing, and (c) it isn't clear this needs to
        work.  */
     if (existp == UPDATE_ENTRIES_EXISTING
-       && !isfile (filename))
+       && !isfile (finfo->file))
        /* Emit a warning and update the file anyway.  */
-       error (0, 0, "warning: %s unexpectedly disappeared", fullname);
+       error (0, 0, "warning: %s unexpectedly disappeared",
+              quote (finfo->fullname));
     else if (existp == UPDATE_ENTRIES_NEW
-       && isfile (filename))
+       && isfile (finfo->file))
     {
        /* This error might be confusing; it isn't really clear to
           the user what to do about it.  Keep in mind that it has
@@ -387,7 +390,8 @@
 
           I hope the above paragraph makes it clear that making this
           clearer is not a one-line fix.  */
-       error (0, 0, "move away `%s'; it is in the way", fullname);
+       error (0, 0, "move away %s; it is in the way",
+              quote (finfo->fullname));
 
        /* The Mode, Mod-time, and Checksum responses should not carry
         * over to a subsequent Created (or whatever) response, even
@@ -396,7 +400,7 @@
        if (!really_quiet)
        {
            cvs_output ("C ", 0);
-           cvs_output (fullname, 0);
+           cvs_output (finfo->fullname, 0);
            cvs_output ("\n", 1);
        }
        return false;
@@ -422,8 +426,7 @@
     if (!server_active /* The server still doesn't stay perfectly in sync with
                        * the client workspace.
                        */
-       && !validate_change (translate_exists (flags), finfo->file,
-                            finfo->fullname))
+       && !validate_change (translate_exists (flags), finfo))
        exit (EXIT_FAILURE);
 
     if (noexec)
@@ -569,7 +572,7 @@
 #endif
 
     if (CVS_UNLINK (f1) < 0)
-       error (0, errno, "unable to remove `%s'", f1);
+       error (0, errno, "unable to remove %s", quote (f1));
     /* Using a base file instead of a temp file here and not deleting it is an
      * optimization since, for instance, on merge from 1.1 to 1.4 with local
      * changes, the client is going to want to leave base 1.4 and delete base
@@ -579,9 +582,9 @@
     {
        char *sigfile = Xasprintf ("%s.sig", f2);
        if (CVS_UNLINK (f2) < 0)
-           error (0, errno, "unable to remove `%s'", f2);
+           error (0, errno, "unable to remove %s", quote (f2));
        if (CVS_UNLINK (sigfile) < 0 && !existence_error (errno))
-           error (0, errno, "unable to remove `%s'", sigfile);
+           error (0, errno, "unable to remove %s", quote (sigfile));
        free (sigfile);
     }
     free (f1);
@@ -594,7 +597,8 @@
 
 /* Merge revisions REV1 and REV2. */
 int
-base_diff (struct file_info *finfo, int diff_argc, char *const *diff_argv,
+base_diff (const struct file_info *finfo,
+          int diff_argc, char *const *diff_argv,
           const char *f1, const char *use_rev1, const char *label1,
           const char *f2, const char *use_rev2, const char *label2,
           bool empty_files)

Index: base.h
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/base.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- base.h      24 Apr 2006 18:50:25 -0000      1.2
+++ base.h      16 Sep 2008 21:00:20 -0000      1.3
@@ -46,8 +46,8 @@
                     const char *tag, const char *poptions,
                     const char *options);
 enum update_existing translate_exists (const char *exists);
-bool validate_change (enum update_existing existp, const char *filename,
-                     const char *fullname);
+bool validate_change (enum update_existing existp,
+                     const struct file_info *finfo);
 void base_copy (struct file_info *finfo, const char *rev, const char *flags);
 void temp_copy (struct file_info *finfo, const char *flags,
                const char *tempfile);
@@ -56,7 +56,8 @@
                const char *poptions, const char *options,
                const char *urev, const char *rev1, const char *rev2,
                bool join);
-int base_diff (struct file_info *finfo, int diff_argc, char *const *diff_argv,
+int base_diff (const struct file_info *finfo,
+              int diff_argc, char *const *diff_argv,
               const char *f1, const char *use_rev1, const char *label1,
               const char *f2, const char *use_rev2, const char *label2,
               bool empty_files);

Index: checkin.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/checkin.c,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -b -r1.61 -r1.62
--- checkin.c   12 Sep 2007 17:27:21 -0000      1.61
+++ checkin.c   16 Sep 2008 21:00:20 -0000      1.62
@@ -142,7 +142,7 @@
            /* Re-register with the new data.  */
            if (STREQ (vers->options, "-V4"))
                vers->options[0] = '\0';
-           Register (finfo->entries, finfo->file, vers->vn_rcs, vers->ts_user,
+           Register (finfo, vers->vn_rcs, vers->ts_user,
                      vers->options, vers->tag, vers->date, NULL);
            history_write (type, NULL, vers->vn_rcs,
                           finfo->file, finfo->repository);

Index: classify.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/classify.c,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -b -r1.44 -r1.45
--- classify.c  15 Sep 2008 16:38:12 -0000      1.44
+++ classify.c  16 Sep 2008 21:00:20 -0000      1.45
@@ -459,7 +459,7 @@
            (entdate && vers->date && !STREQ (entdate, vers->date)) ||
            ((entdate && !vers->date) || (!entdate && vers->date)))
        {
-           Register (finfo->entries, finfo->file, vers->vn_user, vers->ts_rcs,
+           Register (finfo, vers->vn_user, vers->ts_rcs,
                      vers->options, vers->tag, vers->date, vers->ts_conflict);
 
 #ifdef SERVER_SUPPORT

Index: client.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/client.c,v
retrieving revision 1.474
retrieving revision 1.475
diff -u -b -r1.474 -r1.475
--- client.c    16 Sep 2008 20:25:43 -0000      1.474
+++ client.c    16 Sep 2008 21:00:20 -0000      1.475
@@ -723,7 +723,7 @@
  * the directory portion of SHORT_PATHNAME.  */
 static void
 call_in_directory (const char *pathname,
-                   void (*func) (void *, List *, const char *, const char *),
+                   void (*func) (void *, const struct file_info *),
                    void *data)
 {
     /* This variable holds the result of Entries_Open. */
@@ -755,6 +755,7 @@
     char *short_repos;
     int reposdirname_absolute;
     bool newdir;
+    struct file_info finfo;
 
     assert (pathname && strlen (pathname));
 
@@ -892,7 +893,13 @@
        }
     }
 
-    (*func) (data, last_entries, short_pathname, filename);
+    finfo.update_dir = pathname;
+    finfo.file = filename;
+    finfo.fullname = short_pathname;
+    finfo.repository = short_repos;
+    finfo.entries = last_entries;
+
+    (*func) (data, &finfo);
     if (last_entries)
        Entries_Close (last_entries, STREQ (pathname, "./") ? "" : dir);
     free (dir);
@@ -905,8 +912,7 @@
 
 
 static void
-copy_a_file (void *data, List *ent_list, const char *short_pathname,
-            const char *filename)
+copy_a_file (void *data, const struct file_info *finfo)
 {
     char *newname;
 
@@ -924,11 +930,13 @@
        same directory.  Wouldn't want a malicious or buggy server overwriting
        ~/.profile, /etc/passwd, or anything like that.  */
     if (last_component (newname) != newname)
-       error (1, 0, "protocol error: Copy-file tried to specify directory");
+       error (1, 0,
+              "protocol error: Copy-file tried to specify directory (%s)",
+              quote (newname));
 
     if (unlink_file (newname) && !existence_error (errno))
-       error (0, errno, "unable to remove %s", newname);
-    copy_file (filename, newname);
+       error (0, errno, "unable to remove %s", quote (newname));
+    copy_file (finfo->file, newname);
     free (newname);
 }
 
@@ -1324,8 +1332,7 @@
 
 /* Update the Entries line for this file.  */
 static void
-update_entries (void *data_arg, List *ent_list, const char *short_pathname,
-                const char *filename)
+update_entries (void *data_arg, const struct file_info *finfo)
 {
     char *entries_line;
     struct update_entries_data *data = data_arg;
@@ -1355,23 +1362,23 @@
     scratch_entries = xstrdup (entries_line);
 
     if (scratch_entries[0] != '/')
-        error (1, 0, "bad entries line `%s' from server", entries_line);
+        error (1, 0, "bad entries line %s from server", quote (entries_line));
     user = scratch_entries + 1;
     if (!(cp = strchr (user, '/')))
-        error (1, 0, "bad entries line `%s' from server", entries_line);
+        error (1, 0, "bad entries line %s from server", quote (entries_line));
     *cp++ = '\0';
     vn = cp;
     if (!(cp = strchr (vn, '/')))
-        error (1, 0, "bad entries line `%s' from server", entries_line);
+        error (1, 0, "bad entries line %s from server", quote (entries_line));
     *cp++ = '\0';
     
     ts = cp;
     if (!(cp = strchr (ts, '/')))
-        error (1, 0, "bad entries line `%s' from server", entries_line);
+        error (1, 0, "bad entries line %s from server", quote (entries_line));
     *cp++ = '\0';
     options = cp;
     if (!(cp = strchr (options, '/')))
-        error (1, 0, "bad entries line `%s' from server", entries_line);
+        error (1, 0, "bad entries line %s from server", quote (entries_line));
     *cp++ = '\0';
     tag_or_date = cp;
     
@@ -1386,7 +1393,7 @@
 
     /* Done parsing the entries line. */
 
-    temp_filename = newfilename (filename);
+    temp_filename = newfilename (finfo->file);
 
     if (data->contents == UPDATE_ENTRIES_UPDATE
        || data->contents == UPDATE_ENTRIES_PATCH
@@ -1399,9 +1406,9 @@
 
        if (get_verify_checkouts (true) && !STREQ (cvs_cmd_name, "export"))
            error (get_verify_checkouts_fatal (), 0,
-                  "No signature for `%s'.", short_pathname);
+                  "No signature for %s.", quote (finfo->fullname));
 
-       if (!validate_change (data->existp, filename, short_pathname))
+       if (!validate_change (data->existp, finfo))
        {
            /* The Mode, Mod-time, and Checksum responses should not carry
             * over to a subsequent Created (or whatever) response, even
@@ -1429,7 +1436,7 @@
            return;
        }
 
-       buf = read_file_from_server (short_pathname, &mode_string, &size);
+       buf = read_file_from_server (finfo->fullname, &mode_string, &size);
 
         /* Some systems, like OS/2 and Windows NT, end lines with CRLF
            instead of just LF.  Format translation is done in the C
@@ -1460,24 +1467,24 @@
                   a permission problem, or some such, then it is
                   entirely possible that future files will not have
                   the same problem.  */
-               error (0, errno, "cannot write %s", short_pathname);
+               error (0, errno, "cannot write %s", quote (finfo->fullname));
                free (temp_filename);
                free (buf);
                goto discard_file_and_return;
            }
 
            if (write (fd, buf, size) != size)
-               error (1, errno, "writing %s", short_pathname);
+               error (1, errno, "writing %s", quote (finfo->fullname));
 
            if (close (fd) < 0)
-               error (1, errno, "writing %s", short_pathname);
+               error (1, errno, "writing %s", quote (finfo->fullname));
        }
 
        patch_failed = false;
 
        if (data->contents == UPDATE_ENTRIES_UPDATE)
        {
-           rename_file (temp_filename, filename);
+           rename_file (temp_filename, finfo->file);
        }
        else if (data->contents == UPDATE_ENTRIES_PATCH)
        {
@@ -1489,8 +1496,8 @@
 
               Fall back to transmitting entire files.  */
            error (0, 0,
-                  "unsupported patch format received for `%s'; will refetch",
-                  short_pathname);
+                  "unsupported patch format received for %s; will refetch",
+                  quote (finfo->fullname));
            patch_failed = true;
        }
        else
@@ -1503,25 +1510,26 @@
 
            /* Handle UPDATE_ENTRIES_RCS_DIFF.  */
 
-           if (!isfile (filename))
+           if (!isfile (finfo->file))
                error (1, 0, "patch original file %s does not exist",
-                      short_pathname);
+                      quote (finfo->fullname));
            filebuf = NULL;
            filebufsize = 0;
            nread = 0;
 
-           get_file (filename, short_pathname, bin ? FOPEN_BINARY_READ : "r",
+           get_file (finfo->file, finfo->fullname,
+                     bin ? FOPEN_BINARY_READ : "r",
                      &filebuf, &filebufsize, &nread);
            /* At this point the contents of the existing file are in
                FILEBUF, and the length of the contents is in NREAD.
                The contents of the patch from the network are in BUF,
                and the length of the patch is in SIZE.  */
 
-           if (!rcs_change_text (short_pathname, filebuf, nread, buf, size,
+           if (!rcs_change_text (finfo->fullname, filebuf, nread, buf, size,
                                   &patchedbuf, &patchedlen))
            {
-               error (0, 0, "patch failed for `%s'; will refetch",
-                      short_pathname);
+               error (0, 0, "patch failed for %s; will refetch",
+                      quote (finfo->fullname));
                patch_failed = true;
            }
            else
@@ -1537,8 +1545,8 @@
                    if (memcmp (ck.char_checksum, stored_ck.char_checksum, 16) 
!= 0)
                    {
                        error (0, 0,
-"checksum failure after patch to `%s'; will refetch",
-                              short_pathname);
+"checksum failure after patch to %s; will refetch",
+                              quote (finfo->fullname));
 
                        patch_failed = true;
                    }
@@ -1557,7 +1565,7 @@
                        error (1, errno, "cannot write %s", temp_filename);
                    if (fclose (e) == EOF)
                        error (1, errno, "cannot close %s", temp_filename);
-                   rename_file (temp_filename, filename);
+                   rename_file (temp_filename, finfo->file);
                }
 
                free (patchedbuf);
@@ -1587,15 +1595,15 @@
             * here using text mode, so its lines will be terminated the same
             * way they were transmitted.
             */
-           e = CVS_FOPEN (filename, "r");
+           e = CVS_FOPEN (finfo->file, "r");
            if (!e)
-               error (1, errno, "could not open %s", short_pathname);
+               error (1, errno, "could not open %s", quote (finfo->fullname));
 
            md5_init_ctx (&context);
            while ((len = fread (buf, 1, sizeof buf, e)) != 0)
                md5_process_bytes (buf, len, &context);
            if (ferror (e))
-               error (1, errno, "could not read %s", short_pathname);
+               error (1, errno, "could not read %s", quote (finfo->fullname));
            md5_finish_ctx (&context, ck.char_checksum);
 
            fclose (e);
@@ -1606,11 +1614,11 @@
            {
                if (data->contents != UPDATE_ENTRIES_PATCH)
                    error (1, 0, "checksum failure on %s",
-                          short_pathname);
+                          quote (finfo->fullname));
 
                error (0, 0,
-                      "checksum failure after patch to `%s'; will refetch",
-                      short_pathname);
+                      "checksum failure after patch to %s; will refetch",
+                      quote (finfo->fullname));
 
                patch_failed = true;
            }
@@ -1622,7 +1630,7 @@
            failed_patches = xnrealloc (failed_patches,
                                        failed_patches_count + 1,
                                        sizeof (char *));
-           failed_patches[failed_patches_count] = xstrdup (short_pathname);
+           failed_patches[failed_patches_count] = xstrdup (finfo->fullname);
            ++failed_patches_count;
 
            stored_checksum_valid = 0;
@@ -1649,9 +1657,10 @@
        }
 
         {
-           int status = change_mode (filename, mode_string, 1);
+           int status = change_mode (finfo->file, mode_string, 1);
            if (status != 0)
-               error (0, status, "cannot change mode of %s", short_pathname);
+               error (0, status, "cannot change mode of %s",
+                      quote (finfo->fullname));
        }
 
        free (mode_string);
@@ -1659,24 +1668,24 @@
     else if (data->contents == UPDATE_ENTRIES_BASE)
     {
        Node *n;
-       if (!noexec && (n = findnode_fn (ent_list, filename)))
+       if (!noexec && (n = findnode_fn (finfo->entries, finfo->file)))
        {
            Entnode *e = n->data;
            /* After a join, control can get here without having changed the
             * version number.  In this case, do not remove the base file.
             */
            if (!STREQ (vn, e->version))
-               base_remove (filename, e->version);
+               base_remove (finfo->file, e->version);
        }
 
        if (last_merge)
        {
            /* Won't need these now that the merge is complete.  */
            if (!STREQ (vn, base_merge_rev1))
-               base_remove (filename, base_merge_rev1);
+               base_remove (finfo->file, base_merge_rev1);
            free (base_merge_rev1);
            if (!STREQ (vn, base_merge_rev2))
-               base_remove (filename, base_merge_rev2);
+               base_remove (finfo->file, base_merge_rev2);
            free (base_merge_rev2);
        }
 
@@ -1698,7 +1707,7 @@
            return;
        }
        if (!noexec)
-           rename_file (temp_filename, filename);
+           rename_file (temp_filename, finfo->file);
        if (updated_fname)
        {
            cvs_output ("U ", 0);
@@ -1717,7 +1726,7 @@
        Node *n;
        bool makebase = true;
 
-       if ((n = findnode_fn (ent_list, filename)))
+       if ((n = findnode_fn (finfo->entries, finfo->file)))
        {
            /* This could be a readd of a locally removed file or, for
             * instance, an update that changed keyword options without
@@ -1726,7 +1735,7 @@
            Entnode *e = n->data;
            if (!STREQ (vn, e->version))
                /* The version number has changed.  */
-               base_remove (filename, e->version);
+               base_remove (finfo->file, e->version);
            else
                /* The version number has not changed.  */
                makebase = false;
@@ -1735,12 +1744,12 @@
        if (makebase)
        {
            /* A real checkin.  */
-           char *basefile = make_base_file_name (filename, vn);
+           char *basefile = make_base_file_name (finfo->file, vn);
 
            cvs_xmkdir (CVSADM_BASE, NULL, MD_EXIST_OK);
-           copy_file (filename, basefile);
+           copy_file (finfo->file, basefile);
 
-           if ((n = findnode_fn (sig_cache, short_pathname)))
+           if ((n = findnode_fn (sig_cache, finfo->fullname)))
            {
                char *sigfile = Xasprintf ("%s%s", basefile, ".sig");
                write_file (sigfile, n->data, n->len);
@@ -1749,8 +1758,8 @@
            }
            else if (get_sign_commits (supported_request ("Signature")))
                error (0, 0,
-"Internal error: OpenPGP signature for `%s' not found in cache.",
-                      short_pathname);
+"Internal error: OpenPGP signature for %s not found in cache.",
+                      quote (finfo->fullname));
            free (basefile);
        }
     }
@@ -1767,7 +1776,7 @@
 
     if (stored_mode)
     {
-       change_mode (filename, stored_mode, 1);
+       change_mode (finfo->file, stored_mode, 1);
        free (stored_mode);
        stored_mode = NULL;
     }
@@ -1781,20 +1790,20 @@
        (void) time (&t.actime);
 
 #ifdef UTIME_EXPECTS_WRITABLE
-       if (!iswritable (filename))
+       if (!iswritable (finfo->file))
        {
-           xchmod (filename, 1);
+           xchmod (finfo->file, 1);
            change_it_back = 1;
        }
 #endif  /* UTIME_EXPECTS_WRITABLE  */
 
-       if (utime (filename, &t) < 0)
-           error (0, errno, "cannot set time on %s", filename);
+       if (utime (finfo->file, &t) < 0)
+           error (0, errno, "cannot set time on %s", quote (finfo->fullname));
 
 #ifdef UTIME_EXPECTS_WRITABLE
        if (change_it_back)
        {
-           xchmod (filename, 0);
+           xchmod (finfo->file, 0);
            change_it_back = 0;
        }
 #endif  /*  UTIME_EXPECTS_WRITABLE  */
@@ -1816,7 +1825,7 @@
 
        local_timestamp = data->timestamp;
        if (!local_timestamp || ts[0] == '+' || last_merge_conflict)
-           file_timestamp = time_stamp (filename);
+           file_timestamp = time_stamp (finfo->file);
        else
            file_timestamp = NULL;
 
@@ -1840,11 +1849,7 @@
               cvsclient.texi accordingly.  */
 
            if (STREQ (cvs_cmd_name, "commit"))
-           {
-               char *update_dir = dir_name (short_pathname);
-               mark_up_to_date (update_dir, filename);
-               free (update_dir);
-           }
+               mark_up_to_date (finfo->update_dir, finfo->file);
        }
 
        if (last_merge)
@@ -1854,7 +1859,7 @@
                Node *n;
                Entnode *e;
 
-               n = findnode_fn (ent_list, filename);
+               n = findnode_fn (finfo->entries, finfo->file);
                assert (n);
 
                e = n->data;
@@ -1871,7 +1876,7 @@
        else
            ignore_merge = true;
        
-       Register (ent_list, filename, vn,
+       Register (finfo, vn,
                  ignore_merge ? local_timestamp : "Result of merge",
                  options, tag, date,
                  ts[0] == '+' || last_merge_conflict ? file_timestamp : NULL);
@@ -1881,7 +1886,7 @@
            if (!really_quiet)
            {
                cvs_output ("C ", 2);
-               cvs_output (short_pathname, 0);
+               cvs_output (finfo->fullname, 0);
                cvs_output ("\n", 1);
            }
        }
@@ -1890,7 +1895,7 @@
            if (!really_quiet)
            {
                cvs_output ("M ", 2);
-               cvs_output (short_pathname, 0);
+               cvs_output (finfo->fullname, 0);
                cvs_output ("\n", 1);
            }
        }
@@ -2089,8 +2094,7 @@
 
 
 static void
-client_base_checkout (void *data_arg, List *ent_list,
-                     const char *short_pathname, const char *filename)
+client_base_checkout (void *data_arg, const struct file_info *finfo)
 {
     /* Options for this file, a Previous REVision if this is a diff, and the
      * REVision of the new file.
@@ -2111,7 +2115,7 @@
     bool patch_failed;
     bool *istemp = data_arg;
 
-    TRACE (TRACE_FUNCTION, "client_base_checkout (%s)", short_pathname);
+    TRACE (TRACE_FUNCTION, "client_base_checkout (%s)", finfo->fullname);
 
     /* Read OPTIONS, PREV, and REV from the server.  */
     read_line (&options);
@@ -2131,7 +2135,7 @@
            temp_checkout1 = basefile;
     }
     else
-       basefile = make_base_file_name (filename, rev);
+       basefile = make_base_file_name (finfo->file, rev);
 
     /* FIXME?  It might be nice to verify that base files aren't being
      * overwritten except when the keyword mode has changed.
@@ -2139,9 +2143,8 @@
     if (!*istemp && isfile (basefile))
        force_xchmod (basefile, true);
 
-    update_dir = dir_name (short_pathname);
-    if (*istemp || !*update_dir) fullbase = xstrdup (basefile);
-    else fullbase = Xasprintf ("%s/%s", update_dir, basefile);
+    if (*istemp) fullbase = xstrdup (basefile);
+    else fullbase = dir_append (finfo->update_dir, basefile);
 
     /* Read the file or patch from the server.  */
     /* FIXME: Read/write to file is repeated and could be optimized to
@@ -2164,13 +2167,12 @@
 
        /* Handle UPDATE_ENTRIES_RCS_DIFF.  */
 
-       pbasefile = make_base_file_name (filename, prev);
-       if (!*update_dir) pfullbase = xstrdup (pbasefile);
-       else pfullbase = Xasprintf ("%s/%s", update_dir, pbasefile);
+       pbasefile = make_base_file_name (finfo->file, prev);
+       pfullbase = dir_append (finfo->update_dir, pbasefile);
 
        if (!isfile (pbasefile))
-           error (1, 0, "patch original file `%s' does not exist",
-                  pfullbase);
+           error (1, 0, "patch original file %s does not exist",
+                  quote (pfullbase));
 
        filebuf = NULL;
        filebufsize = 0;
@@ -2238,28 +2240,26 @@
            /* Verify the signature here, when configured to do so.  */
            if (verify /* cannot be `cvs export'. */)
            {
-               char *repos = Name_Repository (NULL, update_dir);
-               const char *srepos = Short_Repository (repos);
-               if (!verify_signature (srepos, sigcopy, siglen, basefile, bin,
+               if (!verify_signature (finfo->repository, sigcopy, siglen,
+                                      basefile, bin,
                                       get_verify_checkouts_fatal ()))
                {
                    /* verify_signature exits when VERIFY_FATAL.  */
                    assert (!get_verify_checkouts_fatal ());
                    error (0, 0, "Bad signature for `%s'.", fullbase);
                }
-               free (repos);
                free (sigcopy);
            }
 
-           if (istemp && CVS_UNLINK (sigfile) < 0)
-               error (0, errno, "Failed to remove temp sig file `%s'",
-                      sigfile);
+           if (*istemp && CVS_UNLINK (sigfile) < 0)
+               error (0, errno, "Failed to remove temp sig file %s",
+                      quote (sigfile));
 
            free (sigfile);
        }
        else if (verify /* cannot be `cvs export'. */)
            error (get_verify_checkouts_fatal (), 0,
-                  "No signature for `%s'.", fullbase);
+                  "No signature for %s.", quote (fullbase));
     }
 
     free (buf);
@@ -2267,7 +2267,6 @@
     free (prev);
     if (!*istemp)
        free (basefile);
-    free (update_dir);
     free (fullbase);
 }
 
@@ -2296,15 +2295,14 @@
 
 
 static void
-client_base_signatures (void *data_arg, List *ent_list,
-                       const char *short_pathname, const char *filename)
+client_base_signatures (void *data_arg, const struct file_info *finfo)
 {
     char *rev;
     char *basefile;
     char *sigfile;
     bool *clear = data_arg;
 
-    TRACE (TRACE_FUNCTION, "client_base_signatures (%s)", short_pathname);
+    TRACE (TRACE_FUNCTION, "client_base_signatures (%s)", finfo->fullname);
 
     if (!stored_signatures && !*clear)
        error (1, 0,
@@ -2316,7 +2314,7 @@
     /* Read REV from the server.  */
     read_line (&rev);
 
-    basefile = make_base_file_name (filename, rev);
+    basefile = make_base_file_name (finfo->file, rev);
     sigfile = Xasprintf ("%s.sig", basefile);
 
     if (*clear)
@@ -2366,19 +2364,18 @@
  *   expect.
  */
 static void
-client_base_copy (void *data_arg, List *ent_list, const char *short_pathname,
-                 const char *filename)
+client_base_copy (void *data_arg, const struct file_info *finfo)
 {
     char *rev, *flags;
     char *basefile;
     char *temp_filename;
 
-    TRACE (TRACE_FUNCTION, "client_base_copy (%s)", short_pathname);
+    TRACE (TRACE_FUNCTION, "client_base_copy (%s)", finfo->fullname);
 
     read_line (&rev);
 
     read_line (&flags);
-    if (!validate_change (translate_exists (flags), filename, short_pathname))
+    if (!validate_change (translate_exists (flags), finfo))
     {
        /* The Mode, Mod-time, and Checksum responses should not carry
         * over to a subsequent Created (or whatever) response, even
@@ -2411,9 +2408,9 @@
        basefile = temp_checkout1;
     }
     else
-       basefile = make_base_file_name (filename, rev);
+       basefile = make_base_file_name (finfo->file, rev);
 
-    temp_filename = newfilename (filename);
+    temp_filename = newfilename (finfo->file);
     copy_file (basefile, temp_filename);
 
     if (flags[0] && flags[1] == 'n')
@@ -2431,7 +2428,7 @@
     {
        temp_checkout1 = NULL;
        if (CVS_UNLINK (basefile) < 0)
-           error (0, errno, "Failed to remove temp file `%s'", basefile);
+           error (0, errno, "Failed to remove temp file %s", quote (basefile));
     }
 
     free (flags);
@@ -2453,14 +2450,13 @@
 
 
 static void
-client_base_merge (void *data_arg, List *ent_list, const char *short_pathname,
-                  const char *filename)
+client_base_merge (void *data_arg, const struct file_info *finfo)
 {
     char *f1, *f2;
     char *temp_filename;
     int status;
 
-    TRACE (TRACE_FUNCTION, "client_base_merge (%s)", short_pathname);
+    TRACE (TRACE_FUNCTION, "client_base_merge (%s)", finfo->fullname);
 
     read_line (&base_merge_rev1);
     read_line (&base_merge_rev2);
@@ -2471,9 +2467,9 @@
        cvs_output (base_merge_rev1, 0);
        cvs_output (" and ", 5);
        cvs_output (base_merge_rev2, 0);
-       cvs_output (" into `", 7);
-       cvs_output (short_pathname, 0);
-       cvs_output ("'\n", 2);
+       cvs_output (" into ", 6);
+       cvs_output (quote (finfo->fullname), 0);
+       cvs_output ("\n", 1);
     }
 
     if (temp_checkout1)
@@ -2483,29 +2479,29 @@
            f2 = temp_checkout2;
        else
        {
-           f2 = make_base_file_name (filename, base_merge_rev2);
+           f2 = make_base_file_name (finfo->file, base_merge_rev2);
            if (!isfile (f2))
                error (1, 0, "Server sent only one temp file before a merge.");
        }
     }
     else
     {
-       f1 = make_base_file_name (filename, base_merge_rev1);
-       f2 = make_base_file_name (filename, base_merge_rev2);
+       f1 = make_base_file_name (finfo->file, base_merge_rev1);
+       f2 = make_base_file_name (finfo->file, base_merge_rev2);
     }
 
-    temp_filename = newfilename (filename);
+    temp_filename = newfilename (finfo->file);
 
-    force_copy_file (filename, temp_filename);
+    force_copy_file (finfo->file, temp_filename);
     force_xchmod (temp_filename, true);
 
-    status = merge (temp_filename, filename, f1, base_merge_rev1, f2,
+    status = merge (temp_filename, finfo->file, f1, base_merge_rev1, f2,
                    base_merge_rev2);
 
     if (status != 0 && status != 1)
        error (status == -1, status == -1 ? errno : 0,
-              "could not merge differences between %s & %s of `%s'",
-              base_merge_rev1, base_merge_rev2, short_pathname);
+              "could not merge differences between %s & %s of %s",
+              base_merge_rev1, base_merge_rev2, quote (finfo->fullname));
 
     if (last_merge && !noexec)
        error (1, 0,
@@ -2522,7 +2518,7 @@
        if (noexec && !really_quiet)
        {
            cvs_output ("C ", 2);
-           cvs_output (short_pathname, 0);
+           cvs_output (finfo->fullname, 0);
            cvs_output ("\n", 1);
        }
     }
@@ -2530,12 +2526,12 @@
     {
        Node *n;
 
-       if (!xcmp (temp_filename, filename))
+       if (!xcmp (temp_filename, finfo->file))
        {
            if (!quiet)
            {
                cvs_output ("`", 1);
-               cvs_output (short_pathname, 0);
+               cvs_output (finfo->fullname, 0);
                cvs_output ("' already contains the differences between ", 0);
                cvs_output (base_merge_rev1, 0);
                cvs_output (" and ", 5);
@@ -2547,10 +2543,10 @@
        /* This next is a separate case because a join could restore the file
         * to its state at checkout time.
         */
-       if ((n = findnode_fn (ent_list, filename)))
+       if ((n = findnode_fn (finfo->entries, finfo->file)))
        {
            Entnode *e = n->data;
-           char *basefile = make_base_file_name (filename, e->version);
+           char *basefile = make_base_file_name (finfo->file, e->version);
            if (isfile (basefile) && !xcmp (basefile, temp_filename))
                /* The user's file is identical to the base file.
                 * Pretend this merge never happened.
@@ -2572,13 +2568,13 @@
     {
        temp_checkout1 = NULL;
        if (CVS_UNLINK (f1) < 0)
-           error (0, errno, "Failed to remove temp file `%s'", f1);
+           error (0, errno, "Failed to remove temp file %s", quote (f1));
     }
     if (temp_checkout2)
     {
        temp_checkout2 = NULL;
        if (CVS_UNLINK (f2) < 0)
-           error (0, errno, "Failed to remove temp file `%s'", f2);
+           error (0, errno, "Failed to remove temp file %s", quote (f2));
     }
     free (f1);
     free (f2);
@@ -2625,11 +2621,9 @@
 
 
 static void
-client_base_diff (void *data_arg, List *ent_list, const char *short_pathname,
-                 const char *filename)
+client_base_diff (void *data_arg, const struct file_info *finfo)
 {
     struct diff_info *di = data_arg;
-    struct file_info finfo;
     char *ft1, *ft2, *rev1, *rev2, *label1, *label2;
     const char *f1 = NULL, *f2 = NULL;
     bool used_t1 = false, used_t2 = false;
@@ -2678,7 +2672,8 @@
     else if (STREQ (ft1, "DEVNULL"))
        f1 = DEVNULL;
     else
-       error (1, 0, "Server sent unrecognized diff file type (`%s')", ft1);
+       error (1, 0, "Server sent unrecognized diff file type (%s)",
+              quote (ft1));
 
     if (STREQ (ft2, "TEMP"))
     {
@@ -2700,18 +2695,16 @@
     else if (STREQ (ft2, "DEVNULL"))
        f2 = DEVNULL;
     else if (STREQ (ft2, "WORKFILE"))
-       f2 = filename;
+       f2 = finfo->file;
     else
-       error (1, 0, "Server sent unrecognized diff file type (`%s')", ft2);
+       error (1, 0, "Server sent unrecognized diff file type (%s)",
+              quote (ft2));
 
     if ((!used_t1 && temp_checkout1)
        || (!used_t2 && temp_checkout2))
        error (1, 0, "Unused temp files sent from server before Base-diff.");
 
-    finfo.file = filename;
-    finfo.fullname = short_pathname;
-
-    diff_mark_errors (base_diff (&finfo, di->diff_argc, di->diff_argv,
+    diff_mark_errors (base_diff (finfo, di->diff_argc, di->diff_argv,
                                 f1, rev1, label1, f2,
                                 rev2, label2, di->empty_files));
 
@@ -2726,7 +2719,7 @@
        char *tmp = temp_checkout1;
        temp_checkout1 = NULL;
        if (CVS_UNLINK (tmp) < 0)
-           error (0, errno, "Failed to remove temp file `%s'", tmp);
+           error (0, errno, "Failed to remove temp file %s", quote (tmp));
        free (tmp);
     }
     if (temp_checkout2)
@@ -2734,7 +2727,7 @@
        char *tmp = temp_checkout2;
        temp_checkout2 = NULL;
        if (CVS_UNLINK (tmp) < 0)
-           error (0, errno, "Failed to remove temp file `%s'", tmp);
+           error (0, errno, "Failed to remove temp file %s", quote (tmp));
        free (tmp);
     }
 
@@ -2754,10 +2747,9 @@
 
 
 static void
-remove_entry (void *data, List *ent_list, const char *short_pathname,
-              const char *filename)
+remove_entry (void *data, const struct file_info *finfo)
 {
-    Scratch_Entry (ent_list, filename);
+    Scratch_Entry (finfo->entries, finfo->file);
 }
 
 
@@ -2771,17 +2763,16 @@
 
 
 static void
-remove_entry_and_file (void *data, List *ent_list, const char *short_pathname,
-                       const char *filename)
+remove_entry_and_file (void *data, const struct file_info *finfo)
 {
-    Scratch_Entry (ent_list, filename);
+    Scratch_Entry (finfo->entries, finfo->file);
     /* Note that we don't ignore existence_error's here.  The server
        should be sending Remove-entry rather than Removed in cases
        where the file does not exist.  And if the user removes the
        file halfway through a cvs command, we should be printing an
        error.  */
-    if (unlink_file (filename) < 0)
-       error (0, errno, "unable to remove %s", short_pathname);
+    if (unlink_file (finfo->file) < 0)
+       error (0, errno, "unable to remove %s", quote (finfo->fullname));
 }
 
 
@@ -2807,8 +2798,7 @@
 
 
 static void
-set_static (void *data, List *ent_list, const char *short_pathname,
-           const char *filename)
+set_static (void *data, const struct file_info *finfo)
 {
     FILE *fp;
     fp = xfopen (CVSADM_ENTSTAT, "w+");
@@ -2833,8 +2823,7 @@
 
 
 static void
-clear_static (void *data, List *ent_list, const char *short_pathname,
-              const char *filename)
+clear_static (void *data, const struct file_info *finfo)
 {
     if (unlink_file (CVSADM_ENTSTAT) < 0 && ! existence_error (errno))
         error (1, errno, "cannot remove file %s", CVSADM_ENTSTAT);
@@ -2858,8 +2847,7 @@
 
 
 static void
-set_sticky (void *data, List *ent_list, const char *short_pathname,
-           const char *filename)
+set_sticky (void *data, const struct file_info *finfo)
 {
     char *tagspec;
     FILE *f;
@@ -2919,8 +2907,7 @@
 
 
 static void
-clear_sticky (void *data, List *ent_list, const char *short_pathname,
-              const char *filename)
+clear_sticky (void *data, const struct file_info *finfo)
 {
     if (unlink_file (CVSADM_TAG) < 0 && ! existence_error (errno))
        error (1, errno, "cannot remove %s", CVSADM_TAG);
@@ -2963,10 +2950,9 @@
 
 
 static void
-template (void *data, List *ent_list, const char *short_pathname,
-         const char *filename)
+template (void *data, const struct file_info *finfo)
 {
-    char *buf = Xasprintf ("%s/%s", short_pathname, CVSADM_TEMPLATE);
+    char *buf = Xasprintf ("%s/%s", finfo->update_dir, CVSADM_TEMPLATE);
     read_counted_file (CVSADM_TEMPLATE, buf);
     free (buf);
 }
@@ -2982,8 +2968,7 @@
 
 
 static void
-clear_template (void *data, List *ent_list, const char *short_pathname,
-                const char *filename)
+clear_template (void *data, const struct file_info *finfo)
 {
     if (unlink_file (CVSADM_TEMPLATE) < 0 && ! existence_error (errno))
        error (1, errno, "cannot remove %s", CVSADM_TEMPLATE);
@@ -3297,8 +3282,7 @@
 
 
 static void
-notified_a_file (void *data, List *ent_list, const char *short_pathname,
-                 const char *filename)
+notified_a_file (void *data, const struct file_info *finfo)
 {
     FILE *fp;
     FILE *newf;
@@ -3325,8 +3309,8 @@
        goto error_exit;
     }
     *cp = '\0';
-    if (!STREQ (filename, line + 1))
-       error (0, 0, "protocol error: notified %s, expected %s", filename,
+    if (!STREQ (finfo->file, line + 1))
+       error (0, 0, "protocol error: notified %s, expected %s", finfo->file,
               line + 1);
 
     if (getline (&line, &line_len, fp) < 0)
@@ -3336,7 +3320,7 @@
            free (line);
            if (fclose (fp) < 0)
                error (0, errno, "cannot close %s", CVSADM_NOTIFY);
-           if ( CVS_UNLINK (CVSADM_NOTIFY) < 0)
+           if (CVS_UNLINK (CVSADM_NOTIFY) < 0)
                error (0, errno, "cannot remove %s", CVSADM_NOTIFY);
            return;
        }
@@ -3393,10 +3377,10 @@
 
     return;
   error2:
-    (void)fclose (newf);
+    fclose (newf);
   error_exit:
     free (line);
-    (void)fclose (fp);
+    fclose (fp);
 }
 
 

Index: edit.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/edit.c,v
retrieving revision 1.105
retrieving revision 1.106
diff -u -b -r1.105 -r1.106
--- edit.c      12 Sep 2008 19:55:26 -0000      1.105
+++ edit.c      16 Sep 2008 21:00:20 -0000      1.106
@@ -342,23 +342,21 @@
  * These args could be const but this needs to fit the call_in_directory API.
  */
 void
-edit_file (void *data, List *ent_list, const char *short_pathname,
-          const char *filename)
+edit_file (void *data, const struct file_info *finfo)
 {
     Node *node;
-    struct file_info finfo;
     char *editbasefn, *basefn, *rev;
 
 
-    node = findnode_fn (ent_list, filename);
+    node = findnode_fn (finfo->entries, finfo->file);
 
     /* I'm not sure why this isn't an error.  */
     if (!node) return;
     rev = ((Entnode *) node->data)->version;
 
-    xchmod (filename, 1);
+    xchmod (finfo->file, 1);
     cvs_xmkdir (CVSADM_BASE, NULL, MD_EXIST_OK);
-    basefn = make_base_file_name (filename, rev);
+    basefn = make_base_file_name (finfo->file, rev);
 
     if (!isfile (basefn))
     {
@@ -368,28 +366,24 @@
         */
        if (!quiet)
        {
-           error (0, 0, "Base revision (%s) for `%s' is missing.",
-                  rev, short_pathname);
-           error (0, 0, "Using `%s' to create unedit fallback.",
-                  short_pathname);
+           error (0, 0, "Base revision (%s) for %s is missing.",
+                  rev, quote (finfo->fullname));
+           error (0, 0, "Using %s to create unedit fallback.",
+                  quote (finfo->fullname));
        }
 
        free (basefn);
-       basefn = xstrdup (filename);
+       basefn = xstrdup (finfo->file);
     }
 
-    editbasefn = Xasprintf ("%s/%s", CVSADM_BASE, filename);
+    editbasefn = Xasprintf ("%s/%s", CVSADM_BASE, finfo->file);
     if (isfile (editbasefn))
        xchmod (editbasefn, true);
     copy_file (basefn, editbasefn);
     free (basefn);
     free (editbasefn);
 
-    finfo.file = filename;
-    finfo.fullname = short_pathname;
-    finfo.update_dir = dir_name (short_pathname);
-    base_register (finfo.update_dir, finfo.file, rev);
-    free ((char *)finfo.update_dir);
+    base_register (finfo->update_dir, finfo->file, rev);
 }
 
 
@@ -481,7 +475,7 @@
        server_edit_file (finfo);
     else
 #endif /* SERVER_SUPPORT */
-       edit_file (NULL, finfo->entries, finfo->fullname, finfo->file);
+       edit_file (NULL, finfo);
 
     return 0;
 }
@@ -749,9 +743,8 @@
                error (0, 0, "run update to complete the unedit");
                return 0;
            }
-           Register (finfo->entries, finfo->file, baserev, entdata->timestamp,
-                     entdata->options, entdata->tag, entdata->date,
-                     entdata->conflict);
+           Register (finfo, baserev, entdata->timestamp, entdata->options,
+                     entdata->tag, entdata->date, entdata->conflict);
        }
        free (baserev);
        base_deregister (finfo->update_dir, finfo->file);

Index: edit.h
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/edit.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -b -r1.15 -r1.16
--- edit.h      25 Jan 2008 07:17:34 -0000      1.15
+++ edit.h      16 Sep 2008 21:00:21 -0000      1.16
@@ -17,7 +17,8 @@
 #ifndef EDIT_H
 #define EDIT_H
 
-#include "hash.h"
+/* CVS */
+#include "rcs.h"
 
 
 
@@ -51,7 +52,6 @@
 
 void editors_output (const char *fullname, const char *them);
 
-void edit_file (void *data, List *ent_list, const char *short_pathname,
-               const char *filename);
+void edit_file (void *data, const struct file_info *finfo);
 
 #endif /* EDIT_H */

Index: entries.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/entries.c,v
retrieving revision 1.75
retrieving revision 1.76
diff -u -b -r1.75 -r1.76
--- entries.c   20 Dec 2007 16:09:25 -0000      1.75
+++ entries.c   16 Sep 2008 21:00:21 -0000      1.76
@@ -21,7 +21,7 @@
 # include <config.h>
 #endif
 
-/* Validate API.  */
+/* Validate API */
 #include "entries.h"
 
 /* GNULIB */
@@ -353,7 +353,7 @@
  * removing the old entry first, if necessary.
  */
 void
-Register (List *list, const char *fname, const char *vn, const char *ts,
+Register (const struct file_info *finfo, const char *vn, const char *ts,
          const char *options, const char *tag, const char *date,
          const char *ts_conflict)
 {
@@ -361,27 +361,25 @@
     Node *node;
 
     TRACE (TRACE_FUNCTION, "Register(%s, %s, %s%s%s, %s, %s %s)",
-          fname, vn, ts ? ts : "",
+          finfo->fullname, vn, ts ? ts : "",
           ts_conflict ? "+" : "", ts_conflict ? ts_conflict : "",
           options, tag ? tag : "", date ? date : "");
 
 #ifdef SERVER_SUPPORT
     if (server_active)
-    {
-       server_register (fname, vn, ts, options, tag, date, ts_conflict);
-    }
+       server_register (finfo->file, vn, ts, options, tag, date, ts_conflict);
 #endif
 
-    entnode = Entnode_Create (ENT_FILE, fname, vn, ts, options, tag, date,
-                             ts_conflict);
-    node = AddEntryNode (list, entnode);
+    entnode = Entnode_Create (ENT_FILE, finfo->file, vn, ts, options, tag,
+                             date, ts_conflict);
+    node = AddEntryNode (finfo->entries, entnode);
 
     if (!noexec)
     {
        entfilename = CVSADM_ENTLOG;
        entfile = CVS_FOPEN (entfilename, "a");
 
-       if (entfile == NULL)
+       if (!entfile)
        {
            /* Warning, not error, as in write_entries.  */
            /* FIXME-update-dir: should be including update_dir in message.  */

Index: entries.h
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/entries.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- entries.h   12 Sep 2007 02:45:22 -0000      1.3
+++ entries.h   16 Sep 2008 21:00:21 -0000      1.4
@@ -19,11 +19,14 @@
 #ifndef ENTRIES_H
 #define ENTRIES_H
 
-/* ANSI C */
+/* Standards */
 #include <stdbool.h>
 
 /* CVS */
 #include "hash.h"
+#include "rcs.h"
+
+
 
 /* The type of an entnode.  */
 enum ent_type
@@ -54,7 +57,7 @@
 List *Entries_Open_Dir (int aflag, const char *update_dir, const char *dir);
 List *Entries_Open (int aflag, const char *update_dir);
 
-void Register (List *list, const char *fname, const char *vn,
+void Register (const struct file_info *finfo, const char *vn,
               const char *ts, const char *options, const char *tag,
               const char *date, const char *ts_conflict);
 

Index: no_diff.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/no_diff.c,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -b -r1.40 -r1.41
--- no_diff.c   12 Sep 2007 17:27:23 -0000      1.40
+++ no_diff.c   16 Sep 2008 21:00:21 -0000      1.41
@@ -82,8 +82,7 @@
     {
        /* no difference was found, so fix the entries file */
        ts = time_stamp (finfo->file);
-       Register (finfo->entries, finfo->file,
-                 vers->vn_user ? vers->vn_user : vers->vn_rcs, ts,
+       Register (finfo, vers->vn_user ? vers->vn_user : vers->vn_rcs, ts,
                  options, vers->tag, vers->date, NULL);
 #ifdef SERVER_SUPPORT
        if (server_active)

Index: remove.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/remove.c,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -b -r1.65 -r1.66
--- remove.c    15 Sep 2008 16:38:12 -0000      1.65
+++ remove.c    16 Sep 2008 21:00:21 -0000      1.66
@@ -157,7 +157,7 @@
 remove_force_fileproc (void *callerdat, struct file_info *finfo)
 {
     if (CVS_UNLINK (finfo->file) < 0 && ! existence_error (errno))
-       error (0, errno, "unable to remove %s", finfo->fullname);
+       error (0, errno, "unable to remove %s", quote (finfo->fullname));
     return 0;
 }
 
@@ -176,10 +176,9 @@
     {
        if (!noexec)
        {
-           if ( CVS_UNLINK (finfo->file) < 0 && ! existence_error (errno))
-           {
-               error (0, errno, "unable to remove %s", finfo->fullname);
-           }
+           if (CVS_UNLINK (finfo->file) < 0 && !existence_error (errno))
+               error (0, errno, "unable to remove %s",
+                      quote (finfo->fullname));
        }
        /* else FIXME should probably act as if the file doesn't exist
           in doing the following checks.  */
@@ -253,21 +252,20 @@
     }
     else
     {
-       char *fname;
-
        /* Re-register it with a negative version number.  */
-       fname = Xasprintf ("-%s", vers->vn_user);
-       Register (finfo->entries, finfo->file, fname, vers->ts_rcs,
-                 vers->options, vers->tag, vers->date, vers->ts_conflict);
+       char *dver = Xasprintf ("-%s", vers->vn_user);
+       Register (finfo, dver, vers->ts_rcs, vers->options, vers->tag,
+                 vers->date, vers->ts_conflict);
        if (!quiet)
-           error (0, 0, "scheduling `%s' for removal", finfo->fullname);
+           error (0, 0, "scheduling %s for removal", quote (finfo->fullname));
        removed_files++;
 
 #ifdef SERVER_SUPPORT
        if (server_active)
-           server_checked_in (finfo->file, finfo->update_dir, 
finfo->repository);
+           server_checked_in (finfo->file, finfo->update_dir,
+                              finfo->repository);
 #endif
-       free (fname);
+       free (dver);
     }
 
     freevers_ts (&vers);

Index: sanity.sh
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/sanity.sh,v
retrieving revision 1.1202
retrieving revision 1.1203
diff -u -b -r1.1202 -r1.1203
--- sanity.sh   15 Sep 2008 16:38:12 -0000      1.1202
+++ sanity.sh   16 Sep 2008 21:00:22 -0000      1.1203
@@ -17307,14 +17307,14 @@
          # below happens on Cygwin under Windows, where write privileges
          # aren't enforced properly.
          if $remote; then
-           dotest errmsg1-168r "${testcvs} -q update" \
-"${SPROG} update: \`foo' is no longer in the repository
-$CPROG update: unable to remove foo: Permission denied" \
-"${SPROG} update: \`foo' is no longer in the repository"
+           dotest errmsg1-168r "$testcvs -q update" \
+"$SPROG update: \`foo' is no longer in the repository
+$CPROG update: unable to remove \`foo': Permission denied" \
+"$SPROG update: \`foo' is no longer in the repository"
          else
            dotest errmsg1-168 "${testcvs} -q update" \
 "${SPROG} update: \`foo' is no longer in the repository
-${SPROG} update: unable to remove foo: Permission denied" \
+${SPROG} update: unable to remove \`foo': Permission denied" \
 "${SPROG} update: \`foo' is no longer in the repository"
          fi
 

Index: server.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/server.c,v
retrieving revision 1.484
retrieving revision 1.485
diff -u -b -r1.484 -r1.485
--- server.c    15 Sep 2008 21:48:57 -0000      1.484
+++ server.c    16 Sep 2008 21:00:23 -0000      1.485
@@ -8440,7 +8440,8 @@
 
 
 void
-server_base_diff (struct file_info *finfo, const char *f1, const char *rev1,
+server_base_diff (const struct file_info *finfo,
+                 const char *f1, const char *rev1,
                  const char *label1, const char *f2, const char *rev2,
                  const char *label2)
 {

Index: server.h
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/server.h,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -b -r1.50 -r1.51
--- server.h    28 Oct 2007 17:44:17 -0000      1.50
+++ server.h    16 Sep 2008 21:00:23 -0000      1.51
@@ -277,7 +277,7 @@
 void server_base_merge (struct file_info *finfo, const char *rev1,
                        const char *rev2);
 void server_base_signatures (struct file_info *finfo, const char *rev);
-void server_base_diff (struct file_info *finfo, const char *f1,
+void server_base_diff (const struct file_info *finfo, const char *f1,
                       const char *rev1, const char *label1, const char *f2,
                       const char *rev2, const char *label2);
 bool server_use_bases (void);

Index: update.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/update.c,v
retrieving revision 1.281
retrieving revision 1.282
diff -u -b -r1.281 -r1.282
--- update.c    10 Sep 2008 16:29:20 -0000      1.281
+++ update.c    16 Sep 2008 21:00:23 -0000      1.282
@@ -729,8 +729,7 @@
                         else
                         {
                             /* Reregister to clear conflict flag. */
-                            Register (finfo->entries, finfo->file, 
-                                      vers->vn_rcs, vers->ts_rcs,
+                            Register (finfo, vers->vn_rcs, vers->ts_rcs,
                                       vers->options, vers->tag,
                                       vers->date, NULL);
                         }
@@ -1188,7 +1187,7 @@
     }
 #endif
     if (unlink_file (finfo->file) < 0 && ! existence_error (errno))
-       error (0, errno, "unable to remove %s", finfo->fullname);
+       error (0, errno, "unable to remove %s", quote (finfo->fullname));
     else if (!server_active)
     {
        /* skip this step when the server is running since
@@ -1387,8 +1386,7 @@
                }
            }
            else
-               Register (finfo->entries, finfo->file,
-                         adding ? "0" : xvers_ts->vn_rcs,
+               Register (finfo, adding ? "0" : xvers_ts->vn_rcs,
                          xvers_ts->ts_user, xvers_ts->options,
                          xvers_ts->tag, xvers_ts->date,
                          NULL); /* Clear conflict flag on fresh checkout */
@@ -1713,8 +1711,7 @@
        if (STREQ (xvers_ts->options, "-V4"))
            xvers_ts->options[0] = '\0';
 
-       Register (finfo->entries, finfo->file, xvers_ts->vn_rcs,
-                 xvers_ts->ts_user, xvers_ts->options,
+       Register (finfo, xvers_ts->vn_rcs, xvers_ts->ts_user, xvers_ts->options,
                  xvers_ts->tag, xvers_ts->date, NULL);
 
        if (stat (finfo->file, file_info) < 0)
@@ -1853,8 +1850,7 @@
        time (&last_register_time);
        cp = time_stamp (finfo->file);
     }
-    Register (finfo->entries, finfo->file,
-             vers->vn_rcs && !force_addition ? vers->vn_rcs : "0",
+    Register (finfo, vers->vn_rcs && !force_addition ? vers->vn_rcs : "0",
              "Result of merge", vers->options, vers->tag, vers->date, cp);
     if (cp)
        free (cp);
@@ -1897,7 +1893,7 @@
     backup = Xasprintf ("%s%s.%s", BAKPREFIX, finfo->file, vers->vn_user);
 
     if (unlink_file (backup) && !existence_error (errno))
-       error (0, errno, "unable to remove %s", backup);
+       error (0, errno, "unable to remove %s", quote (backup));
     copy_file (finfo->file, backup);
     xchmod (finfo->file, 1);
 
@@ -2275,9 +2271,8 @@
            else
                cp = xstrdup (vers->ts_user);
 
-           Register (finfo->entries, finfo->file, vers->vn_user,
-                     "Result of merge", vers->options, vers->tag, vers->date,
-                     cp);
+           Register (finfo, vers->vn_user, "Result of merge", vers->options,
+                     vers->tag, vers->date, cp);
            write_letter (finfo, 'C');
            free (cp);
 
@@ -2313,8 +2308,8 @@
                            NULL, NULL);
        }
 #endif
-       Register (finfo->entries, finfo->file, mrev, vers->ts_rcs,
-                 vers->options, vers->tag, vers->date, vers->ts_conflict);
+       Register (finfo, mrev, vers->ts_rcs, vers->options, vers->tag,
+                 vers->date, vers->ts_conflict);
        free (mrev);
        /* We need to check existence_error here because if we are
            running as the server, and the file is up to date in the
@@ -2414,8 +2409,8 @@
            temp_copy (finfo, "ny", tempfile);
            free (tempfile);
 
-           Register (finfo->entries, finfo->file, "0",
-                     "Result of merge", NULL, vers->tag, vers->date, NULL);
+           Register (finfo, "0", "Result of merge", NULL, vers->tag,
+                     vers->date, NULL);
 #ifdef SERVER_SUPPORT
            if (server_active)
                /* No need to create a backup for an addition - if the file




reply via email to

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