mirror of
https://github.com/git/git.git
synced 2024-11-01 23:07:55 +01:00
remote-hg: add support for remote pushing
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Jeff King <peff@peff.net>
This commit is contained in:
parent
23b4a11fa4
commit
b4e956f7ef
1 changed files with 7 additions and 2 deletions
|
@ -197,7 +197,7 @@ def fixup_user(user):
|
||||||
return '%s <%s>' % (name, mail)
|
return '%s <%s>' % (name, mail)
|
||||||
|
|
||||||
def get_repo(url, alias):
|
def get_repo(url, alias):
|
||||||
global dirname
|
global dirname, peer
|
||||||
|
|
||||||
myui = ui.ui()
|
myui = ui.ui()
|
||||||
myui.setconfig('ui', 'interactive', 'off')
|
myui.setconfig('ui', 'interactive', 'off')
|
||||||
|
@ -526,7 +526,7 @@ def parse_tag(parser):
|
||||||
# nothing to do
|
# nothing to do
|
||||||
|
|
||||||
def do_export(parser):
|
def do_export(parser):
|
||||||
global parsed_refs, bmarks
|
global parsed_refs, bmarks, peer
|
||||||
|
|
||||||
parser.next()
|
parser.next()
|
||||||
|
|
||||||
|
@ -562,12 +562,17 @@ def do_export(parser):
|
||||||
|
|
||||||
print
|
print
|
||||||
|
|
||||||
|
if peer:
|
||||||
|
parser.repo.push(peer, force=False)
|
||||||
|
|
||||||
def main(args):
|
def main(args):
|
||||||
global prefix, dirname, branches, bmarks
|
global prefix, dirname, branches, bmarks
|
||||||
global marks, blob_marks, parsed_refs
|
global marks, blob_marks, parsed_refs
|
||||||
|
global peer
|
||||||
|
|
||||||
alias = args[1]
|
alias = args[1]
|
||||||
url = args[2]
|
url = args[2]
|
||||||
|
peer = None
|
||||||
|
|
||||||
gitdir = os.environ['GIT_DIR']
|
gitdir = os.environ['GIT_DIR']
|
||||||
dirname = os.path.join(gitdir, 'hg', alias)
|
dirname = os.path.join(gitdir, 'hg', alias)
|
||||||
|
|
Loading…
Reference in a new issue