git svn dcommit: new option --interactive.
PATCH v3 1/1 git svn dcommit: new option --interactive.
Allow the user to check the patch set before it is commited to SNV. It is then possible to accept/discard one patch, accept all, or quit.
This interactive mode is similar with 'git send email' behaviour. However, 'git svn dcommit' returns as soon as one patch is discarded. Part of the code was taken from git-send-email.perl (see 'ask' function)
Tests several combinations of potential answers to
'git svn dcommit --interactive'. For each of them, test whether patches were commited to SVN or not.
Thanks-to Eric Wong <[email protected]> for the initial idea.
---
Minor change from v2 : rename t9160... to t9162... to avoid name collision
ref: <[email protected]>
Documentation/git-svn.txt | 8 +++ git-svn.perl | 76 +++++++++++++++++++++++++++++++- t/t9162-git-svn-dcommit-interactive.sh | 64 +++++++++++++++++++++++++++ 3 files changed, 147 insertions(+), 1 deletions(-) create mode 100644 t/t9162-git-svn-dcommit-interactive.sh
Documentation/git-svn.txt +8 -0
@@ -234,6 +234,14 @@ svn:mergeinfo property in the SVN repository when possible. Currently, this can only be done when dcommitting non-fast-forward merges where all parents but the first have already been pushed into SVN. +--interactive;; + Ask the user to confirm that a patch set should actually be sent to SVN. + For each patch, one may answer "yes" (accept this patch), "no" (discard this + patch), "all" (accept all patches), or "quit". + + + 'git svn dcommit' returns immediately if answer if "no" or "quit", without + commiting anything to SVN. + 'branch':: Create a branch in the SVN repository.
git-svn.perl +75 -1
106 lines not on this page · raw message
t/t9162-git-svn-dcommit-interactive.sh new file +64 -0
64 lines not on this page · raw message
Signature · 1 line
1.7.7.rc0.200.g2f9e2e
[removed Junio from CC as he doesn't want to know about this patch at this stage]
Quoted 1 line · Frédéric Heitzmann
Allow the user to check the patch set before it is commited to SNV. It is
Typo: SNV -> SVN
My perl-foo isn't strong enough to properly review the rest.
cmn
Quoted 4 lines · Carlos Martín Nieto
Quoted 1 line · Frédéric Heitzmann
Allow the user to check the patch set before it is commited to SNV. It is
Typo: SNV -> SVN
Thanks, fixed locally
Quoted 1 line
My perl-foo isn't strong enough to properly review the rest.
I also squashed the following cleanup:
git-svn.perl +0 -1
@@ -802,7 +802,6 @@ sub cmd_dcommit { if (defined $_interactive){ my $ask_default = "y"; foreach my $d (@$linear_refs){ - print "debug : d = $d\n"; my ($fh, $ctx) = command_output_pipe(qw(show --summary), "$d"); while (<$fh>){ print $_;
Otherwise things good to me. Acked and pushed out to master ofgit://bogomips.org/git-svn.git
Quoted 10 lines · Carlos Martín Nieto
[removed Junio from CC as he doesn't want to know about this patch at this stage]
Quoted 1 line · Frédéric Heitzmann
Allow the user to check the patch set before it is commited to SNV. It is
Typo: SNV -> SVN
My perl-foo isn't strong enough to properly review the rest.
cmn
Thanks.
--
Fred
I am not accepting any new features at this point in the release cycle, so please do not Cc me unless it is a patch to fix regression or minor documentation.
Thanks.