Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
hg-git
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mercurial
hg-git
Commits
9e6c525744bc
Commit
9e6c525744bc
authored
3 years ago
by
Dan Villiom Podlaski Christiansen
Browse files
Options
Downloads
Patches
Plain Diff
tests: check behaviour when cloning detached heads
parent
5bfcb583bd1b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!124
Adjust initial clone and push behaviour
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/test-clone.t
+40
-0
40 additions, 0 deletions
tests/test-clone.t
with
40 additions
and
0 deletions
tests/test-clone.t
+
40
−
0
View file @
9e6c5257
...
...
@@ -139,3 +139,43 @@
updating to branch default
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ rm -rf empty emptyhg
test cloning detached HEAD, but pointing to a branch; this leads
somewhat counterintuitively to a completely different bookmark being
activated
$ cd gitrepo
$ git checkout -q -d master
$ cd ..
$ hg clone gitrepo hgrepo-2
importing git objects into hg
updating to bookmark beta
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
updating to branch default (no-hg57 !)
2 files updated, 0 files merged, 0 files removed, 0 files unresolved (no-hg57 !)
$ hg -R hgrepo-2 book
* beta 4:47d12948785d
gamma 2:ca33a262eb46
master 0:ff7a2f2d8d70
$ rm -rf hgrepo-2
test cloning fully detached HEAD; we don
'
t
convert
the
anonymous
/
detached
head
,
so
we
get
the
tipmost
bookmark
$
cd
gitrepo
$
git
checkout
-
q -d
master
$
echo
delta
>
delta
$
git
add
delta
$
fn_git_commit
-
m 'add delta'
$
cd
..
$
hg
clone
gitrepo
hgrepo
-
2
importing
git
objects
into
hg
updating
to
bookmark
beta
2
files
updated
,
0
files
merged
,
0
files
removed
,
0
files
unresolved
$
hg
-
R
hgrepo
-
2
book
*
beta
4
:
47
d12948785d
gamma
2
:
ca33a262eb46
master
0
:
ff7a2f2d8d70
$
hg
-
R
hgrepo
-
2
id
--
tags
default
/
beta
tip
$
rm
-
rf
hgrepo
-
2
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment