2032
2032
raise BzrCommandError("No missing location known or specified.")
2033
2033
print "Using last location: " + local_branch.get_parent()
2034
2034
remote_branch = bzrlib.branch.Branch.open(other_branch)
2035
local_extra, remote_extra = find_unmerged(local_branch, remote_branch)
2036
if (log_format == None):
2037
default = bzrlib.config.BranchConfig(local_branch).log_format()
2038
log_format = get_log_format(long=long, short=short, line=line, default=default)
2039
lf = log_formatter(log_format, sys.stdout,
2041
show_timezone='original')
2042
if reverse is False:
2043
local_extra.reverse()
2044
remote_extra.reverse()
2045
if local_extra and not theirs_only:
2046
print "You have %d extra revision(s):" % len(local_extra)
2047
for data in iter_log_data(local_extra, local_branch.repository,
2050
printed_local = True
2052
printed_local = False
2053
if remote_extra and not mine_only:
2054
if printed_local is True:
2056
print "You are missing %d revision(s):" % len(remote_extra)
2057
for data in iter_log_data(remote_extra, remote_branch.repository,
2060
if not remote_extra and not local_extra:
2062
print "Branches are up to date."
2065
if parent is None and other_branch is not None:
2066
local_branch.set_parent(other_branch)
2035
remote_branch.lock_read()
2037
local_branch.lock_write()
2039
local_extra, remote_extra = find_unmerged(local_branch, remote_branch)
2040
if (log_format == None):
2041
default = bzrlib.config.BranchConfig(local_branch).log_format()
2042
log_format = get_log_format(long=long, short=short, line=line, default=default)
2043
lf = log_formatter(log_format, sys.stdout,
2045
show_timezone='original')
2046
if reverse is False:
2047
local_extra.reverse()
2048
remote_extra.reverse()
2049
if local_extra and not theirs_only:
2050
print "You have %d extra revision(s):" % len(local_extra)
2051
for data in iter_log_data(local_extra, local_branch.repository,
2054
printed_local = True
2056
printed_local = False
2057
if remote_extra and not mine_only:
2058
if printed_local is True:
2060
print "You are missing %d revision(s):" % len(remote_extra)
2061
for data in iter_log_data(remote_extra, remote_branch.repository,
2064
if not remote_extra and not local_extra:
2066
print "Branches are up to date."
2069
if parent is None and other_branch is not None:
2070
local_branch.set_parent(other_branch)
2073
local_branch.unlock()
2075
remote_branch.unlock()
2070
2078
class cmd_plugins(Command):