# HG changeset patch # User Mads Kiilerich # Date 1547693794 -3600 # Node ID 76e2072b88f6261792ab4e8093fb5478e25bb9f0 # Parent d89217cca11a24a8d752349deeca74eea6c4989f 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. diff -r d89217cca11a -r 76e2072b88f6 kallithea/tests/other/test_vcs_operations.py --- a/kallithea/tests/other/test_vcs_operations.py Wed Jul 03 12:25:55 2019 +0200 +++ b/kallithea/tests/other/test_vcs_operations.py Thu Jan 17 03:56:34 2019 +0100 @@ -158,9 +158,9 @@ # 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