summaryrefslogtreecommitdiffstats
path: root/usr.bin/cvs/file.c
diff options
context:
space:
mode:
authortobias <tobias@openbsd.org>2008-06-09 22:31:24 +0000
committertobias <tobias@openbsd.org>2008-06-09 22:31:24 +0000
commit09d285070149d577da93c686593c5718d71cf760 (patch)
treea5eeaf62f9569bedfa06c460cec16dcbaea23cb0 /usr.bin/cvs/file.c
parentRemove nmeaattch(8), which is superseeded by ldattach(8). (diff)
downloadwireguard-openbsd-09d285070149d577da93c686593c5718d71cf760.tar.xz
wireguard-openbsd-09d285070149d577da93c686593c5718d71cf760.zip
Properly handle merged files and conflicts which may arrise while merge.
Instead of ignoring all files which contain possible conflict markers, only watch out for files which have actually been merged. With input by and ok joris.
Diffstat (limited to 'usr.bin/cvs/file.c')
-rw-r--r--usr.bin/cvs/file.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/usr.bin/cvs/file.c b/usr.bin/cvs/file.c
index eb50da88ad0..a44cea74164 100644
--- a/usr.bin/cvs/file.c
+++ b/usr.bin/cvs/file.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: file.c,v 1.241 2008/06/09 17:05:49 tobias Exp $ */
+/* $OpenBSD: file.c,v 1.242 2008/06/09 22:31:24 tobias Exp $ */
/*
* Copyright (c) 2006 Joris Vink <joris@openbsd.org>
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
@@ -879,7 +879,10 @@ cvs_file_classify(struct cvs_file *cf, const char *tag)
"in the repository but is "
"locally modified",
cf->file_path);
- cf->file_status = FILE_CONFLICT;
+ if (cvs_cmdop == CVS_OP_COMMIT)
+ cf->file_status = FILE_UNLINK;
+ else
+ cf->file_status = FILE_CONFLICT;
} else if (cvs_cmdop != CVS_OP_IMPORT) {
cvs_log(LP_NOTICE,
"%s is no longer in the "
@@ -904,13 +907,15 @@ cvs_file_classify(struct cvs_file *cf, const char *tag)
cf->file_status = FILE_MODIFIED;
else
cf->file_status = FILE_UPTODATE;
-
if (rcsnum_differ(cf->file_ent->ce_rev,
cf->file_rcsrev)) {
if (cf->file_status == FILE_MODIFIED)
cf->file_status = FILE_MERGE;
else
cf->file_status = FILE_PATCH;
+ } else if (cf->file_ent->ce_conflict != NULL &&
+ cf->file_status != FILE_MODIFIED) {
+ cf->file_status = FILE_CONFLICT;
}
}
}