changeset 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 0f1f88e71138
children 7e10891666fe c6b01fd34694
files tests/test_pull.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
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):