summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorLibravatar Felipe Contreras <felipe.contreras@gmail.com>2013-04-11 07:23:01 -0500
committerLibravatar Junio C Hamano <gitster@pobox.com>2013-04-11 10:46:46 -0700
commit8120014e2ba0e65748c8a3c1642bed0891be851d (patch)
tree3fd5920f848906856e8a162a8de90759e4dfe1ba /contrib
parentremote-hg: fix for files with spaces (diff)
downloadtgif-8120014e2ba0e65748c8a3c1642bed0891be851d.tar.xz
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>
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/remote-helpers/git-remote-hg7
-rwxr-xr-xcontrib/remote-helpers/test-hg-bidi.sh1
-rwxr-xr-xcontrib/remote-helpers/test-hg-hg-git.sh1
3 files changed, 9 insertions, 0 deletions
diff --git a/contrib/remote-helpers/git-remote-hg b/contrib/remote-helpers/git-remote-hg
index c6a1a47cc8..b200e60c70 100755
--- a/contrib/remote-helpers/git-remote-hg
+++ b/contrib/remote-helpers/git-remote-hg
@@ -709,9 +709,16 @@ def do_export(parser):
old = bmarks[bmark].hex()
else:
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):
print "error %s" % ref
continue
+
elif ref.startswith('refs/tags/'):
tag = ref[len('refs/tags/'):]
parser.repo.tag([tag], node, None, True, None, {})
diff --git a/contrib/remote-helpers/test-hg-bidi.sh b/contrib/remote-helpers/test-hg-bidi.sh
index 1d61982436..fe38e49bc1 100755
--- a/contrib/remote-helpers/test-hg-bidi.sh
+++ b/contrib/remote-helpers/test-hg-bidi.sh
@@ -30,6 +30,7 @@ git_clone () {
hg_clone () {
(
hg init $2 &&
+ hg -R $2 bookmark -i master &&
cd $1 &&
git push -q "hg::$PWD/../$2" 'refs/tags/*:refs/tags/*' 'refs/heads/*:refs/heads/*'
) &&
diff --git a/contrib/remote-helpers/test-hg-hg-git.sh b/contrib/remote-helpers/test-hg-hg-git.sh
index 7e3967f5b6..4c71c45d0a 100755
--- a/contrib/remote-helpers/test-hg-hg-git.sh
+++ b/contrib/remote-helpers/test-hg-hg-git.sh
@@ -35,6 +35,7 @@ git_clone_git () {
hg_clone_git () {
(
hg init $2 &&
+ hg -R $2 bookmark -i master &&
cd $1 &&
git push -q "hg::$PWD/../$2" 'refs/tags/*:refs/tags/*' 'refs/heads/*:refs/heads/*'
) &&