# HG changeset patch # User Tay Ray Chuan # Date 1268629806 -28800 # Node ID af8d8fbc8025774a2fde95edfaf91a29f4a75210 # Parent 126ce54030f51954c2138016d4f7a26cd0b0a129 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". diff --git a/tests/test-git-tags b/tests/test-git-tags --- 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` diff --git a/tests/test-git-tags.out b/tests/test-git-tags.out --- 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