~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to fetch_missing.py

  • Committer: Robert Collins
  • Date: 2005-09-13 22:56:18 UTC
  • mfrom: (152.1.2)
  • mto: (147.2.6) (364.1.3 bzrtools)
  • mto: This revision was merged to the branch mainline in revision 324.
  • Revision ID: robertc@robertcollins.net-20050913225618-3f3089d5a0f89cfb
merge from abently

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
def fetch_missing(branch):
20
20
    """Install the revisions of missing ancestors from another branch."""
21
21
    this_branch = find_branch('.')
 
22
    if branch is None:
 
23
        try:
 
24
            branch = this_branch.controlfile("x-pull", "rb").read().rstrip('\n')
 
25
            print "Using last location: %s" % branch
 
26
        except IOError, e:
 
27
            if e.errno != errno.ENOENT:
 
28
                raise
 
29
            else:
 
30
                raise BzrCommandError("No pull location known or specified.")
 
31
 
22
32
    other_branch = find_branch(branch)
23
33
    installed = []
24
34
    failed = []