Allow to select a different origin for SVN-based working copy

Review Request #8265 — Created July 1, 2016 and discarded

Information

RBTools
master

Reviewers

The problem being addressed here is using the ReviewBoard to post changes against a subcomponent that is maintained in a vendor branch [http://svnbook.red-bean.com/en/1.7/svn-book.html#svn.advanced.vendorbr]. The problem here is that with sufficiently large subcomponent, the modifications between two releases of this subcomponent are too big and what's worse, nobody is interested in reviewing them in their entirety.

Here's an example. My project X contains a somewhat modified Linux kernel in the linux directory. I import new Linux releases in a vendor branch, at ^/vendor/linux/*release*. Now say, I am upgrading Linux from 4.1.27 to 4.4.14 (svn merge ^/vendor/linux/{4.1.27,4.4.14} linux) and making some modifications inside my code in Linux tree (linux/arch/newarch + some of the stock Linux files e.g. linux/init/main.c) as well as changes in the other components to accommodate the kernel upgrade.

If I now just run rbt post in the working copy, the review request ends up with ~50 pages of diffs. Here comes the idea for the new option, --svn-diff-origin: none of the reviewers are really interested in the changes in the Linux kernel itself. Rather, what's interesting is
- How our stuff inside Linux kernel has changed (linux/arch/newarch)
- What are our modifications to stock Linux files with this release (linux/init/main.c)
- How our other code had to change to accommodate the upgrade.

This new option allows one to override what is considered a "source" part of the diff for certain directories. For example, in this case one would invoke rbt post as:

rbt post --svn-show-copies-as-adds=n \
    --svn-diff-origin linux ^/vendor/linux/4.4.14 \
    --svn-diff-origin linux/arch/newarch ""

This will produce a diff for the linux subdirectory against the pristine Linux 4.4.14 sources - while reverting to the normal rbt post behavior for linux/arch/newarch.

Comments, thoughts?

At this stage, this is a request for comments. If there's an agreement such feature will be useful, I'll add the tests.

Description From Last Updated

Col: 80 E501 line too long (88 > 79 characters)

reviewbotreviewbot

Col: 80 E501 line too long (90 > 79 characters)

reviewbotreviewbot

Col: 80 E501 line too long (83 > 79 characters)

reviewbotreviewbot

Col: 21 E128 continuation line under-indented for visual indent

reviewbotreviewbot

Col: 25 E128 continuation line under-indented for visual indent

reviewbotreviewbot

Col: 36 E201 whitespace after '['

reviewbotreviewbot

Col: 62 E202 whitespace before ']'

reviewbotreviewbot

Col: 36 E201 whitespace after '['

reviewbotreviewbot

Col: 40 E202 whitespace before ']'

reviewbotreviewbot

Col: 32 E201 whitespace after '['

reviewbotreviewbot

Col: 37 E202 whitespace before ']'

reviewbotreviewbot

Col: 50 E202 whitespace before ']'

reviewbotreviewbot

Col: 45 E201 whitespace after '['

reviewbotreviewbot

Col: 34 E201 whitespace after '['

reviewbotreviewbot

Col: 74 E202 whitespace before ']'

reviewbotreviewbot

Col: 80 E501 line too long (81 > 79 characters)

reviewbotreviewbot

Col: 46 W291 trailing whitespace

reviewbotreviewbot

Col: 29 E201 whitespace after '['

reviewbotreviewbot

Col: 34 E202 whitespace before ']'

reviewbotreviewbot

Col: 29 E201 whitespace after '['

reviewbotreviewbot

Col: 34 E202 whitespace before ']'

reviewbotreviewbot

Col: 35 E231 missing whitespace after ','

reviewbotreviewbot

Col: 1 E101 indentation contains mixed spaces and tabs

reviewbotreviewbot

Col: 1 W191 indentation contains tabs

reviewbotreviewbot

Col: 4 E128 continuation line under-indented for visual indent

reviewbotreviewbot
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        rbtools/clients/svn.py
        rbtools/commands/__init__.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        rbtools/clients/svn.py
        rbtools/commands/__init__.py
    
    
  2. rbtools/clients/svn.py (Diff revision 1)
     
     
    Show all issues
    Col: 80
     E501 line too long (88 > 79 characters)
    
  3. rbtools/clients/svn.py (Diff revision 1)
     
     
    Show all issues
    Col: 80
     E501 line too long (90 > 79 characters)
    
  4. rbtools/clients/svn.py (Diff revision 1)
     
     
    Show all issues
    Col: 80
     E501 line too long (83 > 79 characters)
    
  5. rbtools/clients/svn.py (Diff revision 1)
     
     
    Show all issues
    Col: 21
     E128 continuation line under-indented for visual indent
    
  6. rbtools/clients/svn.py (Diff revision 1)
     
     
    Show all issues
    Col: 25
     E128 continuation line under-indented for visual indent
    
  7. rbtools/clients/svn.py (Diff revision 1)
     
     
    Show all issues
    Col: 36
     E201 whitespace after '['
    
  8. rbtools/clients/svn.py (Diff revision 1)
     
     
    Show all issues
    Col: 62
     E202 whitespace before ']'
    
  9. rbtools/clients/svn.py (Diff revision 1)
     
     
    Show all issues
    Col: 36
     E201 whitespace after '['
    
  10. rbtools/clients/svn.py (Diff revision 1)
     
     
    Show all issues
    Col: 40
     E202 whitespace before ']'
    
  11. rbtools/clients/svn.py (Diff revision 1)
     
     
    Show all issues
    Col: 32
     E201 whitespace after '['
    
  12. rbtools/clients/svn.py (Diff revision 1)
     
     
    Show all issues
    Col: 37
     E202 whitespace before ']'
    
  13. rbtools/clients/svn.py (Diff revision 1)
     
     
    Show all issues
    Col: 50
     E202 whitespace before ']'
    
  14. rbtools/clients/svn.py (Diff revision 1)
     
     
    Show all issues
    Col: 45
     E201 whitespace after '['
    
  15. rbtools/clients/svn.py (Diff revision 1)
     
     
    Show all issues
    Col: 34
     E201 whitespace after '['
    
  16. rbtools/clients/svn.py (Diff revision 1)
     
     
    Show all issues
    Col: 74
     E202 whitespace before ']'
    
  17. rbtools/clients/svn.py (Diff revision 1)
     
     
    Show all issues
    Col: 80
     E501 line too long (81 > 79 characters)
    
  18. rbtools/clients/svn.py (Diff revision 1)
     
     
    Show all issues
    Col: 46
     W291 trailing whitespace
    
  19. rbtools/clients/svn.py (Diff revision 1)
     
     
    Show all issues
    Col: 29
     E201 whitespace after '['
    
  20. rbtools/clients/svn.py (Diff revision 1)
     
     
    Show all issues
    Col: 34
     E202 whitespace before ']'
    
  21. rbtools/clients/svn.py (Diff revision 1)
     
     
    Show all issues
    Col: 29
     E201 whitespace after '['
    
  22. rbtools/clients/svn.py (Diff revision 1)
     
     
    Show all issues
    Col: 34
     E202 whitespace before ']'
    
  23. rbtools/commands/__init__.py (Diff revision 1)
     
     
    Show all issues
    Col: 35
     E231 missing whitespace after ','
    
  24. rbtools/commands/__init__.py (Diff revision 1)
     
     
    Show all issues
    Col: 1
     E101 indentation contains mixed spaces and tabs
    
  25. rbtools/commands/__init__.py (Diff revision 1)
     
     
    Show all issues
    Col: 1
     W191 indentation contains tabs
    
  26. rbtools/commands/__init__.py (Diff revision 1)
     
     
    Show all issues
    Col: 4
     E128 continuation line under-indented for visual indent
    
  27. 
      
ST
  1. Aside from the Python style comments - any thoughts on the concept? Worthy of clean up and intergration; or the use case is too obscure?

    1. It does seem pretty obscure, but a quick glance at the code looks like it doesn't make any substantive changes to the general, more common code paths. I think we could take this patch with sufficient unit testing to make sure we don't break it in the future.

  2. 
      
david
Review request changed
Status:
Discarded