~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/codehosting/inmemory.py

  • Committer: Launchpad Patch Queue Manager
  • Date: 2009-07-09 09:55:54 UTC
  • mfrom: (8811.1.2 acquireBranchToPull-tweaks)
  • Revision ID: launchpad@pqm.canonical.com-20090709095554-d7885f4lep62mqdc
[r=rockstar][ui=none] small tweaks to acquireBranchToPull found when
        trying to use it in anger

Show diffs side-by-side

added added

removed removed

Lines of Context:
473
473
            branch = branches[-1]
474
474
            self.startMirroring(branch.id)
475
475
            default_branch = branch.target.default_stacked_on_branch
476
 
            if default_branch:
477
 
                default_branch_name = default_branch.unique_name
 
476
            if default_branch is None:
 
477
                default_branch_name = ''
 
478
            elif (branch.branch_type == BranchType.MIRRORED
 
479
                  and default_branch.private):
 
480
                default_branch_name = ''
478
481
            else:
479
 
                default_branch_name = ''
 
482
                default_branch_name = '/' + default_branch.unique_name
480
483
            return (branch.id, branch.getPullURL(), branch.unique_name,
481
484
                    default_branch_name, branch.branch_type.name)
482
485
        else: