~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/branch.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2011-07-15 10:34:59 UTC
  • mfrom: (6026.1.1 trunk)
  • Revision ID: pqm@pqm.ubuntu.com-20110715103459-a8mns59n9cqptdn5
(vila) Merge 2.4 into trunk (Vincent Ladeuil)

Show diffs side-by-side

added added

removed removed

Lines of Context:
3344
3344
        if local and not bound_location:
3345
3345
            raise errors.LocalRequiresBoundBranch()
3346
3346
        master_branch = None
3347
 
        source_is_master = (self.source.user_url == bound_location)
 
3347
        source_is_master = False
 
3348
        if bound_location:
 
3349
            # bound_location comes from a config file, some care has to be
 
3350
            # taken to relate it to source.user_url
 
3351
            normalized = urlutils.normalize_url(bound_location)
 
3352
            try:
 
3353
                relpath = self.source.user_transport.relpath(normalized)
 
3354
                source_is_master = (relpath == '')
 
3355
            except (errors.PathNotChild, errors.InvalidURL):
 
3356
                source_is_master = False
3348
3357
        if not local and bound_location and not source_is_master:
3349
3358
            # not pulling from master, so we need to update master.
3350
3359
            master_branch = self.target.get_master_branch(possible_transports)