~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/info.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-02-11 03:19:13 UTC
  • mfrom: (4792.9.3 profile-imports)
  • Revision ID: pqm@pqm.ubuntu.com-20100211031913-hu2gowhvmu10djr8
(mbp) profile_imports handles single-argument __import__

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005-2010 Canonical Ltd
 
1
# Copyright (C) 2005, 2006, 2007 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
17
17
__all__ = ['show_bzrdir_info']
18
18
 
19
19
from cStringIO import StringIO
 
20
import os
20
21
import time
21
22
import sys
22
23
 
23
24
from bzrlib import (
24
25
    bzrdir,
 
26
    diff,
25
27
    errors,
26
28
    hooks as _mod_hooks,
27
29
    osutils,
78
80
 
79
81
def gather_location_info(repository, branch=None, working=None):
80
82
    locs = {}
81
 
    repository_path = repository.user_url
 
83
    repository_path = repository.bzrdir.root_transport.base
82
84
    if branch is not None:
83
 
        branch_path = branch.user_url
 
85
        branch_path = branch.bzrdir.root_transport.base
84
86
        master_path = branch.get_bound_location()
85
87
        if master_path is None:
86
88
            master_path = branch_path
88
90
        branch_path = None
89
91
        master_path = None
90
92
    if working:
91
 
        working_path = working.user_url
 
93
        working_path = working.bzrdir.root_transport.base
92
94
        if working_path != branch_path:
93
95
            locs['light checkout root'] = working_path
94
96
        if master_path != branch_path:
418
420
        if branch is None and tree is not None:
419
421
            phrase = "branchless tree"
420
422
        else:
421
 
            if (tree is not None and tree.user_url !=
422
 
                branch.user_url):
 
423
            if (tree is not None and tree.bzrdir.root_transport.base !=
 
424
                branch.bzrdir.root_transport.base):
423
425
                independence = ''
424
426
                phrase = "Lightweight checkout"
425
427
            elif branch.get_bound_location() is not None:
444
446
    """
445
447
    candidates  = []
446
448
    if (branch is not None and tree is not None and
447
 
        branch.user_url != tree.user_url):
 
449
        branch.bzrdir.root_transport.base !=
 
450
        tree.bzrdir.root_transport.base):
448
451
        branch = None
449
452
        repository = None
450
453
    non_aliases = set(bzrdir.format_registry.keys())