MCPcopy Create free account
hub / github.com/ARMmbed/mbed-cli / mkcommit

Function mkcommit

test/util.py:121–132  ·  view source on GitHub ↗
(dir=None, files=[])

Source from the content-addressed store, hash-verified

119 return 'hg'
120
121def 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'])

Callers 6

test_import_after_removeFunction · 0.85
test_sync_updateFunction · 0.85
test_sync_update_removeFunction · 0.85
test_sync_update_addFunction · 0.85
test_sync_update_moveFunction · 0.85
test_import_after_addFunction · 0.85

Calls 3

cdFunction · 0.70
scmFunction · 0.70
popenFunction · 0.70

Tested by 6

test_import_after_removeFunction · 0.68
test_sync_updateFunction · 0.68
test_sync_update_removeFunction · 0.68
test_sync_update_addFunction · 0.68
test_sync_update_moveFunction · 0.68
test_import_after_addFunction · 0.68