summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorJoris Vink <joris@cvs.openbsd.org>2008-02-09 14:03:21 +0000
committerJoris Vink <joris@cvs.openbsd.org>2008-02-09 14:03:21 +0000
commitc7228a1903a177a51210df19d874e0e1b2de6a21 (patch)
treefdc9cc203d541f4d12946209c3ccef31c078e024 /usr.bin
parent138924ed53f662e659d3a013552fd6b48793259d (diff)
- always remove the additional .0 from magic branches, even when
running the log command. - change getlog.c so it will add any .0 for magic branches in its output if required less confusing for rcs_translate_tag();
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/cvs/getlog.c8
-rw-r--r--usr.bin/cvs/rcs.h5
-rw-r--r--usr.bin/cvs/rcsnum.c7
3 files changed, 8 insertions, 12 deletions
diff --git a/usr.bin/cvs/getlog.c b/usr.bin/cvs/getlog.c
index 3a55d986c10..4ed1f3d9ee7 100644
--- a/usr.bin/cvs/getlog.c
+++ b/usr.bin/cvs/getlog.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: getlog.c,v 1.84 2008/02/04 21:25:32 tobias Exp $ */
+/* $OpenBSD: getlog.c,v 1.85 2008/02/09 14:03:20 joris Exp $ */
/*
* Copyright (c) 2005, 2006 Xavier Santolaria <xsa@openbsd.org>
* Copyright (c) 2006 Joris Vink <joris@openbsd.org>
@@ -35,7 +35,7 @@ void cvs_log_local(struct cvs_file *);
static void log_rev_print(struct rcs_delta *);
int runflags = 0;
-char *logrev = NULL;
+char *logrev = NULL;
char *slist = NULL;
char *wlist = NULL;
@@ -66,7 +66,6 @@ cvs_getlog(int argc, char **argv)
char *arg = ".";
struct cvs_recursion cr;
- rcsnum_flags |= RCSNUM_NO_MAGIC;
flags = CR_RECURSE_DIRS;
while ((ch = getopt(argc, argv, cvs_cmdop == CVS_OP_LOG ?
@@ -245,6 +244,9 @@ cvs_log_local(struct cvs_file *cf)
if (!(runflags & L_NOTAGS)) {
cvs_printf("symbolic names:\n");
TAILQ_FOREACH(sym, &(cf->file_rcs->rf_symbols), rs_list) {
+ if (RCSNUM_ISBRANCH(sym->rs_num))
+ rcsnum_addmagic(sym->rs_num);
+
cvs_printf("\t%s: %s\n", sym->rs_name,
rcsnum_tostr(sym->rs_num, numb, sizeof(numb)));
}
diff --git a/usr.bin/cvs/rcs.h b/usr.bin/cvs/rcs.h
index 259793cc228..7b7b3c3999f 100644
--- a/usr.bin/cvs/rcs.h
+++ b/usr.bin/cvs/rcs.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: rcs.h,v 1.86 2008/01/31 22:19:36 tobias Exp $ */
+/* $OpenBSD: rcs.h,v 1.87 2008/02/09 14:03:20 joris Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -105,7 +105,6 @@ struct rcs_kw {
#define RCSNUM_ISBRANCH(n) ((n)->rn_len % 2)
#define RCSNUM_ISBRANCHREV(n) (!((n)->rn_len % 2) && ((n)->rn_len >= 4))
-#define RCSNUM_NO_MAGIC (1<<0)
/* file flags */
#define RCS_READ (1<<0)
@@ -288,6 +287,4 @@ void rcsnum_cpy(const RCSNUM *, RCSNUM *, u_int);
int rcsnum_cmp(RCSNUM *, RCSNUM *, u_int);
int rcsnum_differ(RCSNUM *, RCSNUM *);
-extern int rcsnum_flags;
-
#endif /* RCS_H */
diff --git a/usr.bin/cvs/rcsnum.c b/usr.bin/cvs/rcsnum.c
index d468207645c..62bf2b2e7d7 100644
--- a/usr.bin/cvs/rcsnum.c
+++ b/usr.bin/cvs/rcsnum.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rcsnum.c,v 1.50 2008/01/31 22:19:36 tobias Exp $ */
+/* $OpenBSD: rcsnum.c,v 1.51 2008/02/09 14:03:20 joris Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -32,8 +32,6 @@
static void rcsnum_setsize(RCSNUM *, u_int);
static char *rcsnum_itoa(u_int16_t, char *, size_t);
-int rcsnum_flags;
-
/*
* rcsnum_alloc()
*
@@ -287,8 +285,7 @@ rcsnum_aton(const char *str, char **ep, RCSNUM *nump)
* completely insane and not understandable reason in that output.
*
*/
- if (nump->rn_len > 2 && nump->rn_id[nump->rn_len - 1] == 0
- && !(rcsnum_flags & RCSNUM_NO_MAGIC)) {
+ if (nump->rn_len > 2 && nump->rn_id[nump->rn_len - 1] == 0) {
/*
* Look for ".0.x" at the end of the branch number.
*/