diff options
author | eadler <eadler@FreeBSD.org> | 2013-06-15 20:29:07 +0000 |
---|---|---|
committer | eadler <eadler@FreeBSD.org> | 2013-06-15 20:29:07 +0000 |
commit | bf7c0f2705c32e44d3c3b62d60453a30dbbffe3f (patch) | |
tree | dca088b474d4fedf5e6d4ef16e823d7756d587bc /contrib/cvs/src/no_diff.c | |
parent | b95c459e182fd072e6dac884c7eed86a220534e7 (diff) | |
download | FreeBSD-src-bf7c0f2705c32e44d3c3b62d60453a30dbbffe3f.zip FreeBSD-src-bf7c0f2705c32e44d3c3b62d60453a30dbbffe3f.tar.gz |
Remove CVS from the base system.
Discussed with: many
Reviewed by: peter, zi
Approved by: core
Diffstat (limited to 'contrib/cvs/src/no_diff.c')
-rw-r--r-- | contrib/cvs/src/no_diff.c | 101 |
1 files changed, 0 insertions, 101 deletions
diff --git a/contrib/cvs/src/no_diff.c b/contrib/cvs/src/no_diff.c deleted file mode 100644 index 45847a1..0000000 --- a/contrib/cvs/src/no_diff.c +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright (C) 1986-2005 The Free Software Foundation, Inc. - * - * Portions Copyright (C) 1998-2005 Derek Price, Ximbiot <http://ximbiot.com>, - * and others. - * - * Portions Copyright (C) 1992, Brian Berliner and Jeff Polk - * Portions Copyright (C) 1989-1992, Brian Berliner - * - * You may distribute under the terms of the GNU General Public License as - * specified in the README file that comes with the CVS source distribution. - * - * No Difference - * - * The user file looks modified judging from its time stamp; however it needn't - * be. No_Difference() finds out whether it is or not. If it is not, it - * updates the administration. - * - * returns 0 if no differences are found and non-zero otherwise - */ - -#include "cvs.h" -#include <assert.h> - -int -No_Difference (finfo, vers) - struct file_info *finfo; - Vers_TS *vers; -{ - Node *p; - int ret; - char *ts, *options; - int retcode = 0; - char *tocvsPath; - - /* If ts_user is "Is-modified", we can only conclude the files are - different (since we don't have the file's contents). */ - if (vers->ts_user != NULL - && strcmp (vers->ts_user, "Is-modified") == 0) - return -1; - - if (!vers->srcfile || !vers->srcfile->path) - return (-1); /* different since we couldn't tell */ - -#ifdef PRESERVE_PERMISSIONS_SUPPORT - /* If special files are in use, then any mismatch of file metadata - information also means that the files should be considered different. */ - if (preserve_perms && special_file_mismatch (finfo, vers->vn_user, NULL)) - return 1; -#endif - - if (vers->entdata && vers->entdata->options) - options = xstrdup (vers->entdata->options); - else - options = xstrdup (""); - - tocvsPath = wrap_tocvs_process_file (finfo->file); - retcode = RCS_cmp_file( vers->srcfile, vers->vn_user, (char **)NULL, - (char *)NULL, options, - tocvsPath == NULL ? finfo->file : tocvsPath ); - if (retcode == 0) - { - /* 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, - options, vers->tag, vers->date, (char *) 0); -#ifdef SERVER_SUPPORT - if (server_active) - { - /* We need to update the entries line on the client side. */ - server_update_entries - (finfo->file, finfo->update_dir, finfo->repository, SERVER_UPDATED); - } -#endif - free (ts); - - /* update the entdata pointer in the vers_ts structure */ - p = findnode (finfo->entries, finfo->file); - assert (p); - vers->entdata = p->data; - - ret = 0; - } - else - ret = 1; /* files were really different */ - - if (tocvsPath) - { - /* Need to call unlink myself because the noexec variable - * has been set to 1. */ - if (trace) - (void) fprintf (stderr, "%s-> unlink (%s)\n", - CLIENT_SERVER_STR, tocvsPath); - if ( CVS_UNLINK (tocvsPath) < 0) - error (0, errno, "could not remove %s", tocvsPath); - } - - free (options); - return (ret); -} |