From: Felipe Contreras Date: Tue, 30 Oct 2012 04:35:26 GMT Subject: [PATCH v5 04/14] remote-hg: add support for remote pushing Message-ID: <1351571736-4682-5-git-send-email-felipe.contreras@gmail.com> In-Reply-To: <1351571736-4682-1-git-send-email-felipe.contreras@gmail.com> Signed-off-by: Felipe Contreras --- contrib/remote-hg/git-remote-hg | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/contrib/remote-hg/git-remote-hg b/contrib/remote-hg/git-remote-hg index 337ba40..959ab80 100755 --- a/contrib/remote-hg/git-remote-hg +++ b/contrib/remote-hg/git-remote-hg @@ -183,7 +183,7 @@ def fixup_user(user): return '%s <%s>' % (name, mail) def get_repo(url, alias): - global dirname + global dirname, peer myui = ui.ui() myui.setconfig('ui', 'interactive', 'off') @@ -511,7 +511,7 @@ def parse_tag(parser): # nothing to do def do_export(parser): - global parsed_refs + global parsed_refs, peer parser.next() @@ -542,12 +542,17 @@ def do_export(parser): print + if peer: + parser.repo.push(peer, force=False) + def main(args): global prefix, dirname, branches, bmarks global marks, blob_marks, parsed_refs + global peer alias = args[1] url = args[2] + peer = None gitdir = os.environ['GIT_DIR'] dirname = os.path.join(gitdir, 'hg', alias) -- 1.8.0