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