401
401
self.assertEquals(urlutils.join(repos.base, "branches/branchab"),
402
402
branches[0].base)
404
def test_find_tags(self):
405
repos_url = self.make_repository('a')
407
dc = self.get_commit_editor(repos_url)
408
tags = dc.add_dir("tags")
409
tags.add_dir("tags/brancha").add_file("tags/brancha/data").modify()
410
tags.add_dir("tags/branchab").add_file("tags/branchab/data").modify()
413
repos = Repository.open(repos_url)
414
set_branching_scheme(repos, TrunkBranchingScheme())
415
tags = repos.find_tags()
416
self.assertEquals({"brancha": repos.generate_revision_id(1, "tags/brancha", repos.get_mapping()),
417
"branchab": repos.generate_revision_id(1, "tags/branchab", repos.get_mapping())}, tags)
419
def test_find_tags_unmodified(self):
420
repos_url = self.make_repository('a')
422
dc = self.get_commit_editor(repos_url)
423
dc.add_dir("trunk").add_file("trunk/data").modify()
426
dc = self.get_commit_editor(repos_url)
427
tags = dc.add_dir("tags")
428
tags.add_dir("tags/brancha", "trunk")
431
repos = Repository.open(repos_url)
432
set_branching_scheme(repos, TrunkBranchingScheme())
433
tags = repos.find_tags()
434
self.assertEquals({"brancha": repos.generate_revision_id(1, "trunk", repos.get_mapping())}, tags)
436
def test_find_tags_modified(self):
437
repos_url = self.make_repository('a')
439
dc = self.get_commit_editor(repos_url)
440
dc.add_dir("trunk").add_file("trunk/data").modify()
443
dc = self.get_commit_editor(repos_url)
444
tags = dc.add_dir("tags")
445
tags.add_dir("tags/brancha", "trunk")
448
dc = self.get_commit_editor(repos_url)
449
tags = dc.open_dir("tags")
450
brancha = tags.open_dir("tags/brancha")
451
brancha.add_file("tags/brancha/release-notes").modify()
454
repos = Repository.open(repos_url)
455
set_branching_scheme(repos, TrunkBranchingScheme())
456
tags = repos.find_tags()
457
self.assertEquals({"brancha": repos.generate_revision_id(3, "tags/brancha", repos.get_mapping())}, tags)
404
459
def test_find_branchpaths_moved(self):
405
460
repos_url = self.make_client("a", "dc")
406
461
self.build_tree({