comparison tests/test_push_command.py @ 816:86d124a8768e

Fix hg.clone() calls changed by d976542986d2
author Patrick Mezard <pmezard@gmail.com>
date Wed, 15 Jun 2011 14:44:14 +0200
parents c2b9e08ecf10
children e9af7eba88db
comparison
equal deleted inserted replaced
815:e62e84a9464b 816:86d124a8768e
276 276
277 def test_push_to_non_tip(self): 277 def test_push_to_non_tip(self):
278 self.test_push_to_branch(push=False) 278 self.test_push_to_branch(push=False)
279 wc2path = self.wc_path + '_clone' 279 wc2path = self.wc_path + '_clone'
280 u = self.repo.ui 280 u = self.repo.ui
281 hg.clone(self.repo.ui, self.wc_path, wc2path, update=False) 281 test_util.hgclone(self.repo.ui, self.wc_path, wc2path, update=False)
282 res = self.pushrevisions() 282 res = self.pushrevisions()
283 self.assertEqual(0, res) 283 self.assertEqual(0, res)
284 oldf = open(os.path.join(self.wc_path, '.hg', 'hgrc')) 284 oldf = open(os.path.join(self.wc_path, '.hg', 'hgrc'))
285 hgrc = oldf.read() 285 hgrc = oldf.read()
286 oldf.close() 286 oldf.close()
287 shutil.rmtree(self.wc_path) 287 shutil.rmtree(self.wc_path)
288 hg.clone(u, wc2path, self.wc_path, update=False) 288 test_util.hgclone(u, wc2path, self.wc_path, update=False)
289 oldf = open(os.path.join(self.wc_path, '.hg', 'hgrc'), 'w') 289 oldf = open(os.path.join(self.wc_path, '.hg', 'hgrc'), 'w')
290 oldf.write(hgrc) 290 oldf.write(hgrc)
291 oldf.close() 291 oldf.close()
292 292
293 # do a commit here 293 # do a commit here