mirror of
https://github.com/mnauw/git-remote-hg.git
synced 2025-11-11 13:45:40 +01:00
remote-hg: make sure fake bookmarks are updated
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
@@ -710,9 +710,16 @@ def do_export(parser):
|
|||||||
old = bmarks[bmark].hex()
|
old = bmarks[bmark].hex()
|
||||||
else:
|
else:
|
||||||
old = ''
|
old = ''
|
||||||
|
|
||||||
|
if bmark == 'master' and 'master' not in parser.repo._bookmarks:
|
||||||
|
# fake bookmark
|
||||||
|
print "ok %s" % ref
|
||||||
|
continue
|
||||||
|
|
||||||
if not bookmarks.pushbookmark(parser.repo, bmark, old, node):
|
if not bookmarks.pushbookmark(parser.repo, bmark, old, node):
|
||||||
print "error %s" % ref
|
print "error %s" % ref
|
||||||
continue
|
continue
|
||||||
|
|
||||||
elif ref.startswith('refs/tags/'):
|
elif ref.startswith('refs/tags/'):
|
||||||
tag = ref[len('refs/tags/'):]
|
tag = ref[len('refs/tags/'):]
|
||||||
parser.repo.tag([tag], node, None, True, None, {})
|
parser.repo.tag([tag], node, None, True, None, {})
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ git_clone () {
|
|||||||
hg_clone () {
|
hg_clone () {
|
||||||
(
|
(
|
||||||
hg init $2 &&
|
hg init $2 &&
|
||||||
|
hg -R $2 bookmark -i master &&
|
||||||
cd $1 &&
|
cd $1 &&
|
||||||
git push -q "hg::$PWD/../$2" 'refs/tags/*:refs/tags/*' 'refs/heads/*:refs/heads/*'
|
git push -q "hg::$PWD/../$2" 'refs/tags/*:refs/tags/*' 'refs/heads/*:refs/heads/*'
|
||||||
) &&
|
) &&
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ git_clone_git () {
|
|||||||
hg_clone_git () {
|
hg_clone_git () {
|
||||||
(
|
(
|
||||||
hg init $2 &&
|
hg init $2 &&
|
||||||
|
hg -R $2 bookmark -i master &&
|
||||||
cd $1 &&
|
cd $1 &&
|
||||||
git push -q "hg::$PWD/../$2" 'refs/tags/*:refs/tags/*' 'refs/heads/*:refs/heads/*'
|
git push -q "hg::$PWD/../$2" 'refs/tags/*:refs/tags/*' 'refs/heads/*:refs/heads/*'
|
||||||
) &&
|
) &&
|
||||||
|
|||||||
Reference in New Issue
Block a user