/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/branch.py

Merge Martins 0.15rc2 release branch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
455
455
        """
456
456
        raise NotImplementedError(self.get_parent)
457
457
 
 
458
    def _set_config_location(self, name, url, config=None,
 
459
                             make_relative=False):
 
460
        if config is None:
 
461
            config = self.get_config()
 
462
        if url is None:
 
463
            url = ''
 
464
        elif make_relative:
 
465
            url = urlutils.relative_url(self.base, url)
 
466
        config.set_user_option(name, url)
 
467
 
 
468
    def _get_config_location(self, name, config=None):
 
469
        if config is None:
 
470
            config = self.get_config()
 
471
        location = config.get_user_option(name)
 
472
        if location == '':
 
473
            location = None
 
474
        return location
 
475
 
458
476
    def get_submit_branch(self):
459
477
        """Return the submit location of the branch.
460
478
 
473
491
        """
474
492
        self.get_config().set_user_option('submit_branch', location)
475
493
 
 
494
    def get_public_branch(self):
 
495
        """Return the public location of the branch.
 
496
 
 
497
        This is is used by merge directives.
 
498
        """
 
499
        return self._get_config_location('public_branch')
 
500
 
 
501
    def set_public_branch(self, location):
 
502
        """Return the submit location of the branch.
 
503
 
 
504
        This is the default location for bundle.  The usual
 
505
        pattern is that the user can override it by specifying a
 
506
        location.
 
507
        """
 
508
        self._set_config_location('public_branch', location)
 
509
 
476
510
    def get_push_location(self):
477
511
        """Return the None or the location to push this branch to."""
478
512
        raise NotImplementedError(self.get_push_location)
614
648
        else:
615
649
            if parent:
616
650
                destination.set_parent(parent)
 
651
        self.tags.merge_to(destination.tags)
617
652
 
618
653
    @needs_read_lock
619
654
    def check(self):
1948
1983
        self.set_last_revision_info(prev_revno + len(revision_ids),
1949
1984
                                    revision_ids[-1])
1950
1985
 
1951
 
    def _set_config_location(self, name, url, config=None,
1952
 
                             make_relative=False):
1953
 
        if config is None:
1954
 
            config = self.get_config()
1955
 
        if url is None:
1956
 
            url = ''
1957
 
        elif make_relative:
1958
 
            url = urlutils.relative_url(self.base, url)
1959
 
        config.set_user_option(name, url)
1960
 
 
1961
 
 
1962
 
    def _get_config_location(self, name, config=None):
1963
 
        if config is None:
1964
 
            config = self.get_config()
1965
 
        location = config.get_user_option(name)
1966
 
        if location == '':
1967
 
            location = None
1968
 
        return location
1969
 
 
1970
1986
    @needs_write_lock
1971
1987
    def _set_parent_location(self, url):
1972
1988
        """Set the parent branch"""