Mercurial > hg > hg-git
changeset 309:af8d8fbc8025
test-git-tags: test pushing to repo with annotated tags
Currently, this fails with a 'tag has changed' message.
Additionally, set the receive.denyCurrentBranch config, as we're pushing
a branch to a git repo which has checked out that branch. Also, this is
to handle git after v1.7.0, where that config defaults to "refuse".
author | Tay Ray Chuan <rctay89@gmail.com> |
---|---|
date | Mon, 15 Mar 2010 13:10:06 +0800 (2010-03-15) |
parents | 126ce54030f5 |
children | 53b0d608dcd5 |
files | tests/test-git-tags tests/test-git-tags.out |
diffstat | 2 files changed, 10 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-git-tags +++ b/tests/test-git-tags @@ -40,6 +40,7 @@ mkdir gitrepo cd gitrepo git init | python -c "import sys; print sys.stdin.read().replace('$(dirname $(pwd))/', '')" +git config receive.denyCurrentBranch ignore echo alpha > alpha git add alpha commit -m 'add alpha' @@ -56,12 +57,16 @@ --listen=localhost\ --export-all\ --pid-file=gitdaemon.pid \ - --detach --reuseaddr + --detach --reuseaddr \ + --enable=receive-pack hg clone git://localhost/gitrepo hgrepo | grep -v '^updating' cd hgrepo hg log --graph +echo beta-fix >> beta +hg commit -m 'fix for beta' +hg push cd .. kill `cat gitdaemon.pid`
--- a/tests/test-git-tags.out +++ b/tests/test-git-tags.out @@ -21,3 +21,7 @@ date: Mon Jan 01 00:00:10 2007 +0000 summary: add alpha +pushing to git://localhost/gitrepo +importing Hg objects into Git +creating and sending data +abort: refs/tags/beta changed on the server, please pull and merge before pushing