~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

fixed location handling to match old missing

Show diffs side-by-side

added added

removed removed

Lines of Context:
1761
1761
        from bzrlib.missing import find_unmerged
1762
1762
        from bzrlib.log import log_formatter
1763
1763
        local_branch = bzrlib.branch.Branch.open_containing(".")[0]
 
1764
        parent = local_branch.get_parent()
1764
1765
        if other_branch is None:
 
1766
            other_branch = parent
 
1767
            if other_branch is None:
 
1768
                raise BzrCommandError("No missing location known or specified.")
1765
1769
            print "Using last location: " + local_branch.get_parent()
1766
 
            other_branch = local_branch.get_parent()
1767
1770
        remote_branch = bzrlib.branch.Branch.open(other_branch)
1768
1771
        local_extra, remote_extra = find_unmerged(local_branch, remote_branch)
1769
1772
        log_format = get_log_format(long=long, short=short, line=line)
1788
1791
                lf.show(revno, remote_branch.get_revision(revision_id), None)
1789
1792
        if not remote_extra and not local_extra:
1790
1793
            print "Branches are up to date."
 
1794
        if parent is None and other_branch is not None:
 
1795
            local_branch.set_parent(other_branch)
1791
1796
 
1792
1797
 
1793
1798
class cmd_plugins(Command):