Mercurial > hgsubversion
comparison tests/test_pull.py @ 821:f28e0f54a6ef
svnmeta: store youngest revision pulled from subversion
This prevents re-pulling the same revision over and over, which was a
problem when the most recent revision was a tagging revision that
wouldn't exist properly in the revmap. This should also allow users to
not re-pull huge volumes of commits that have no effect on the hg
repository.
author | Augie Fackler <durin42@gmail.com> |
---|---|
date | Tue, 24 May 2011 21:07:27 -0500 |
parents | 8c7447b4b004 |
children | 04729f3a3d17 |
comparison
equal
deleted
inserted
replaced
820:09f7c1c09207 | 821:f28e0f54a6ef |
---|---|
1 import test_util | 1 import test_util |
2 | 2 |
3 import os.path | 3 import os.path |
4 import subprocess | 4 import subprocess |
5 from mercurial import node | |
5 from mercurial import ui | 6 from mercurial import ui |
6 from mercurial import util as hgutil | 7 from mercurial import util as hgutil |
7 from mercurial import commands | 8 from mercurial import commands |
8 | 9 |
9 class TestPull(test_util.TestBase): | 10 class TestPull(test_util.TestBase): |
49 pass | 50 pass |
50 self.assertEqual(state, repo.parents()) | 51 self.assertEqual(state, repo.parents()) |
51 self.assertTrue('tip' not in repo[None].tags()) | 52 self.assertTrue('tip' not in repo[None].tags()) |
52 self.assertEqual(len(repo.heads()), 2) | 53 self.assertEqual(len(repo.heads()), 2) |
53 | 54 |
55 def test_tag_repull_doesnt_happen(self): | |
56 repo = self._load_fixture_and_fetch('branchtagcollision.svndump') | |
57 oldheads = map(node.hex, repo.heads()) | |
58 commands.pull(repo.ui, repo) | |
59 self.assertEqual(oldheads, map(node.hex, repo.heads())) | |
60 | |
54 def suite(): | 61 def suite(): |
55 import unittest, sys | 62 import unittest, sys |
56 return unittest.findTestCases(sys.modules[__name__]) | 63 return unittest.findTestCases(sys.modules[__name__]) |