diff options
author | Joris Vink <joris@cvs.openbsd.org> | 2007-09-24 13:44:21 +0000 |
---|---|---|
committer | Joris Vink <joris@cvs.openbsd.org> | 2007-09-24 13:44:21 +0000 |
commit | 8037ac3ded3ce72cf87a0cb8fa461ac5c7ae8f21 (patch) | |
tree | c2a9ad95371091ec02d9244d655879678087de07 /usr.bin/cvs/rcsnum.c | |
parent | c74680a1fb108d4dc71e6c5def27ec8ef27bbc5a (diff) |
add support to commit modified files to branches.
Diffstat (limited to 'usr.bin/cvs/rcsnum.c')
-rw-r--r-- | usr.bin/cvs/rcsnum.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/usr.bin/cvs/rcsnum.c b/usr.bin/cvs/rcsnum.c index 50e2978323f..f8467d612f7 100644 --- a/usr.bin/cvs/rcsnum.c +++ b/usr.bin/cvs/rcsnum.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rcsnum.c,v 1.46 2007/09/04 17:57:41 tobias Exp $ */ +/* $OpenBSD: rcsnum.c,v 1.47 2007/09/24 13:44:20 joris Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -389,6 +389,20 @@ rcsnum_brtorev(const RCSNUM *brnum) return (num); } +RCSNUM * +rcsnum_branch_root(RCSNUM *brev) +{ + RCSNUM *root; + + if (!RCSNUM_ISBRANCHREV(brev)) + fatal("rcsnum_branch_root: no revision on branch specified"); + + root = rcsnum_alloc(); + rcsnum_cpy(brev, root, 0); + root->rn_len -= 2; + return (root); +} + static void rcsnum_setsize(RCSNUM *num, u_int len) { |