diff options
-rwxr-xr-x | lorry | 5 | ||||
-rwxr-xr-x | tests/pushspecs-only.script | 4 | ||||
-rwxr-xr-x | tests/setup_once | 4 |
3 files changed, 8 insertions, 5 deletions
@@ -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 |