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
0f8fa801
Commit
0f8fa801
authored
12 years ago
by
David M. Carr
Browse files
Options
Downloads
Patches
Plain Diff
tests: unify test-conflict-1
parent
0612a5e6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tests/test-conflict-1.out
+0
-38
0 additions, 38 deletions
tests/test-conflict-1.out
tests/test-conflict-1.t
+87
-51
87 additions, 51 deletions
tests/test-conflict-1.t
with
87 additions
and
89 deletions
tests/test-conflict-1.out
deleted
100644 → 0
+
0
−
38
View file @
0612a5e6
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
created new head
warning: conflicts during merge.
merging afile failed!
0 files updated, 0 files merged, 0 files removed, 1 files unresolved
use 'hg resolve' to retry unresolved file merges or 'hg update -C' to abandon
@ 3:2,1 6c53bc0f062f 1970-01-01 00:00 +0000 test
|\ merge to C
| |
| o 2:0 ea82b67264a1 1970-01-01 00:00 +0000 test
| | A->C
| |
o | 1 7205e83b5a3f 1970-01-01 00:00 +0000 test
|/ A->B
|
o 0 5d1a6b64f9d0 1970-01-01 00:00 +0000 test
origin
Initialized empty Git repository in gitrepo/
pushing to git://localhost/gitrepo
exporting hg objects to git
creating and sending data
importing git objects into hg
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
% expect the same revision ids as above
@ 3:1,2 6c53bc0f062f 1970-01-01 00:00 +0000 test
|\ merge to C
| |
| o 2:0 7205e83b5a3f 1970-01-01 00:00 +0000 test
| | A->B
| |
o | 1 ea82b67264a1 1970-01-01 00:00 +0000 test
|/ A->C
|
o 0 5d1a6b64f9d0 1970-01-01 00:00 +0000 test
origin
This diff is collapsed.
Click to expand it.
tests/test-conflict-1
→
tests/test-conflict-1
.t
+
87
−
51
View file @
0f8fa801
#!/bin/sh
# Fails for some reason, need to investigate
# $ "$TESTDIR/hghave" git || exit 80
...
...
@@ -2,4 +3,4 @@
# Fails for some reason, need to investigate
# "$TESTDIR/hghave" git
|| exit 80
bail
if
the
user
does
not
have
dulwich
$
python
-
c
'
import dulwich, dulwich.repo
'
||
exit
80
...
...
@@ -5,4 +6,4 @@
#
bail if the user
does not have dulwich
python
-c
'import dulwich, dulwich.repo'
||
exit
80
bail
early
if
the
user
is
already
running
git
-
daemon
$
!
(
echo
hi
|
nc
localhost
9418
2
>
/dev/null
)
||
exit
80
...
...
@@ -8,4 +9,6 @@
# bail early if the user is already running git-daemon
echo
hi | nc localhost 9418 2>/dev/null
&&
exit
80
$
echo
"
[extensions]
"
>>
$HGRCPATH
$
echo
"
hggit=$(echo $(dirname
$TESTDIR
))/hggit
"
>>
$HGRCPATH
$
echo
'
hgext.graphlog =
'
>>
$HGRCPATH
$
echo
'
hgext.bookmarks =
'
>>
$HGRCPATH
...
...
@@ -11,6 +14,10 @@
echo
"[extensions]"
>>
$HGRCPATH
echo
"hggit=
$(
echo
$(
dirname
$(
dirname
$0
)))
/hggit"
>>
$HGRCPATH
echo
'hgext.graphlog ='
>>
$HGRCPATH
echo
'hgext.bookmarks ='
>>
$HGRCPATH
$
hg
init
hgrepo1
$
cd
hgrepo1
$
echo
A
>
afile
$
hg
add
afile
$
hg
ci
-
m "origin"
$
echo
B
>
afile
$
hg
ci
-
m "A->B"
...
...
@@ -16,7 +23,7 @@
hg init hgrepo1
cd
hgrepo1
echo
A
>
afile
hg add afile
hg ci
-m
"origin"
$
hg
up
-
r0
1
files
updated
,
0
files
merged
,
0
files
removed
,
0
files
unresolved
$
echo
C
>
afile
$
hg
ci
-
m "A->C"
created
new
head
...
...
@@ -22,8 +29,11 @@
echo
B
>
afile
hg ci
-m
"A->B"
hg up
-r0
echo
C
>
afile
hg ci
-m
"A->C"
$
hg
merge
-
r1
2
>&
1
|
sed
'
s/-C ./-C/
'
|
egrep
-
v
'
^merging afile$
'
|
sed
'
s/incomplete.*/failed!/
'
warning:
conflicts
during
merge
.
merging
afile
failed
!
0
files
updated
,
0
files
merged
,
0
files
removed
,
1
files
unresolved
use
'
hg resolve
'
to
retry
unresolved
file
merges
or
'
hg update -C
'
to
abandon
resolve
using
first
parent
$
echo
C
>
afile
$
hg
resolve
-
m afile
$ hg ci -m "merge to C"
...
...
@@ -29,7 +39,15 @@
hg merge
-r1
2>&1 |
sed
's/-C ./-C/'
| egrep
-v
'^merging afile$'
|
sed
's/incomplete.*/failed!/'
# resolve using first parent
echo
C
>
afile
hg resolve
-m
afile
hg ci
-m
"merge to C"
$ hg log --grap
h
--
style
compact
|
sed
'
s/\[.*\]//g
'
@
3
:
2
,
1
6
c53bc0f062f
1970
-
01
-
01
00
:
00
+
0000
test
|\
merge
to
C
|
|
|
o
2
:
0
ea82b67264a1
1970
-
01
-
01
00
:
00
+
0000
test
|
|
A
->
C
|
|
o
|
1
7205e83
b5a3f
1970
-
01
-
01
00
:
00
+
0000
test
|/
A
->
B
|
o
0
5
d1a6b64f9d0
1970
-
01
-
01
00
:
00
+
0000
test
origin
...
...
@@ -35,5 +53,3 @@
hg log
--graph
--style
compact |
sed
's/\[.*\]//g'
cd
..
$
cd
..
...
...
@@ -39,5 +55,7 @@
mkdir
gitrepo
cd
gitrepo
git init
--bare
| python
-c
"import sys; print sys.stdin.read().replace('
$(
dirname
$(
pwd
))
/', '')"
$
mkdir
gitrepo
$
cd
gitrepo
$
git
init
--
bare
|
python
-
c
"
import sys; print sys.stdin.read().replace('$(dirname $(pwd))/', '')
"
Initialized
empty
Git
repository
in
gitrepo
/
...
...
@@ -43,10 +61,18 @@
# dulwich does not presently support local git repos, workaround
cd
..
git daemon
--base-path
=
"
$(
pwd
)
"
\
--listen
=
localhost
\
--export-all
\
--pid-file
=
"
$DAEMON_PIDS
"
\
--detach
--reuseaddr
\
--enable
=
receive-pack
dulwich
does
not
presently
support
local
git
repos
,
workaround
$
cd
..
$
git
daemon
--
base
-
path
=
"
$(pwd)
"
\
>
--
listen
=
localhost
\
>
--
export
-
all
\
>
--
pid
-
file
=
"
$DAEMON_PIDS
"
\
>
--
detach
--
reuseaddr
\
>
--
enable
=
receive
-
pack
$
cd
hgrepo1
$
hg
bookmark
-
r
tip
master
$
hg
push
-
r
master
git:
//local
host
/
gitrepo
pushing
to
git:
//local
host
/
gitrepo
exporting
hg
objects
to
git
creating
and
sending
data
$
cd
..
...
...
@@ -52,6 +78,21 @@
cd
hgrepo1
hg bookmark
-r
tip master
hg push
-r
master git://localhost/gitrepo
cd
..
$
hg
clone
git:
//local
host
/
gitrepo
hgrepo2
|
grep
-
v
'
^updating
'
importing
git
objects
into
hg
1
files
updated
,
0
files
merged
,
0
files
removed
,
0
files
unresolved
$
cd
hgrepo2
$
echo
%
expect
the
same
revision
ids
as
above
%
expect
the
same
revision
ids
as
above
$
hg
log
--
graph
--
style
compact
|
sed
'
s/\[.*\]//g
'
@
3
:
1
,
2
6
c53bc0f062f
1970
-
01
-
01
00
:
00
+
0000
test
|\
merge
to
C
|
|
|
o
2
:
0
7205e83
b5a3f
1970
-
01
-
01
00
:
00
+
0000
test
|
|
A
->
B
|
|
o
|
1
ea82b67264a1
1970
-
01
-
01
00
:
00
+
0000
test
|/
A
->
C
|
o
0
5
d1a6b64f9d0
1970
-
01
-
01
00
:
00
+
0000
test
origin
...
...
@@ -57,7 +98,2 @@
hg clone git://localhost/gitrepo hgrepo2 |
grep
-v
'^updating'
cd
hgrepo2
echo
% expect the same revision ids as above
hg log
--graph
--style
compact |
sed
's/\[.*\]//g'
cd
..
$
cd
..
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