Show More
@@ -116,7 +116,8 def create_test_repo(force=True): | |||||
116 |
|
116 | |||
117 | form_data = {'repo_name':HG_REPO, |
|
117 | form_data = {'repo_name':HG_REPO, | |
118 | 'repo_type':'hg', |
|
118 | 'repo_type':'hg', | |
119 |
'private':False, |
|
119 | 'private':False, | |
|
120 | 'clone_uri':'' } | |||
120 | rm = RepoModel(sa) |
|
121 | rm = RepoModel(sa) | |
121 | rm.base_path = '/home/hg' |
|
122 | rm.base_path = '/home/hg' | |
122 | rm.create(form_data, user) |
|
123 | rm.create(form_data, user) | |
@@ -238,8 +239,9 def test_push_modify_file(f_name='setup. | |||||
238 |
|
239 | |||
239 | Command(cwd).execute('hg push %s' % jn(TESTS_TMP_PATH, HG_REPO)) |
|
240 | Command(cwd).execute('hg push %s' % jn(TESTS_TMP_PATH, HG_REPO)) | |
240 |
|
241 | |||
241 | def test_push_new_file(commits=15): |
|
242 | def test_push_new_file(commits=15, with_clone=True): | |
242 |
|
243 | |||
|
244 | if with_clone: | |||
243 | test_clone(no_errors=True) |
|
245 | test_clone(no_errors=True) | |
244 |
|
246 | |||
245 | cwd = path = jn(TESTS_TMP_PATH, HG_REPO) |
|
247 | cwd = path = jn(TESTS_TMP_PATH, HG_REPO) | |
@@ -253,7 +255,9 def test_push_new_file(commits=15): | |||||
253 | cmd = """echo 'added_line%s' >> %s""" % (i, added_file) |
|
255 | cmd = """echo 'added_line%s' >> %s""" % (i, added_file) | |
254 | Command(cwd).execute(cmd) |
|
256 | Command(cwd).execute(cmd) | |
255 |
|
257 | |||
256 |
cmd = """hg ci -m 'commited new %s' %s """ % (i, |
|
258 | cmd = """hg ci -m 'commited new %s' -u '%s' %s """ % (i, | |
|
259 | 'Marcin Kuźminski <marcin@python-blog.com>', | |||
|
260 | added_file) | |||
257 | Command(cwd).execute(cmd) |
|
261 | Command(cwd).execute(cmd) | |
258 |
|
262 | |||
259 | push_url = 'http://%(user)s:%(pass)s@%(host)s/%(cloned_repo)s' % \ |
|
263 | push_url = 'http://%(user)s:%(pass)s@%(host)s/%(cloned_repo)s' % \ | |
@@ -326,7 +330,8 if __name__ == '__main__': | |||||
326 |
|
330 | |||
327 | #test_clone_wrong_credentials() |
|
331 | #test_clone_wrong_credentials() | |
328 |
|
332 | |||
329 |
|
|
333 | test_pull() | |
330 |
test_push_new_file(commits= |
|
334 | test_push_new_file(commits=2, with_clone=True) | |
|
335 | ||||
331 | #test_push_wrong_path() |
|
336 | #test_push_wrong_path() | |
332 | #test_push_wrong_credentials() |
|
337 | #test_push_wrong_credentials() |
General Comments 0
You need to be logged in to leave comments.
Login now