Commit 6f201508 authored by Dan Villiom Podlaski Christiansen's avatar Dan Villiom Podlaski Christiansen
Browse files

b0rken: show how detached tags screw things up

parent 70b8d8256f1e
Pipeline #57750 failed with stages
in 6 minutes and 8 seconds
......@@ -216,3 +216,130 @@
$ hg id --branch -r default/thebranch
thebranch
$ cd ..
And we can push safely:
$ cd hgrepo
$ hg push
pushing to $TESTTMP/repo.git
searching for changes
no changes found
[1]
$ cd ..
$ cd hgrepo
$ hg push
pushing to $TESTTMP/repo.git
searching for changes
no changes found
[1]
$ hg merge default/thebranch
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit)
$ fn_hg_commit -m "merge with git"
$ hg push
pushing to $TESTTMP/repo.git
searching for changes
adding objects
added 3 commits with 2 trees and 0 blobs
updating reference refs/heads/thebranch
$ cd ..
Now try creating a tag that on a detached head:
$ cd gitrepo
$ git pull --ff-only
From $TESTTMP/repo
2a5a61e..b5d24d4 thebranch -> origin/thebranch
Updating 2a5a61e..b5d24d4
Fast-forward
beta | 0
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 beta
$ git checkout --quiet HEAD
$ touch zeta
$ git add zeta
$ fn_git_commit -m zeta
$ git tag thetag
$ git push origin thetag
To $TESTTMP/repo.git
* [new tag] thetag -> thetag
$ cd ..
$ cd hgrepo
$ hg pull
pulling from $TESTTMP/repo.git
importing 1 git commits
new changesets 33976059b3dd
5 local changesets published
(run 'hg update' to get a working copy)
$ hg log --graph --template=phases
o changeset: 7:33976059b3dd
| branch: main
| tag: thetag
| tag: tip
| phase: public
| user: test <test@example.org>
| date: Mon Jan 01 00:00:16 2007 +0000
| summary: zeta
|
@ changeset: 6:561bd24d482d
|\ branch: thebranch
| | tag: default/thebranch
| | phase: public
| | parent: 3:d5b964fddf49
| | parent: 5:f413394b4fc4
| | user: test
| | date: Mon Jan 01 00:00:15 2007 +0000
| | summary: merge with git
| |
| o changeset: 5:f413394b4fc4
| | branch: thebranch
| | phase: public
| | parent: 2:8904f9a8e8d8
| | user: test <test@example.org>
| | date: Mon Jan 01 00:00:14 2007 +0000
| | summary: epsilon
| |
| | o changeset: 4:db332cb6377d
| | | tag: default/main
| | | phase: public
| | | parent: 0:d4b83afc35d1
| | | user: test <test@example.org>
| | | date: Mon Jan 01 00:00:13 2007 +0000
| | | summary: delta
| | |
_ | | changeset: 3:d5b964fddf49
| | | branch: thebranch
| | | phase: public
| | | parent: 1:29e8d812a2dd
| | | user: test
| | | date: Thu Jan 01 00:00:00 1970 +0000
| | | summary: close branch head
| | |
| o | changeset: 2:8904f9a8e8d8
| |/ branch: thebranch
| | phase: public
| | parent: 0:d4b83afc35d1
| | user: test
| | date: Mon Jan 01 00:00:12 2007 +0000
| | summary: gamma
| |
o | changeset: 1:29e8d812a2dd
|/ branch: thebranch
| phase: public
| user: test
| date: Mon Jan 01 00:00:11 2007 +0000
| summary: beta
|
o changeset: 0:d4b83afc35d1
phase: public
user: test
date: Mon Jan 01 00:00:10 2007 +0000
summary: alpha
$ hg push
pushing to $TESTTMP/repo.git
searching for changes
abort: pushing refs/heads/main overwrites 33976059b3dd
[255]
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment