Mercurial > hgsubversion
comparison tests/test_push_command.py @ 62:cc5ebdb1e8d4
push_cmd: Further simplified some logic thanks to an improved test.
author | Augie Fackler <durin42@gmail.com> |
---|---|
date | Thu, 06 Nov 2008 09:24:33 -0600 |
parents | 41dc00c7aef1 |
children | b33940d54fe2 |
comparison
equal
deleted
inserted
replaced
61:243c88c47d89 | 62:cc5ebdb1e8d4 |
---|---|
386 tip = self.repo['tip'] | 386 tip = self.repo['tip'] |
387 self.assertNotEqual(tip.node(), new_hash) | 387 self.assertNotEqual(tip.node(), new_hash) |
388 self.assertEqual(tip['alpha'].data(), 'bar') | 388 self.assertEqual(tip['alpha'].data(), 'bar') |
389 self.assertEqual(tip.parents()[0]['alpha'].flags(), expected_flags) | 389 self.assertEqual(tip.parents()[0]['alpha'].flags(), expected_flags) |
390 self.assertEqual(tip['alpha'].flags(), expected_flags) | 390 self.assertEqual(tip['alpha'].flags(), expected_flags) |
391 # now test removing the property entirely | |
392 repo = self.repo | |
393 def file_callback(repo, memctx, path): | |
394 return context.memfilectx(path=path, | |
395 data='bar', | |
396 islink=False, | |
397 isexec=False, | |
398 copied=False) | |
399 ctx = context.memctx(repo, | |
400 (repo['default'].node(), node.nullid), | |
401 'message', | |
402 ['alpha', ], | |
403 file_callback, | |
404 'author', | |
405 '2008-01-01 00:00:00 -0500', | |
406 {'branch': 'default', }) | |
407 new_hash = repo.commitctx(ctx) | |
408 hg.update(repo, repo['tip'].node()) | |
409 push_cmd.push_revisions_to_subversion(ui.ui(), repo=self.repo, | |
410 hg_repo_path=self.wc_path, | |
411 svn_url='file://' + self.repo_path) | |
412 tip = self.repo['tip'] | |
413 self.assertNotEqual(tip.node(), new_hash) | |
414 self.assertEqual(tip['alpha'].data(), 'bar') | |
415 self.assertEqual(tip.parents()[0]['alpha'].flags(), expected_flags) | |
416 self.assertEqual(tip['alpha'].flags(), '') | |
391 | 417 |
392 | 418 |
393 def suite(): | 419 def suite(): |
394 test_classes = [PushTests, PushOverSvnserveTests] | 420 test_classes = [PushTests, PushOverSvnserveTests] |
395 tests = [] | 421 tests = [] |