~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/branch.py

  • Committer: Jelmer Vernooij
  • Date: 2010-08-17 22:24:01 UTC
  • mfrom: (5379 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5389.
  • Revision ID: jelmer@samba.org-20100817222401-x6iblsx36pu6bi3r
Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
247
247
        if not local and not config.has_explicit_nickname():
248
248
            try:
249
249
                master = self.get_master_branch(possible_transports)
 
250
                if master and self.user_url == master.user_url:
 
251
                    raise errors.RecursiveBind(self.user_url)
250
252
                if master is not None:
251
253
                    # return the master branch value
252
254
                    return master.nick
 
255
            except errors.RecursiveBind, e:
 
256
                raise e
253
257
            except errors.BzrError, e:
254
258
                # Silently fall back to local implicit nick if the master is
255
259
                # unavailable
1858
1862
            "all are called with the url returned from the previous hook."
1859
1863
            "The order is however undefined.", (1, 9), None))
1860
1864
        self.create_hook(HookPoint('automatic_tag_name',
1861
 
            "Called to determine an automatic tag name for a revision."
 
1865
            "Called to determine an automatic tag name for a revision. "
1862
1866
            "automatic_tag_name is called with (branch, revision_id) and "
1863
1867
            "should return a tag name or None if no tag name could be "
1864
1868
            "determined. The first non-None tag name returned will be used.",
1955
1959
        return self.__dict__ == other.__dict__
1956
1960
 
1957
1961
    def __repr__(self):
1958
 
        if self.branch:
1959
 
            return "<%s of %s>" % (self.__class__.__name__, self.branch)
1960
 
        else:
1961
 
            return "<%s of format:%s bzrdir:%s>" % (
1962
 
                self.__class__.__name__, self.branch,
1963
 
                self.format, self.bzrdir)
 
1962
        return "<%s of %s>" % (self.__class__.__name__, self.branch)
1964
1963
 
1965
1964
 
1966
1965
class SwitchHookParams(object):