[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

backport.pl - two features for committers' use

From: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Wed, 4 Mar 2015 22:51:14 +0000

Two features of backport.pl that people may not be aware of:

1) backport.pl can automate most of the process of entering a new
nomination.

Here's an example:

[[[
% cd 1.9.x-wc
% ../trunk-wc/tools/dist/nominate.pl r1664080 "Definition should match declaration."
Index: STATUS
===================================================================
--- STATUS (revision 1664162)
+++ STATUS (working copy)
@@ -127,6 +127,13 @@
          strictly a regression as it is no longer possible to determine
          whether the CHECK_LOCKS flag is set on a txn.)
 
+ * r1664080
+ Add missing const to argument.
+ Justification:
+ Definition should match declaration.
+ Votes:
+ +1: danielsh
+
 Veto-blocked changes:
 =====================
 
Commit this nomination? y
Authentication realm: <https://svn.apache.org:443> ASF Committers
Password for 'danielsh':
]]]

nominate.pl wrote the nomination and inserted it in the correct place in
the file. It grabbed my username from ~/.subversion/auth/, the
"Justification" from argv[2] which I provided, and used the first
paragraph of the log message as the first paragraph of the entry.
I just had to type 'y' and the commit would have gone through.

(r1664080 doesn't need to be backported, so I didn't really nominate it;
that was just an example.)

2) backport.pl can be used interactively (on a committers' workstation)
to review nominations.

Example workflow:

[[[
    % cd 1.9.x-wc
    % ../trunk-wc/tools/dist/backport.pl
    
    
>>> The r1663338 group:
    r1663338, r1663347
    
    Properly record resolving of individual property conflicts.
    
      +1: rhuijben
    
    Run a merge? [y,l,v,±1,±0,q,e,a, ,N,?] v # Show the full entry,
                                                # including "Justification:"
                                                # and "Notes:".
    
     * r1663338, r1663347
       Properly record resolving of individual property conflicts.
       Justification:
         Fixes a few implementation bugs in the resolver code and exposes the
         api for more users than those that pass a callback function.
       Votes:
         +1: rhuijben
    
    Run a merge? [y,l,v,±1,±0,q,e,a, ,N,?] l # Show log.
    <the following was displayed in my pager>
    ------------------------------------------------------------------------
    r1663338 | rhuijben | 2015-03-02 16:01:09 +0000 (Mon, 02 Mar 2015) | 10 lines
    
    Fix per property resolving of the interactive conflict resolver. Before
    this patch the same choice was in many (if not most) cases applied to
    more than one property conflict.
    ...
    ------------------------------------------------------------------------
    <at this point, I quit the pager>
    Run a merge? [y,l,v,±1,±0,q,e,a, ,N,?] y # Run a merge, but
    Would have committed: # will not commit it (unless designated environment var set)
    [[[
     M .
    M subversion/libsvn_wc/conflicts.c
    M subversion/tests/libsvn_wc/conflict-data-test.c
    M subversion/tests/libsvn_wc/utils.c
    M subversion/tests/libsvn_wc/utils.h
    M STATUS (not shown in the diff)
    Merge the r1663338 group from trunk:
    
     * r1663338, r1663347
       Properly record resolving of individual property conflicts.
       Justification:
         Fixes a few implementation bugs in the resolver code and exposes the
         api for more users than those that pass a callback function.
       Votes:
         +1: rhuijben
    ]]]
    Shall I open a subshell? [ydN?] ? # I typed '?' for help.
    y: Open a shell.
    d: View a diff.
    N: Move to the next entry.
    ?: Display this list.
    Shall I open a subshell? [ydN?] d # View a diff
    <the following was displayed in my pager>
    Index: subversion/libsvn_wc/conflicts.c
    ===================================================================
    --- subversion/libsvn_wc/conflicts.c (revision 1664176)
    +++ subversion/libsvn_wc/conflicts.c (working copy)
    @@ -2338,7 +2338,7 @@ static svn_error_t *
     resolve_prop_conflict_on_node(svn_boolean_t *did_resolve,
    ...
    <at this point, I quit the pager>
    Shall I open a subshell? [ydN?] n
    Reverted '.'
    Reverted 'subversion/tests/libsvn_wc/utils.c'
    Reverted 'subversion/tests/libsvn_wc/conflict-data-test.c'
    Reverted 'subversion/tests/libsvn_wc/utils.h'
    Reverted 'subversion/libsvn_wc/conflicts.c'
    
    
>>> r1663791:
    r1663791
    
    Trivial typo fix in error message.
    
      +1: brane, rhuijben
    
    Run a merge? [y,l,v,±1,±0,q,e,a, ,N,?] a # Move to 'Approved changes'
    
    
>>> r1663791:
    r1663791
    
    Trivial typo fix in error message.
    
      +1: brane, rhuijben
    
    Run a merge? [y,l,v,±1,±0,q,e,a, ,N,?] +1 # And enter a +1 vote
    
    
>>> r1663991:
    r1663991
    
    Fix calculating the repository path after commits of nodes that are
    shadowing a switched (not-present) node.
    
      +1: rhuijben
    
    Run a merge? [y,l,v,±1,±0,q,e,a, ,N,?] q # Quit.
    Index: STATUS
    ===================================================================
    --- STATUS (revision 1664172)
    +++ STATUS (working copy)
    @@ -22,7 +22,7 @@ Status of 1.9.0:
          Fixes a few implementation bugs in the resolver code and exposes the
          api for more users than those that pass a callback function.
        Votes:
    - +1: rhuijben
    + +1: rhuijben, danielsh
     
      * r1663450
        Fix removing cache tokens in the ra_svn editor implementation
    @@ -77,13 +77,6 @@ Other candidate changes:
        Votes:
          +1: rhuijben
     
    - * r1663791
    - Trivial typo fix in error message.
    - Justification:
    - Fixes a typo.
    - Votes:
    - +1: brane, rhuijben
    -
      * r1663991
        Fix calculating the repository path after commits of nodes that are
        shadowing a switched (not-present) node.
    @@ -130,7 +123,6 @@ Other candidate changes:
     Veto-blocked changes:
     =====================
     
    -
     Approved changes:
     =================
     
    @@ -161,3 +153,11 @@ Approved changes:
          memory usage limited in a loop.
        Votes:
          +1: rhuijben, ivan, stefan2
    +
    + * r1663791
    + Trivial typo fix in error message.
    + Justification:
    + Fixes a typo.
    + Votes:
    + +1: brane, rhuijben, danielsh
    +
    [[[
    * STATUS:
      Vote +1 on the r1663338 group.
      Vote +1 on r1663791, approving.
    ]]]
    Commit these votes? y
    Authentication realm: <https://svn.apache.org:443> ASF Committers
    Password for 'danielsh':
]]]

The script can also show the log (by pressing 'l'), open just that entry
in $EDITOR to allow editing the Notes field or the parentheticals (by
pressing 'e'), and add entries to an ignore list so you are never
prompted for them again (useful for ignoring swig-pl -related
nominations). For a usage summary, run it with the --help option, or
type '?' at the prompt.

Cheers,

Daniel
Received on 2015-03-04 23:56:01 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.