1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-09 10:16:08 +02:00

Add option to cvs update before export

Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Robin Rosenberg 2007-05-24 17:06:55 +02:00 committed by Junio C Hamano
parent 18bece4367
commit e5d80641d7
2 changed files with 10 additions and 3 deletions

View File

@ -8,7 +8,7 @@ git-cvsexportcommit - Export a single commit to a CVS checkout
SYNOPSIS SYNOPSIS
-------- --------
'git-cvsexportcommit' [-h] [-v] [-c] [-P] [-p] [-a] [-d cvsroot] [-f] [-m msgprefix] [PARENTCOMMIT] COMMITID 'git-cvsexportcommit' [-h] [-u] [-v] [-c] [-P] [-p] [-a] [-d cvsroot] [-f] [-m msgprefix] [PARENTCOMMIT] COMMITID
DESCRIPTION DESCRIPTION
@ -58,6 +58,9 @@ OPTIONS
Prepend the commit message with the provided prefix. Prepend the commit message with the provided prefix.
Useful for patch series and the like. Useful for patch series and the like.
-u::
Update affected files from cvs repository before attempting export.
-v:: -v::
Verbose. Verbose.

View File

@ -15,9 +15,9 @@
die "GIT_DIR is not defined or is unreadable"; die "GIT_DIR is not defined or is unreadable";
} }
our ($opt_h, $opt_P, $opt_p, $opt_v, $opt_c, $opt_f, $opt_a, $opt_m, $opt_d); our ($opt_h, $opt_P, $opt_p, $opt_v, $opt_c, $opt_f, $opt_a, $opt_m, $opt_d, $opt_u);
getopts('hPpvcfam:d:'); getopts('uhPpvcfam:d:');
$opt_h && usage(); $opt_h && usage();
@ -178,6 +178,10 @@
my %cvsstat; my %cvsstat;
if (@canstatusfiles) { if (@canstatusfiles) {
if ($opt_u) {
my @updated = safe_pipe_capture(@cvs, 'update', @canstatusfiles);
print @updated;
}
my @cvsoutput; my @cvsoutput;
@cvsoutput= safe_pipe_capture(@cvs, 'status', @canstatusfiles); @cvsoutput= safe_pipe_capture(@cvs, 'status', @canstatusfiles);
my $matchcount = 0; my $matchcount = 0;