Changeset - 76e2072b88f6
[Not reviewed]
default
0 1 0
Mads Kiilerich - 7 years ago 2019-01-17 03:56:34
mads@kiilerich.com
Grafted from: 2a0c4b62630b
tests: push with force in test_vcs_operations.py _add_files_and_push

Some tests push a fixed branch name. If such tests are run twice, it will fail
second time when the other branch head already exists.

Work around that by using force and thus replace the old head.
1 file changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
kallithea/tests/other/test_vcs_operations.py
Show inline comments
 
@@ -158,9 +158,9 @@ def _add_files_and_push(webserver, vt, d
 
    # PUSH it back
 
    stdout = stderr = None
 
    if vt.repo_type == 'hg':
 
        stdout, stderr = Command(dest_dir).execute('hg push --verbose', clone_url, ignoreReturnCode=ignoreReturnCode)
 
        stdout, stderr = Command(dest_dir).execute('hg push -f --verbose', clone_url, ignoreReturnCode=ignoreReturnCode)
 
    elif vt.repo_type == 'git':
 
        stdout, stderr = Command(dest_dir).execute('git push --verbose', clone_url, "master", ignoreReturnCode=ignoreReturnCode)
 
        stdout, stderr = Command(dest_dir).execute('git push -f --verbose', clone_url, "master", ignoreReturnCode=ignoreReturnCode)
 

	
 
    return stdout, stderr
 

	
0 comments (0 inline, 0 general)