diff tests/test_pull.py @ 1339:74e82a7da393 stable

tests: check '.' for tags instead of None Commit 24cda1dd45ff in upstream Mercurial changed repo[None] to no longer return tags for the working copy parent. So we need to change the tests to check repo['.'] instead. This should be backwards compatible with older Mercurials.
author Durham Goode <durham@fb.com>
date Wed, 08 Jul 2015 22:00:57 -0700
parents 61d4fb78370b
children 4f1461428334
line wrap: on
line diff
--- a/tests/test_pull.py
+++ b/tests/test_pull.py
@@ -30,7 +30,7 @@ class TestPull(test_util.TestBase):
         self.add_svn_rev(repo_path, {'trunk/alpha': 'Changed'})
         commands.pull(self.repo.ui, repo)
         self.assertEqual(state, repo.parents())
-        self.assertTrue('tip' not in repo[None].tags())
+        self.assertTrue('tip' not in repo['.'].tags())
 
     def test_onerevision_doupdate(self):
         repo, repo_path = self._loadupdate('single_rev.svndump')
@@ -38,7 +38,7 @@ class TestPull(test_util.TestBase):
         self.add_svn_rev(repo_path, {'trunk/alpha': 'Changed'})
         commands.pull(self.repo.ui, repo, update=True)
         self.failIfEqual(state, repo.parents())
-        self.assertTrue('tip' in repo[None].tags())
+        self.assertTrue('tip' in repo['.'].tags())
 
     def test_onerevision_divergent(self):
         repo, repo_path = self._loadupdate('single_rev.svndump')
@@ -51,7 +51,7 @@ class TestPull(test_util.TestBase):
             # hg < 1.9 raised when crossing branches
             pass
         self.assertEqual(state, repo.parents())
-        self.assertTrue('tip' not in repo[None].tags())
+        self.assertTrue('tip' not in repo['.'].tags())
         self.assertEqual(len(repo.heads()), 2)
 
     def test_tag_repull_doesnt_happen(self):