{"thread":{"id":"8296","subject":"[PATCH] Add option to cvs update before export","startedAt":"2007-05-24T15:06:55Z","lastAt":"2007-05-25T02:34:32Z","messageCount":2,"participants":["Robin Rosenberg","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"43144","messageId":"20070524150655.15030.13626.stgit@lathund.dewire.com","threadId":"8296","inReplyTo":null,"subject":"[PATCH] Add option to cvs update before export","fromName":"Robin Rosenberg","fromEmail":"robin.rosenberg@dewire.com","sentAt":"2007-05-24T15:06:55Z","receivedAt":"2007-05-24T15:06:55Z","isPatch":true,"sender":{"key":"robin.rosenberg@dewire.com","avatar":"https://avatars.githubusercontent.com/u/46357?v=4"},"body":"Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>\n---\n\n Documentation/git-cvsexportcommit.txt |    5 ++++-\n git-cvsexportcommit.perl              |    8 ++++++--\n 2 files changed, 10 insertions(+), 3 deletions(-)\n\ndiff --git a/Documentation/git-cvsexportcommit.txt b/Documentation/git-cvsexportcommit.txt\nindex fd7f540..da5c242 100644\n--- a/Documentation/git-cvsexportcommit.txt\n+++ b/Documentation/git-cvsexportcommit.txt\n@@ -8,7 +8,7 @@ git-cvsexportcommit - Export a single commit to a CVS checkout\n \n SYNOPSIS\n --------\n-'git-cvsexportcommit' [-h] [-v] [-c] [-P] [-p] [-a] [-d cvsroot] [-f] [-m msgprefix] [PARENTCOMMIT] COMMITID\n+'git-cvsexportcommit' [-h] [-u] [-v] [-c] [-P] [-p] [-a] [-d cvsroot] [-f] [-m msgprefix] [PARENTCOMMIT] COMMITID\n \n \n DESCRIPTION\n@@ -58,6 +58,9 @@ OPTIONS\n \tPrepend the commit message with the provided prefix. \n \tUseful for patch series and the like.\n \n+-u::\n+\tUpdate affected files from cvs repository before attempting export.\n+\n -v::\n \tVerbose.\n \ndiff --git a/git-cvsexportcommit.perl b/git-cvsexportcommit.perl\nindex d6ae99b..42060ef 100755\n--- a/git-cvsexportcommit.perl\n+++ b/git-cvsexportcommit.perl\n@@ -15,9 +15,9 @@ unless ($ENV{GIT_DIR} && -r $ENV{GIT_DIR}){\n     die \"GIT_DIR is not defined or is unreadable\";\n }\n \n-our ($opt_h, $opt_P, $opt_p, $opt_v, $opt_c, $opt_f, $opt_a, $opt_m, $opt_d);\n+our ($opt_h, $opt_P, $opt_p, $opt_v, $opt_c, $opt_f, $opt_a, $opt_m, $opt_d, $opt_u);\n \n-getopts('hPpvcfam:d:');\n+getopts('uhPpvcfam:d:');\n \n $opt_h && usage();\n \n@@ -178,6 +178,10 @@ foreach my $f (@files) {\n \n my %cvsstat;\n if (@canstatusfiles) {\n+    if ($opt_u) {\n+      my @updated = safe_pipe_capture(@cvs, 'update', @canstatusfiles);\n+      print @updated;\n+    }\n     my @cvsoutput;\n     @cvsoutput= safe_pipe_capture(@cvs, 'status', @canstatusfiles);\n     my $matchcount = 0;\n"},{"id":"43213","messageId":"7vmyzttyvb.fsf@assigned-by-dhcp.cox.net","threadId":"8296","inReplyTo":"20070524150655.15030.13626.stgit@lathund.dewire.com","subject":"Re: [PATCH] Add option to cvs update before export","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-05-25T02:34:32Z","receivedAt":"2007-05-25T02:34:32Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Looks good; will queue for 'next'.\n"}]}