summaryrefslogtreecommitdiff
path: root/usr.bin/cvs/rcsnum.c
diff options
context:
space:
mode:
authorTobias Stoeckmann <tobias@cvs.openbsd.org>2008-01-10 09:39:33 +0000
committerTobias Stoeckmann <tobias@cvs.openbsd.org>2008-01-10 09:39:33 +0000
commit6f6131c147f71ea44b9fd37a07ed33e84a95b0fc (patch)
tree8f7eb6f2fcd2c5fa7177da751c58a3783dd0aae9 /usr.bin/cvs/rcsnum.c
parentac6fcbbef14bd3e4ade42734955fce5a4605ecd7 (diff)
Slap in -b support for tag command. It was missing for a full regress test
as of now.
Diffstat (limited to 'usr.bin/cvs/rcsnum.c')
-rw-r--r--usr.bin/cvs/rcsnum.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/usr.bin/cvs/rcsnum.c b/usr.bin/cvs/rcsnum.c
index 59afb640ffb..c757b8c1e35 100644
--- a/usr.bin/cvs/rcsnum.c
+++ b/usr.bin/cvs/rcsnum.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rcsnum.c,v 1.48 2007/12/09 14:02:56 tobias Exp $ */
+/* $OpenBSD: rcsnum.c,v 1.49 2008/01/10 09:39:32 tobias Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -390,6 +390,22 @@ rcsnum_brtorev(const RCSNUM *brnum)
}
RCSNUM *
+rcsnum_new_branch(RCSNUM *rev)
+{
+ RCSNUM *branch;
+
+ if (rev->rn_len > RCSNUM_MAXLEN - 1)
+ return NULL;
+
+ branch = rcsnum_alloc();
+ rcsnum_cpy(rev, branch, 0);
+ rcsnum_setsize(branch, rev->rn_len + 1);
+ branch->rn_id[branch->rn_len - 1] = 2;
+
+ return branch;
+}
+
+RCSNUM *
rcsnum_branch_root(RCSNUM *brev)
{
RCSNUM *root;