Mercurial > hg-git
view tests/test-hg-tags.t @ 1127:108d9303ef71
git_handler: use repo.__getitem__ instead of (removed) repo.changectx
As stated in https://phab.mercurial-scm.org/D3037,
repo.__getitem__ should be used instead of repo.changectx, which was removed.
author | Paul Morelle <paul.morelle@octobus.net> |
---|---|
date | Thu, 17 May 2018 07:51:47 +0200 |
parents | 93689e8f27ac |
children |
line wrap: on
line source
Load commonly used test logic $ . "$TESTDIR/testutil" $ git init gitrepo Initialized empty Git repository in $TESTTMP/gitrepo/.git/ $ cd gitrepo $ echo alpha > alpha $ git add alpha $ fn_git_commit -m "add alpha" $ git checkout -b not-master Switched to a new branch 'not-master' $ cd .. $ hg clone gitrepo hgrepo | grep -v '^updating' importing git objects into hg 1 files updated, 0 files merged, 0 files removed, 0 files unresolved $ cd hgrepo $ hg co master | egrep -v '^\(activating bookmark master\)$' 0 files updated, 0 files merged, 0 files removed, 0 files unresolved $ fn_hg_tag alpha $ hg push pushing to $TESTTMP/gitrepo searching for changes adding objects added 1 commits with 1 trees and 1 blobs updating reference refs/heads/master adding reference refs/tags/alpha $ hg log --graph @ changeset: 1:e8b150f84560 | bookmark: master | tag: default/master | tag: tip | user: test | date: Mon Jan 01 00:00:11 2007 +0000 | summary: Added tag alpha for changeset ff7a2f2d8d70 | o changeset: 0:ff7a2f2d8d70 bookmark: not-master tag: alpha tag: default/not-master user: test <test@example.org> date: Mon Jan 01 00:00:10 2007 +0000 summary: add alpha $ cd .. $ cd gitrepo git should have the tag alpha $ git tag -l alpha $ cd .. $ hg clone gitrepo hgrepo2 | grep -v '^updating' importing git objects into hg 2 files updated, 0 files merged, 0 files removed, 0 files unresolved $ hg -R hgrepo2 log --graph @ changeset: 1:e8b150f84560 | bookmark: master | tag: default/master | tag: tip | user: test | date: Mon Jan 01 00:00:11 2007 +0000 | summary: Added tag alpha for changeset ff7a2f2d8d70 | o changeset: 0:ff7a2f2d8d70 bookmark: not-master tag: alpha tag: default/not-master user: test <test@example.org> date: Mon Jan 01 00:00:10 2007 +0000 summary: add alpha the tag should be in .hgtags $ cat hgrepo2/.hgtags ff7a2f2d8d7099694ae1e8b03838d40575bebb63 alpha