Git development
 help / color / mirror / Atom feed
From: Martin Langhoff <martin@catalyst.net.nz>
To: git@vger.kernel.org
Cc: Martin Langhoff <martin@catalyst.net.nz>
Subject: [PATCH] cvsimport: introduce -P <cvsps-output-file> option
Date: Wed, 2 Nov 2005 13:48:47 +1300	[thread overview]
Message-ID: <11308925271764-git-send-email-martin@catalyst.net.nz> (raw)
In-Reply-To: 

-P:: <cvsps-output-file>
       Instead of calling cvsps, read the provided cvsps output file. Useful
       for debugging or when cvsps is being handled outside cvsimport.

Signed-off-by: Martin Langhoff <martin@catalyst.net.nz>


---

 Documentation/git-cvsimport.txt |    4 ++++
 git-cvsimport.perl              |   12 ++++++++----
 2 files changed, 12 insertions(+), 4 deletions(-)

applies-to: a0f3f0cdfb22033b0dd52a0abc7c5cebfc17e56d
16f5165e7258fcd0dc209f7eb4e85d4222ecaaa4
diff --git a/Documentation/git-cvsimport.txt b/Documentation/git-cvsimport.txt
index f5248c9..a2f97b3 100644
--- a/Documentation/git-cvsimport.txt
+++ b/Documentation/git-cvsimport.txt
@@ -60,6 +60,10 @@ the old cvs2git tool.
 +
 If you need to pass multiple options, separate them with a comma.
 
+-P:: <cvsps-output-file>
+	Instead of calling cvsps, read the provided cvsps output file. Useful
+	for debugging or when cvsps is being handled outside cvsimport.
+
 -m::    
 	Attempt to detect merges based on the commit message. This option
 	will enable default regexes that try to capture the name source 
diff --git a/git-cvsimport.perl b/git-cvsimport.perl
index e3cad5a..0144670 100755
--- a/git-cvsimport.perl
+++ b/git-cvsimport.perl
@@ -29,7 +29,7 @@ use IPC::Open2;
 $SIG{'PIPE'}="IGNORE";
 $ENV{'TZ'}="UTC";
 
-our($opt_h,$opt_o,$opt_v,$opt_k,$opt_u,$opt_d,$opt_p,$opt_C,$opt_z,$opt_i,$opt_s,$opt_m,$opt_M);
+our($opt_h,$opt_o,$opt_v,$opt_k,$opt_u,$opt_d,$opt_p,$opt_C,$opt_z,$opt_i,$opt_P, $opt_s,$opt_m,$opt_M);
 
 sub usage() {
 	print STDERR <<END;
@@ -41,7 +41,7 @@ END
 	exit(1);
 }
 
-getopts("hivmkuo:d:p:C:z:s:M:") or usage();
+getopts("hivmkuo:d:p:C:z:s:M:P:") or usage();
 usage if $opt_h;
 
 @ARGV <= 1 or usage();
@@ -494,8 +494,12 @@ unless($pid) {
 	unless (defined($opt_p) && $opt_p =~ m/--no-cvs-direct/) {
 		push @opt, '--cvs-direct';
 	}
-	exec("cvsps",@opt,"-u","-A",'--root',$opt_d,$cvs_tree);
-	die "Could not start cvsps: $!\n";
+	if ($opt_P) {
+	    exec("cat", $opt_P);
+	} else {
+	    exec("cvsps",@opt,"-u","-A",'--root',$opt_d,$cvs_tree);
+	    die "Could not start cvsps: $!\n";
+	}
 }
 
 
---
0.99.8.GIT

                 reply	other threads:[~2005-11-02  0:45 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=11308925271764-git-send-email-martin@catalyst.net.nz \
    --to=martin@catalyst.net.nz \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox