Mercurial > hgsubversion
comparison tests/test_externals.py @ 851:9ce00cb1d676
Merge alternate tunnel schemes.
author | Augie Fackler <durin42@gmail.com> |
---|---|
date | Sat, 25 Feb 2012 14:51:22 -0600 |
parents | 312b37bc5e20 |
children | 04729f3a3d17 |
comparison
equal
deleted
inserted
replaced
850:d3bc067c0f72 | 851:9ce00cb1d676 |
---|---|
8 from mercurial import subrepo | 8 from mercurial import subrepo |
9 # require svnsubrepo and hg >= 1.7.1 | 9 # require svnsubrepo and hg >= 1.7.1 |
10 subrepo.svnsubrepo | 10 subrepo.svnsubrepo |
11 hgutil.checknlink | 11 hgutil.checknlink |
12 except (ImportError, AttributeError), e: | 12 except (ImportError, AttributeError), e: |
13 print >>sys.stderr, 'test_externals: skipping .hgsub tests' | 13 print >> sys.stderr, 'test_externals: skipping .hgsub tests' |
14 subrepo = None | 14 subrepo = None |
15 | 15 |
16 from hgsubversion import svnexternals | 16 from hgsubversion import svnexternals |
17 | 17 |
18 class TestFetchExternals(test_util.TestBase): | 18 class TestFetchExternals(test_util.TestBase): |
356 self.commitchanges(changes) | 356 self.commitchanges(changes) |
357 self.pushrevisions(stupid) | 357 self.pushrevisions(stupid) |
358 self.assertchanges(changes, self.repo['tip']) | 358 self.assertchanges(changes, self.repo['tip']) |
359 | 359 |
360 # Check .hgsub and .hgsubstate were not pushed | 360 # Check .hgsub and .hgsubstate were not pushed |
361 self.assertEqual(['dir', 'subdir1', 'subdir1/a','subdir2', | 361 self.assertEqual(['dir', 'subdir1', 'subdir1/a', 'subdir2', |
362 'subdir2/a'], self.svnls('trunk')) | 362 'subdir2/a'], self.svnls('trunk')) |
363 | 363 |
364 # Remove all references from one directory, add a new one | 364 # Remove all references from one directory, add a new one |
365 # to the other (test multiline entries) | 365 # to the other (test multiline entries) |
366 changes = [ | 366 changes = [ |
406 self.commitchanges(changes) | 406 self.commitchanges(changes) |
407 self.pushrevisions(stupid) | 407 self.pushrevisions(stupid) |
408 self.assertchanges(changes, self.repo['tip']) | 408 self.assertchanges(changes, self.repo['tip']) |
409 | 409 |
410 def suite(): | 410 def suite(): |
411 all = [unittest.TestLoader().loadTestsFromTestCase(TestFetchExternals), | 411 all_tests = [unittest.TestLoader().loadTestsFromTestCase(TestFetchExternals), |
412 unittest.TestLoader().loadTestsFromTestCase(TestPushExternals), | 412 unittest.TestLoader().loadTestsFromTestCase(TestPushExternals), |
413 ] | 413 ] |
414 return unittest.TestSuite(all) | 414 return unittest.TestSuite(all_tests) |