Mercurial > hgsubversion
comparison tests/test_fetch_command.py @ 952:9c3b4f59e7e6
stupid: do not close branch upon branch-wide revert
Reverting a branch with a remove followed by a copy results in a branch
replacement. By default, branch replacements are handled by closing the
replaced branch and committing the new branch on top of it. But we do
not really want that when reverting a branch, we only want a linear
history with a changeset capturing the revert.
author | Patrick Mezard <patrick@mezard.eu> |
---|---|
date | Tue, 16 Oct 2012 21:17:55 +0200 |
parents | a80b01ceb1fc |
children | b729909d3793 |
comparison
equal
deleted
inserted
replaced
951:bd9c292665fd | 952:9c3b4f59e7e6 |
---|---|
235 self._load_fixture_and_fetch('emptyrepo2.svndump', stupid=stupid) | 235 self._load_fixture_and_fetch('emptyrepo2.svndump', stupid=stupid) |
236 | 236 |
237 def test_empty_repo_stupid(self): | 237 def test_empty_repo_stupid(self): |
238 self.test_empty_repo(stupid=True) | 238 self.test_empty_repo(stupid=True) |
239 | 239 |
240 def test_fetch_revert(self, stupid=False): | |
241 repo = self._load_fixture_and_fetch('revert.svndump', stupid=stupid) | |
242 graph = self.getgraph(repo) | |
243 refgraph = """\ | |
244 o changeset: 3:937dcd1206d4 | |
245 | branch: | |
246 | tags: tip | |
247 | summary: revert2 | |
248 | files: a dir/b | |
249 | | |
250 o changeset: 2:9317a748b7c3 | |
251 | branch: | |
252 | tags: | |
253 | summary: revert | |
254 | files: a dir/b | |
255 | | |
256 o changeset: 1:243259a4138a | |
257 | branch: | |
258 | tags: | |
259 | summary: changefiles | |
260 | files: a dir/b | |
261 | | |
262 o changeset: 0:ab86791fc857 | |
263 branch: | |
264 tags: | |
265 summary: init | |
266 files: a dir/b | |
267 """ | |
268 self.assertEqual(refgraph.strip(), graph.strip()) | |
269 | |
270 def test_fetch_revert_stupid(self): | |
271 self.test_fetch_revert(stupid=True) | |
272 | |
240 def suite(): | 273 def suite(): |
241 all_tests = [unittest.TestLoader().loadTestsFromTestCase(TestBasicRepoLayout), | 274 all_tests = [unittest.TestLoader().loadTestsFromTestCase(TestBasicRepoLayout), |
242 unittest.TestLoader().loadTestsFromTestCase(TestStupidPull), | 275 unittest.TestLoader().loadTestsFromTestCase(TestStupidPull), |
243 ] | 276 ] |
244 return unittest.TestSuite(all_tests) | 277 return unittest.TestSuite(all_tests) |