summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xlorry5
-rwxr-xr-xtests/pushspecs-only.script4
-rwxr-xr-xtests/setup_once4
3 files changed, 8 insertions, 5 deletions
diff --git a/lorry b/lorry
index cf5d9b5..c3c7608 100755
--- a/lorry
+++ b/lorry
@@ -155,7 +155,10 @@ class Lorry(cliapp.Application):
'--window=250'], cwd=gitdir)
self.bundle(name, gitdir)
if not self.settings['pull-only']:
- self.push_to_mirror_server(gitdir)
+ if 'refspecs' in spec:
+ self.push_to_mirror_server(gitdir, spec['refspecs'])
+ else:
+ self.push_to_mirror_server(gitdir)
def add_remote(self, name, gitdir):
diff --git a/tests/pushspecs-only.script b/tests/pushspecs-only.script
index 1be8fb3..787cc38 100755
--- a/tests/pushspecs-only.script
+++ b/tests/pushspecs-only.script
@@ -31,7 +31,7 @@ cat >"$lorryfile" <<EOF
"url": "file://$git_upstream",
"refspecs": [
"master",
- "refs/tags/rc*"
+ "refs/tags/rc/*"
]
}
}
@@ -48,5 +48,5 @@ git init --quiet --bare "$mirror_path"/pushspecs.git
allrefs="$(cd "$mirror_path"/pushspecs.git && git for-each-ref | sort)"
wantedrefs="$(cd "$mirror_path"/pushspecs.git &&
- git for-each-ref master 'refs/tags/rc*' | sort)"
+ git for-each-ref refs/heads/master 'refs/tags/rc/*' | sort)"
test "$allrefs" = "$wantedrefs"
diff --git a/tests/setup_once b/tests/setup_once
index afaaaf0..ec039b7 100755
--- a/tests/setup_once
+++ b/tests/setup_once
@@ -38,7 +38,7 @@ git add newfile.txt
git commit --quiet -m 'add newfile.txt'
git checkout master
git merge topic/newfile
-git tag rc1
+git tag rc/1
git checkout topic/morelines
for i in `seq 2 10`; do
echo line $i >>file.txt
@@ -46,5 +46,5 @@ done
git commit --quiet -m 'add more lines' file.txt
git checkout master
git merge topic/morelines
-git tag rc2
+git tag rc/2