Merge branch 'fc/remote-bzr'

* fc/remote-bzr:
  remote-bzr: use proper push method
This commit is contained in:
Junio C Hamano 2013-04-26 15:18:26 -07:00
commit df8597258e

View File

@ -633,12 +633,12 @@ def do_export(parser):
for ref, revid in parsed_refs.iteritems(): for ref, revid in parsed_refs.iteritems():
if ref == 'refs/heads/master': if ref == 'refs/heads/master':
repo.generate_revision_history(revid, marks.get_tip('master')) repo.generate_revision_history(revid, marks.get_tip('master'))
revno, revid = repo.last_revision_info()
if peer: if peer:
if hasattr(peer, "import_last_revision_info_and_tags"): try:
peer.import_last_revision_info_and_tags(repo, revno, revid) repo.push(peer, stop_revision=revid)
else: except bzrlib.errors.DivergedBranches:
peer.import_last_revision_info(repo.repository, revno, revid) print "error %s non-fast forward" % ref
continue
else: else:
wt = repo.bzrdir.open_workingtree() wt = repo.bzrdir.open_workingtree()
wt.update() wt.update()