Add --gitsvnparent option to post-review

Review Request #793 — Created March 29, 2009 and discarded

sandy
Review Board SVN (deprecated)
999
reviewboard
Assuming you have a local git branch "1.0" which is where you "git svn rebase" and "git svn dcommit" for an SVN branch, a common use case would be:

1. git checkout -b new-1.0-fix 1.0
2. hack hack hack, commit commit commit
3. post-review --gitsvnparent=1.0

The reasons why I need a feature like this are best described in the bug.


  1. 
      
  2. /trunk/rbtools/scripts/post-review (Diff revision 1)
     
     
    what is the difference between specifiying the parent as the branch you want to diff against, and diff gitsvn_parent_branch?
    
    
    1. Have your read the bug?  I think it explains what this new option is for pretty well.  If you still have questions after reading the bug, let me know.
    2. Ah, I see.
      
      I ran into a similar issue, my solution was to make the "master" branch not hard coded.
      I think it is a mistake of post-review to assume a given branch layout for git/git-svn.
    3. I think hef's change (/r/889) is a good way to go, so long as it doesn't break existing setups. Sandy, would you mind trying it and seeing if it solves your problem?
  3. 
      
  1. 
      
  2. /trunk/rbtools/scripts/post-review (Diff revision 1)
     
     
     
     
    I think these are the lines I commented out to get the behavior from --parent I wanted.
    
    I don't know if that is the right solution or not though.
  3. 
      
  1. 
      
  2. /trunk/rbtools/scripts/post-review (Diff revision 1)
     
     
    I also changed this line to:
    rev = execute(["git", "svn", "find-rev", parent_branch]).strip()
  3. 
      
Loading...