summaryrefslogtreecommitdiff
path: root/contrib/remote-helpers
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/remote-helpers')
-rwxr-xr-xcontrib/remote-helpers/git-remote-bzr9
-rwxr-xr-xcontrib/remote-helpers/git-remote-hg3
-rwxr-xr-xcontrib/remote-helpers/test-bzr.sh38
3 files changed, 27 insertions, 23 deletions
diff --git a/contrib/remote-helpers/git-remote-bzr b/contrib/remote-helpers/git-remote-bzr
index bd25e08202..aa7bc97bee 100755
--- a/contrib/remote-helpers/git-remote-bzr
+++ b/contrib/remote-helpers/git-remote-bzr
@@ -249,7 +249,7 @@ def export_files(tree, files):
return final
def export_branch(branch, name):
- global prefix, dirname
+ global prefix
ref = '%s/heads/%s' % (prefix, name)
tip = marks.get_tip(name)
@@ -335,8 +335,10 @@ def export_branch(branch, name):
marks.set_tip(name, revid)
def export_tag(repo, name):
- global tags
- print "reset refs/tags/%s" % name
+ global tags, prefix
+
+ ref = '%s/tags/%s' % (prefix, name)
+ print "reset %s" % ref
print "from :%u" % rev_to_mark(tags[name])
print
@@ -649,6 +651,7 @@ def do_capabilities(parser):
print "import"
print "export"
print "refspec refs/heads/*:%s/heads/*" % prefix
+ print "refspec refs/tags/*:%s/tags/*" % prefix
path = os.path.join(dirname, 'marks-git')
diff --git a/contrib/remote-helpers/git-remote-hg b/contrib/remote-helpers/git-remote-hg
index 328c2dc76d..45f6c80d45 100755
--- a/contrib/remote-helpers/git-remote-hg
+++ b/contrib/remote-helpers/git-remote-hg
@@ -326,6 +326,8 @@ def export_ref(repo, name, kind, head):
else:
modified, removed = get_filechanges(repo, c, parents[0])
+ desc += '\n'
+
if mode == 'hg':
extra_msg = ''
@@ -349,7 +351,6 @@ def export_ref(repo, name, kind, head):
else:
extra_msg += "extra : %s : %s\n" % (key, urllib.quote(value))
- desc += '\n'
if extra_msg:
desc += '\n--HG--\n' + extra_msg
diff --git a/contrib/remote-helpers/test-bzr.sh b/contrib/remote-helpers/test-bzr.sh
index e800c97fcf..34666e1d0f 100755
--- a/contrib/remote-helpers/test-bzr.sh
+++ b/contrib/remote-helpers/test-bzr.sh
@@ -169,31 +169,30 @@ test_expect_success 'fetch utf-8 filenames' '
mkdir -p tmp && cd tmp &&
test_when_finished "cd .. && rm -rf tmp && LC_ALL=C" &&
- export LC_ALL=en_US.UTF-8
-
+ LC_ALL=en_US.UTF-8
+ export LC_ALL
(
bzr init bzrrepo &&
cd bzrrepo &&
- echo test >> "áéíóú" &&
- bzr add "áéíóú" &&
- echo test >> "îø∫∆" &&
- bzr add "îø∫∆" &&
- bzr commit -m utf-8 &&
- echo test >> "áéíóú" &&
- bzr commit -m utf-8 &&
- bzr rm "îø∫∆" &&
- bzr mv "áéíóú" "åß∂" &&
- bzr commit -m utf-8
+ echo test >> "ærø" &&
+ bzr add "ærø" &&
+ echo test >> "ø~?" &&
+ bzr add "ø~?" &&
+ bzr commit -m add-utf-8 &&
+ echo test >> "ærø" &&
+ bzr commit -m test-utf-8 &&
+ bzr rm "ø~?" &&
+ bzr mv "ærø" "ø~?" &&
+ bzr commit -m bzr-mv-utf-8
) &&
(
git clone "bzr::$PWD/bzrrepo" gitrepo &&
cd gitrepo &&
- git ls-files > ../actual
+ git -c core.quotepath=false ls-files > ../actual
) &&
-
- echo "\"\\303\\245\\303\\237\\342\\210\\202\"" > expected &&
+ echo "ø~?" > expected &&
test_cmp expected actual
'
@@ -201,7 +200,8 @@ test_expect_success 'push utf-8 filenames' '
mkdir -p tmp && cd tmp &&
test_when_finished "cd .. && rm -rf tmp && LC_ALL=C" &&
- export LC_ALL=en_US.UTF-8
+ LC_ALL=en_US.UTF-8
+ export LC_ALL
(
bzr init bzrrepo &&
@@ -216,15 +216,15 @@ test_expect_success 'push utf-8 filenames' '
git clone "bzr::$PWD/bzrrepo" gitrepo &&
cd gitrepo &&
- echo test >> "áéíóú" &&
- git add "áéíóú" &&
+ echo test >> "ærø" &&
+ git add "ærø" &&
git commit -m utf-8 &&
git push
) &&
(cd bzrrepo && bzr ls > ../actual) &&
- echo -e "content\náéíóú" > expected &&
+ printf "content\nærø\n" > expected &&
test_cmp expected actual
'