You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by da...@apache.org on 2013/07/08 16:32:28 UTC

svn commit: r1500767 - /subversion/trunk/tools/dist/backport.pl

Author: danielsh
Date: Mon Jul  8 14:32:28 2013
New Revision: 1500767

URL: http://svn.apache.org/r1500767
Log:
backport.pl: Add a 'show logs' feature.

Suggested by: stsp

* tools/dist/backport.pl
  (usage): Document it.
  (handle_entry): Implement it.

Modified:
    subversion/trunk/tools/dist/backport.pl

Modified: subversion/trunk/tools/dist/backport.pl
URL: http://svn.apache.org/viewvc/subversion/trunk/tools/dist/backport.pl?rev=1500767&r1=1500766&r2=1500767&view=diff
==============================================================================
--- subversion/trunk/tools/dist/backport.pl (original)
+++ subversion/trunk/tools/dist/backport.pl Mon Jul  8 14:32:28 2013
@@ -76,6 +76,7 @@ At a prompt, you have the following opti
 
 y:   Run a merge.  It will not be committed.
      WARNING: This will run 'update' and 'revert -R ./'.
+l:   Show logs for the entries being nominated.
 q:   Quit the "for each nomination" loop.
 ±1:  Enter a +1 or -1 vote
      You will be prompted to commit your vote at the end.
@@ -499,7 +500,7 @@ sub handle_entry {
 
     # See above for why the while(1).
     QUESTION: while (1) {
-    given (prompt 'Run a merge? [y,±1,±0,q,e,a, ,N] ',
+    given (prompt 'Run a merge? [y,l,±1,±0,q,e,a, ,N] ',
                    verbose => 1, extra => qr/[+-]/) {
       when (/^y/i) {
         merge %entry;
@@ -520,6 +521,20 @@ sub handle_entry {
         }
         # NOTREACHED
       }
+      when (/^l/i) {
+        if ($entry{branch}) {
+            system "$SVN log --stop-on-copy -v -r 0:HEAD -- "
+                   ."$BRANCHES/$entry{branch} "
+                   ."| $PAGER";
+        } elsif (@{$entry{revisions}}) {
+            system "$SVN log ".(join ' ', map { "-r$_" } @{$entry{revisions}})
+                   ." -- ^/subversion | $PAGER";
+        } else {
+            die "Assertion failed: entry has neither branch nor revisions:\n",
+                '[[[', (join ';;', %entry), ']]]';
+        }
+        next PROMPT;
+      }
       when (/^q/i) {
         exit_stage_left $state, $approved, $votes;
       }