Mercurial > hgsubversion
comparison tests/test_push_command.py @ 929:8417be758047
pushmod: keep the root svn dir when emptying the hg repo (issue359)
author | Patrick Mezard <patrick@mezard.eu> |
---|---|
date | Sun, 09 Sep 2012 16:12:28 +0200 |
parents | d99ed94f4760 |
children | def2144c0a8c |
comparison
equal
deleted
inserted
replaced
928:d99ed94f4760 | 929:8417be758047 |
---|---|
501 changes = [(fn, fn, 'a')] | 501 changes = [(fn, fn, 'a')] |
502 par = self.repo['tip'].rev() | 502 par = self.repo['tip'].rev() |
503 self.commitchanges(changes, parent=par) | 503 self.commitchanges(changes, parent=par) |
504 self.pushrevisions() | 504 self.pushrevisions() |
505 | 505 |
506 def test_push_emptying_changeset(self): | |
507 r = self.repo['tip'] | |
508 changes = [ | |
509 ('alpha', None, None), | |
510 ('beta', None, None), | |
511 ] | |
512 parent = self.repo['tip'].rev() | |
513 self.commitchanges(changes, parent=parent) | |
514 self.pushrevisions() | |
515 self.assertEqual({}, self.repo['tip'].manifest()) | |
516 | |
517 # Try to re-add a file after emptying the branch | |
518 changes = [ | |
519 ('alpha', 'alpha', 'alpha'), | |
520 ] | |
521 self.commitchanges(changes, parent=self.repo['tip'].rev()) | |
522 self.pushrevisions() | |
523 self.assertEqual(['alpha'], list(self.repo['tip'].manifest())) | |
524 | |
506 def suite(): | 525 def suite(): |
507 test_classes = [PushTests, ] | 526 test_classes = [PushTests, ] |
508 all_tests = [] | 527 all_tests = [] |
509 # This is the quickest hack I could come up with to load all the tests from | 528 # This is the quickest hack I could come up with to load all the tests from |
510 # both classes. Would love a patch that simplifies this without adding | 529 # both classes. Would love a patch that simplifies this without adding |