1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115
|
Load commonly used test logic
$ . "$TESTDIR/testutil"
This test verifies that outgoing with orphaned annotated tags, and
that actually pushing such a tag works.
Initialize the bare repository
$ mkdir repo.git
$ cd repo.git
$ git init -q --bare
$ cd ..
Populate the git repository
$ git clone -q repo.git gitrepo
warning: You appear to have cloned an empty repository.
$ cd gitrepo
$ touch foo1
$ git add foo1
$ fn_git_commit -m initial
$ touch foo2
$ git add foo2
$ fn_git_commit -m "add foo2"
Create a temporary branch and tag
$ git checkout -qb the_branch
$ touch foo3
$ git add foo3
$ fn_git_commit -m "add foo3"
$ fn_git_tag the_tag -m "Tag message"
$ git tag -ln
the_tag Tag message
$ git push --quiet --set-upstream origin the_branch
Branch 'the_branch' set up to track remote branch 'the_branch' from 'origin'. (?)
$ git push --tags
To $TESTTMP/repo.git
* [new tag] the_tag -> the_tag
Continue the master branch
$ git checkout -q master
$ touch foo4
$ git add foo4
$ fn_git_commit -m "add foo4"
$ git push
To $TESTTMP/repo.git
* [new branch] master -> master
Delete the temporary branch
$ git branch -D the_branch
Deleted branch the_branch (was e128523).
$ git push --delete origin the_branch
To $TESTTMP/repo.git
- [deleted] the_branch
$ cd ..
Create a Mercurial clone
$ hg clone -U repo.git hgrepo
importing 4 git commits
new changesets b8e77484829b:387d03400596 (4 drafts)
$ hg outgoing -R hgrepo
comparing with $TESTTMP/repo.git
searching for changes
no changes found
[1]
$ hg push --debug -R hgrepo | grep -e reference -e found
unchanged reference default::refs/heads/master => GIT:996e5084
unchanged reference default::refs/tags/the_tag => GIT:e4338156
no changes found
Verify that we can push this tag, and that outgoing doesn't report
them (#358)
$ cd gitrepo
$ git tag --delete the_tag
Deleted tag 'the_tag' (was e433815)
$ git push --delete origin the_tag
To $TESTTMP/repo.git
- [deleted] the_tag
$ cd ../hgrepo
$ hg outgoing
comparing with $TESTTMP/repo.git
searching for changes
changeset: 2:7b35eb0afb3f
tag: the_tag
user: test <test@example.org>
date: Mon Jan 01 00:00:12 2007 +0000
summary: add foo3
$ hg push --debug
pushing to $TESTTMP/repo.git
finding unexported changesets
saving git map to $TESTTMP/hgrepo/.hg/git-mapfile
searching for changes
remote: counting objects: 5, done.
1 commits found
list of commits:
e12852326ef72772e9696b008ad6546b5266ff13
adding objects
remote: counting objects: 5, done.
remote: found 0 deltas to reuse
added 1 commits with 1 trees and 0 blobs
unchanged reference default::refs/heads/master => GIT:996e5084
adding reference default::refs/tags/the_tag => GIT:e4338156
$ cd ../gitrepo
$ git fetch
From $TESTTMP/repo
* [new tag] the_tag -> the_tag
$ git tag -ln
the_tag Tag message
|