comparison tests/test_tags.py @ 867:50c13e01c7e3

test_util: add a load_and_fetch() returning the repo_path
author Patrick Mezard <patrick@mezard.eu>
date Thu, 19 Apr 2012 18:29:28 +0200
parents 04729f3a3d17
children 7e9d805a0e1f
comparison
equal deleted inserted replaced
866:20e73b5ab6f7 867:50c13e01c7e3
103 103
104 def test_most_recent_is_edited_stupid(self): 104 def test_most_recent_is_edited_stupid(self):
105 self.test_most_recent_is_edited(True) 105 self.test_most_recent_is_edited(True)
106 106
107 def test_most_recent_is_edited(self, stupid=False): 107 def test_most_recent_is_edited(self, stupid=False):
108 repo = self._load_fixture_and_fetch('most-recent-is-edit-tag.svndump', 108 repo, repo_path = self.load_and_fetch('most-recent-is-edit-tag.svndump',
109 stupid=stupid) 109 stupid=stupid)
110 self.repo.ui.status( 110 self.repo.ui.status(
111 "Note: this test failing may be because of a rebuildmeta failure.\n" 111 "Note: this test failing may be because of a rebuildmeta failure.\n"
112 "You should check that before assuming issues with this test.\n") 112 "You should check that before assuming issues with this test.\n")
113 wc2_path = self.wc_path + '2' 113 wc2_path = self.wc_path + '2'
114 src, dest = test_util.hgclone(repo.ui, self.wc_path, wc2_path, update=False) 114 src, dest = test_util.hgclone(repo.ui, self.wc_path, wc2_path, update=False)
115 svncommands.rebuildmeta(repo.ui, 115 svncommands.rebuildmeta(repo.ui,
116 dest, 116 dest,
117 args=[test_util.fileurl(self.repo_path), ]) 117 args=[test_util.fileurl(repo_path), ])
118 commands.pull(self.repo.ui, self.repo, stupid=stupid) 118 commands.pull(self.repo.ui, self.repo, stupid=stupid)
119 dtags, srctags = dest.tags(), self.repo.tags() 119 dtags, srctags = dest.tags(), self.repo.tags()
120 dtags.pop('tip') 120 dtags.pop('tip')
121 srctags.pop('tip') 121 srctags.pop('tip')
122 self.assertEqual(dtags, srctags) 122 self.assertEqual(dtags, srctags)