~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to fetch_ghosts.py

  • Committer: Aaron Bentley
  • Date: 2005-10-07 16:07:14 UTC
  • Revision ID: abentley@panoramicfeedback.com-20051007160714-676dd704997013c1
Show branch location when using saved.

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
16
16
from bzrlib.branch import Branch
17
17
from bzrlib.fetch import greedy_fetch
18
 
from bzrlib.errors import NoSuchRevision, InstallFailed
 
18
from bzrlib.errors import NoSuchRevision, InstallFailed, BzrCommandError
19
19
def fetch_ghosts(branch):
20
20
    """Install ghosts from copies in another branch."""
21
21
    this_branch = Branch.open_containing('.')
22
22
    if branch is None:
23
23
        branch = this_branch.get_parent()
 
24
        if branch is None:
 
25
            raise BzrCommandError('No branch specified and no location saved.')
 
26
        else:
 
27
            print "Using saved location %s" % branch
24
28
 
25
29
    other_branch = Branch.open_containing(branch)
26
30
    installed = []