From: Junio C Hamano Date: Fri, 26 Apr 2013 22:19:03 +0000 (-0700) Subject: Merge branch 'fc/remote-hg' X-Git-Tag: v1.8.3-rc0~14 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/c8c82b1ba3fd03b3de4d2c6c760b75726f519cb8?ds=inline;hp=-c Merge branch 'fc/remote-hg' * fc/remote-hg: remote-hg: strip extra newline remote-hg: use marks instead of inlined files remote-hg: small performance improvement remote-hg: allow refs with spaces remote-hg: don't update bookmarks unnecessarily remote-hg: add support for schemes extension remote-hg: improve email sanitation remote-hg: add custom local tag write code remote-hg: write tags in the appropriate branch remote-hg: custom method to write tags remote-hg: add support for tag objects remote-hg: add branch_tip() helper remote-hg: properly mark branches up-to-date remote-hg: use python urlparse remote-hg: safer bookmark pushing remote-helpers: avoid has_key --- c8c82b1ba3fd03b3de4d2c6c760b75726f519cb8 diff --combined contrib/remote-helpers/git-remote-bzr index a622122c86,cc6609b2f8..dcda351d35 --- a/contrib/remote-helpers/git-remote-bzr +++ b/contrib/remote-helpers/git-remote-bzr @@@ -94,7 -94,7 +94,7 @@@ class Marks return self.last_mark def is_marked(self, rev): - return self.marks.has_key(rev) + return str(rev) in self.marks def new_mark(self, rev, mark): self.marks[rev] = mark @@@ -633,12 -633,12 +633,12 @@@ def do_export(parser) for ref, revid in parsed_refs.iteritems(): if ref == 'refs/heads/master': repo.generate_revision_history(revid, marks.get_tip('master')) - revno, revid = repo.last_revision_info() if peer: - if hasattr(peer, "import_last_revision_info_and_tags"): - peer.import_last_revision_info_and_tags(repo, revno, revid) - else: - peer.import_last_revision_info(repo.repository, revno, revid) + try: + repo.push(peer, stop_revision=revid) + except bzrlib.errors.DivergedBranches: + print "error %s non-fast forward" % ref + continue else: wt = repo.bzrdir.open_workingtree() wt.update()