summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoris Vink <joris@cvs.openbsd.org>2008-06-10 14:40:55 +0000
committerJoris Vink <joris@cvs.openbsd.org>2008-06-10 14:40:55 +0000
commit56aa115037e5edb6938f54cc7c17092b6a70f175 (patch)
tree1fc98eb1dec0cd756c9b8c50427e02c536ae2b4b
parentb1993589e11a0eec577074f732f036533d7a4362 (diff)
files that have been removed should be passing "NONE" to scripts
as their new revision, so they can be picked up as being removed.
-rw-r--r--usr.bin/cvs/trigger.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/usr.bin/cvs/trigger.c b/usr.bin/cvs/trigger.c
index bcb78b1d401..79082168e39 100644
--- a/usr.bin/cvs/trigger.c
+++ b/usr.bin/cvs/trigger.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trigger.c,v 1.10 2008/06/10 05:01:36 tobias Exp $ */
+/* $OpenBSD: trigger.c,v 1.11 2008/06/10 14:40:54 joris Exp $ */
/*
* Copyright (c) 2008 Tobias Stoeckmann <tobias@openbsd.org>
* Copyright (c) 2008 Jonathan Armani <dbd@asystant.net>
@@ -122,13 +122,8 @@ expand_args(BUF *buf, struct file_info_list *file_info, const char *repo,
case 'l':
case 'S':
case 's':
- if (fi != NULL) {
- val = basename(fi->file_path);
- if (val == NULL) {
- fatal("basename: %s",
- strerror(errno));
- }
- }
+ if (fi != NULL)
+ val = fi->file_path;
break;
case 't':
if (fi != NULL)
@@ -145,8 +140,13 @@ expand_args(BUF *buf, struct file_info_list *file_info, const char *repo,
}
break;
case 'v':
- if (fi != NULL)
- val = fi->nrevstr;
+ if (fi != NULL) {
+ if (fi->nrevstr != NULL &&
+ !strcmp(fi->nrevstr, "Removed"))
+ val = "NONE";
+ else
+ val = fi->nrevstr;
+ }
break;
default:
return 1;