(dir=None, files=[])
| 119 | return 'hg' |
| 120 | |
| 121 | def mkcommit(dir=None, files=[]): |
| 122 | with cd(dir or os.getcwd()): |
| 123 | if scm() == 'git': |
| 124 | if files: |
| 125 | popen(['git', 'add'] + files) |
| 126 | popen(['git', 'commit', '-a', '-m', 'test commit']) |
| 127 | popen(['git', 'push', 'origin', 'master']) |
| 128 | elif scm() == 'hg': |
| 129 | if files: |
| 130 | popen(['hg', 'add'] + files) |
| 131 | popen(['hg', 'commit', '-m', 'test commit']) |
| 132 | popen(['hg', 'push']) |
| 133 | |
| 134 | # Different repository structures |
| 135 | @pytest.fixture(params=['git1', 'hg1', 'alt1', 'alt2']) |