diff options
author | Junio C Hamano <junkio@cox.net> | 2007-05-29 00:37:23 -0700 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2007-05-29 00:37:23 -0700 |
commit | 9953a00ef26386e16bc12d10669f41596c8ab3c6 (patch) | |
tree | a809f50926f2b247c53de1c746b8fe6886a99436 | |
parent | 79d5576a4f2eada820802d2e7e19226e54f9de5d (diff) | |
parent | e5d80641d7b17b6943d54c729fbbd0bc5a8fe84d (diff) | |
download | git-9953a00ef26386e16bc12d10669f41596c8ab3c6.tar.gz git-9953a00ef26386e16bc12d10669f41596c8ab3c6.tar.xz |
Merge branch 'rr/cvsexport'
* rr/cvsexport:
Add option to cvs update before export
-rw-r--r-- | Documentation/git-cvsexportcommit.txt | 5 | ||||
-rwxr-xr-x | git-cvsexportcommit.perl | 8 |
2 files changed, 10 insertions, 3 deletions
diff --git a/Documentation/git-cvsexportcommit.txt b/Documentation/git-cvsexportcommit.txt index fd7f54093..da5c24224 100644 --- a/Documentation/git-cvsexportcommit.txt +++ b/Documentation/git-cvsexportcommit.txt @@ -8,7 +8,7 @@ git-cvsexportcommit - Export a single commit to a CVS checkout 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 @@ -58,6 +58,9 @@ OPTIONS Prepend the commit message with the provided prefix. Useful for patch series and the like. +-u:: + Update affected files from cvs repository before attempting export. + -v:: Verbose. diff --git a/git-cvsexportcommit.perl b/git-cvsexportcommit.perl index d6ae99b8c..42060ef6e 100755 --- a/git-cvsexportcommit.perl +++ b/git-cvsexportcommit.perl @@ -15,9 +15,9 @@ unless ($ENV{GIT_DIR} && -r $ENV{GIT_DIR}){ 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(); @@ -178,6 +178,10 @@ foreach my $f (@files) { my %cvsstat; if (@canstatusfiles) { + if ($opt_u) { + my @updated = safe_pipe_capture(@cvs, 'update', @canstatusfiles); + print @updated; + } my @cvsoutput; @cvsoutput= safe_pipe_capture(@cvs, 'status', @canstatusfiles); my $matchcount = 0; |