Support the R1:R2 syntax for git

Review Request #5209 — Created Jan. 7, 2014 and submitted — Latest diff uploaded

Information

RBTools
master

Reviewers

Support the R1:R2 syntax for git

Added a test case similar to the one for SVN.

Ran nosetests, all tests pass aside from Mercrial ones which are unrelated to this change:

[mhahn@mhahn-02344:rbtools(master)]$ nosetests
...................SSSSSSSSSSSSSSS...................SSSSSSSSSSSSEEEEEEEE.................................
======================================================================
ERROR: Testing MercurialClient (+svn) _calculate_hgsubversion_repository_info properly determines repository and base paths.


Traceback (most recent call last):
File "/Users/mhahn/open_source/rbtools/rbtools/clients/tests.py", line 697, in setUp
if not self._has_hgsubversion():
File "/Users/mhahn/open_source/rbtools/rbtools/clients/tests.py", line 719, in _has_hgsubversion
ignore_errors=True, extra_ignore_errors=(255))
File "/Users/mhahn/open_source/rbtools/rbtools/clients/tests.py", line 441, in _run_hg
translate_newlines=True)
File "/Users/mhahn/open_source/rbtools/rbtools/utils/process.py", line 67, in execute
env=env)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 711, in init
errread, errwrite)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1308, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
-------------------- >> begin captured logging << --------------------
root: DEBUG: Running: hg svn --help
--------------------- >> end captured logging << ---------------------

======================================================================
ERROR: Testing MercurialClient (+svn) diff specifying a revision.


Traceback (most recent call last):
File "/Users/mhahn/open_source/rbtools/rbtools/clients/tests.py", line 697, in setUp
if not self._has_hgsubversion():
File "/Users/mhahn/open_source/rbtools/rbtools/clients/tests.py", line 719, in _has_hgsubversion
ignore_errors=True, extra_ignore_errors=(255))
File "/Users/mhahn/open_source/rbtools/rbtools/clients/tests.py", line 441, in _run_hg
translate_newlines=True)
File "/Users/mhahn/open_source/rbtools/rbtools/utils/process.py", line 67, in execute
env=env)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 711, in init
errread, errwrite)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1308, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
-------------------- >> begin captured logging << --------------------
root: DEBUG: Running: hg svn --help
--------------------- >> end captured logging << ---------------------

======================================================================
ERROR: Testing MercurialClient (+svn) diff, simple case


Traceback (most recent call last):
File "/Users/mhahn/open_source/rbtools/rbtools/clients/tests.py", line 697, in setUp
if not self._has_hgsubversion():
File "/Users/mhahn/open_source/rbtools/rbtools/clients/tests.py", line 719, in _has_hgsubversion
ignore_errors=True, extra_ignore_errors=(255))
File "/Users/mhahn/open_source/rbtools/rbtools/clients/tests.py", line 441, in _run_hg
translate_newlines=True)
File "/Users/mhahn/open_source/rbtools/rbtools/utils/process.py", line 67, in execute
env=env)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 711, in init
errread, errwrite)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1308, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
-------------------- >> begin captured logging << --------------------
root: DEBUG: Running: hg svn --help
--------------------- >> end captured logging << ---------------------

======================================================================
ERROR: Testing MercurialClient (+svn) diff with multiple commits


Traceback (most recent call last):
File "/Users/mhahn/open_source/rbtools/rbtools/clients/tests.py", line 697, in setUp
if not self._has_hgsubversion():
File "/Users/mhahn/open_source/rbtools/rbtools/clients/tests.py", line 719, in _has_hgsubversion
ignore_errors=True, extra_ignore_errors=(255))
File "/Users/mhahn/open_source/rbtools/rbtools/clients/tests.py", line 441, in _run_hg
translate_newlines=True)
File "/Users/mhahn/open_source/rbtools/rbtools/utils/process.py", line 67, in execute
env=env)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 711, in init
errread, errwrite)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1308, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
-------------------- >> begin captured logging << --------------------
root: DEBUG: Running: hg svn --help
--------------------- >> end captured logging << ---------------------

======================================================================
ERROR: Testing MercurialClient (+svn) get_repository_info, simple case


Traceback (most recent call last):
File "/Users/mhahn/open_source/rbtools/rbtools/clients/tests.py", line 697, in setUp
if not self._has_hgsubversion():
File "/Users/mhahn/open_source/rbtools/rbtools/clients/tests.py", line 719, in _has_hgsubversion
ignore_errors=True, extra_ignore_errors=(255))
File "/Users/mhahn/open_source/rbtools/rbtools/clients/tests.py", line 441, in _run_hg
translate_newlines=True)
File "/Users/mhahn/open_source/rbtools/rbtools/utils/process.py", line 67, in execute
env=env)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 711, in init
errread, errwrite)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1308, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
-------------------- >> begin captured logging << --------------------
root: DEBUG: Running: hg svn --help
--------------------- >> end captured logging << ---------------------

======================================================================
ERROR: Testing MercurialClient (+svn) scan_for_server in svn property


Traceback (most recent call last):
File "/Users/mhahn/open_source/rbtools/rbtools/clients/tests.py", line 697, in setUp
if not self._has_hgsubversion():
File "/Users/mhahn/open_source/rbtools/rbtools/clients/tests.py", line 719, in _has_hgsubversion
ignore_errors=True, extra_ignore_errors=(255))
File "/Users/mhahn/open_source/rbtools/rbtools/clients/tests.py", line 441, in _run_hg
translate_newlines=True)
File "/Users/mhahn/open_source/rbtools/rbtools/utils/process.py", line 67, in execute
env=env)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 711, in init
errread, errwrite)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1308, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
-------------------- >> begin captured logging << --------------------
root: DEBUG: Running: hg svn --help
--------------------- >> end captured logging << ---------------------

======================================================================
ERROR: Testing MercurialClient (+svn) scan_for_server in .reviewboardrc


Traceback (most recent call last):
File "/Users/mhahn/open_source/rbtools/rbtools/clients/tests.py", line 697, in setUp
if not self._has_hgsubversion():
File "/Users/mhahn/open_source/rbtools/rbtools/clients/tests.py", line 719, in _has_hgsubversion
ignore_errors=True, extra_ignore_errors=(255))
File "/Users/mhahn/open_source/rbtools/rbtools/clients/tests.py", line 441, in _run_hg
translate_newlines=True)
File "/Users/mhahn/open_source/rbtools/rbtools/utils/process.py", line 67, in execute
env=env)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 711, in init
errread, errwrite)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1308, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
-------------------- >> begin captured logging << --------------------
root: DEBUG: Running: hg svn --help
--------------------- >> end captured logging << ---------------------

======================================================================
ERROR: Testing MercurialClient (+svn) scan_for_server, simple case


Traceback (most recent call last):
File "/Users/mhahn/open_source/rbtools/rbtools/clients/tests.py", line 697, in setUp
if not self._has_hgsubversion():
File "/Users/mhahn/open_source/rbtools/rbtools/clients/tests.py", line 719, in _has_hgsubversion
ignore_errors=True, extra_ignore_errors=(255))
File "/Users/mhahn/open_source/rbtools/rbtools/clients/tests.py", line 441, in _run_hg
translate_newlines=True)
File "/Users/mhahn/open_source/rbtools/rbtools/utils/process.py", line 67, in execute
env=env)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 711, in init
errread, errwrite)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1308, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
-------------------- >> begin captured logging << --------------------
root: DEBUG: Running: hg svn --help
--------------------- >> end captured logging << ---------------------


Ran 106 tests in 11.163s

FAILED (SKIP=27, errors=8)

    Loading...