Beispiel #1
0
 def test_lookup_default(self):
     default = self.make_branch('.')
     non_default = default.bzrdir.create_branch(name='nondefault')
     self.assertEqual(
         urlutils.join_segment_parameters(default.bzrdir.user_url,
                                          {"branch": ""}),
         directories.dereference('co:'))
Beispiel #2
0
 def test_no_such_branch(self):
     # No error is raised in this case, that is up to the code that actually
     # opens the branch.
     default = self.make_branch('.')
     self.assertEqual(
         urlutils.join_segment_parameters(default.bzrdir.user_url,
                                          {"branch": "foo"}),
         directories.dereference('co:foo'))
 def test_lookup_public(self):
     branch = self.make_branch('.')
     branch.set_public_branch('http://c')
     self.assertEqual('http://c', directories.dereference(':public'))
 def test_lookup_submit(self):
     branch = self.make_branch('.')
     branch.set_submit_branch('http://b')
     self.assertEqual('http://b', directories.dereference(':submit'))
Beispiel #5
0
 def test_lookup_submit(self):
     branch = self.make_branch('.')
     branch.set_submit_branch('http://b')
     self.assertEqual('http://b', directories.dereference(':submit'))
 def test_lookup_this(self):
     self.assertEqual(self.branch.base, directories.dereference(':this'))
 def test_no_such_branch(self):
     # No error is raised in this case, that is up to the code that actually
     # opens the branch.
     default = self.make_branch('.')
     self.assertEquals(urlutils.join_segment_parameters(default.bzrdir.user_url,
         {"branch": "foo"}), directories.dereference('co:foo'))
 def test_lookup_non_default(self):
     default = self.make_branch('.')
     non_default = default.bzrdir.create_branch(name='nondefault')
     self.assertEquals(non_default.base, directories.dereference('co:nondefault'))
 def test_lookup_this(self):
     branch = self.make_branch('.')
     self.assertEqual(branch.base, directories.dereference(':this'))
Beispiel #10
0
 def test_lookup_non_default(self):
     default = self.make_branch('.')
     non_default = default.bzrdir.create_branch(name='nondefault')
     self.assertEqual(non_default.base,
                      directories.dereference('co:nondefault'))
Beispiel #11
0
 def test_register_location_alias(self):
     self.addCleanup(AliasDirectory.branch_aliases.remove, "booga")
     AliasDirectory.branch_aliases.register("booga",
                                            lambda b: "UHH?",
                                            help="Nobody knows")
     self.assertEqual("UHH?", directories.dereference(":booga"))
Beispiel #12
0
 def test_lookup_this(self):
     branch = self.make_branch('.')
     self.assertEqual(branch.base, directories.dereference(':this'))
Beispiel #13
0
 def test_lookup_push(self):
     branch = self.make_branch('.')
     branch.set_push_location('http://e')
     self.assertEqual('http://e', directories.dereference(':push'))
Beispiel #14
0
 def test_lookup_bound(self):
     branch = self.make_branch('.')
     branch.set_bound_location('http://d')
     self.assertEqual('http://d', directories.dereference(':bound'))
Beispiel #15
0
 def test_lookup_public(self):
     branch = self.make_branch('.')
     branch.set_public_branch('http://c')
     self.assertEqual('http://c', directories.dereference(':public'))
 def test_lookup_bound(self):
     branch = self.make_branch('.')
     branch.set_bound_location('http://d')
     self.assertEqual('http://d', directories.dereference(':bound'))
 def test_lookup_push(self):
     branch = self.make_branch('.')
     branch.set_push_location('http://e')
     self.assertEqual('http://e', directories.dereference(':push'))
Beispiel #18
0
 def assertAliasFromBranch(self, setter, value, alias):
     setter(value)
     self.assertEqual(value, directories.dereference(alias))
 def test_register_location_alias(self):
     self.addCleanup(AliasDirectory.branch_aliases.remove, "booga")
     AliasDirectory.branch_aliases.register("booga",
         lambda b: "UHH?", help="Nobody knows")
     self.assertEquals("UHH?", directories.dereference(":booga"))
Beispiel #20
0
 def test_lookup_this(self):
     self.assertEqual(self.branch.base, directories.dereference(':this'))
 def test_lookup_default(self):
     default = self.make_branch('.')
     non_default = default.bzrdir.create_branch(name='nondefault')
     self.assertEquals(urlutils.join_segment_parameters(default.bzrdir.user_url,
         {"branch": ""}), directories.dereference('co:'))
Beispiel #22
0
 def test_extra_path(self):
     self.assertEqual(urlutils.join(self.branch.base, 'arg'),
                      directories.dereference(':this/arg'))
 def assertAliasFromBranch(self, setter, value, alias):
     setter(value)
     self.assertEquals(value, directories.dereference(alias))
 def test_lookup_parent(self):
     branch = self.make_branch('.')
     branch.set_parent('http://a')
     self.assertEqual('http://a', directories.dereference(':parent'))
 def test_extra_path(self):
     self.assertEqual(urlutils.join(self.branch.base, 'arg'),
                      directories.dereference(':this/arg'))
Beispiel #26
0
 def test_lookup_parent(self):
     branch = self.make_branch('.')
     branch.set_parent('http://a')
     self.assertEqual('http://a', directories.dereference(':parent'))