~bzr/ubuntu/hardy/bzr/bzr-ppa

« back to all changes in this revision

Viewing changes to bzrlib/branch.py

  • Committer: Max Bowsher
  • Date: 2011-07-17 23:28:38 UTC
  • mfrom: (76.4.18 lucid)
  • mto: This revision was merged to the branch mainline in revision 167.
  • Revision ID: _@maxb.eu-20110717232838-gpnotk0m40tikqvw
Tags: 2.3.4-0~bazaar1~karmic1
MergeĀ 2.3.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
3466
3466
        if local and not bound_location:
3467
3467
            raise errors.LocalRequiresBoundBranch()
3468
3468
        master_branch = None
3469
 
        source_is_master = (self.source.user_url == bound_location)
 
3469
        source_is_master = False
 
3470
        if bound_location:
 
3471
            # bound_location comes from a config file, some care has to be
 
3472
            # taken to relate it to source.user_url
 
3473
            normalized = urlutils.normalize_url(bound_location)
 
3474
            try:
 
3475
                relpath = self.source.user_transport.relpath(normalized)
 
3476
                source_is_master = (relpath == '')
 
3477
            except (errors.PathNotChild, errors.InvalidURL):
 
3478
                source_is_master = False
3470
3479
        if not local and bound_location and not source_is_master:
3471
3480
            # not pulling from master, so we need to update master.
3472
3481
            master_branch = self.target.get_master_branch(possible_transports)