Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
mercurial
evolve
Commits
f70b8201eea4
Commit
f70b8201
authored
Nov 18, 2022
by
Anton Shestakov
Browse files
tests: add double slashes to tests for hg stack
parent
bf8b9d6a14af
Pipeline
#58538
passed with stage
in 43 minutes and 46 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
tests/test-stack-branch.t
View file @
f70b8201
...
...
@@ -12,8 +12,8 @@
$
hg
init
main
$
cd
main
$
hg
branch
other
marked
working
directory
as
branch
other
$
hg
branch
other
//
branch
marked
working
directory
as
branch
other
//
branch
(
branches
are
permanent
and
global
,
did
you
want
a
bookmark
?)
$
echo
aaa
>
aaa
$
hg
add
aaa
...
...
@@ -21,8 +21,8 @@
$ ec
ho
aaa
>
bbb
$
hg
add
bbb
$
hg
commit
-
m c_b
$ hg branc
h
foo
marked
working
directory
as
branch
foo
$ hg branc
h
branch
//
foo
marked
working
directory
as
branch
branch
//
foo
$
echo
aaa
>
ccc
$
hg
add
ccc
$
hg
commit
-
m c_c
...
...
@@ -36,5 +36,5 @@
$
hg
add
fff
$
hg
commit
-
m c_f
$ hg log -G
@ 5 foo {} draft c
_f
@ 5
branc
h
//
foo
{}
draft
c_f
|
...
...
@@ -40,3 +40,3 @@
|
o
4
foo
{}
draft
c_e
o
4
branch
//
foo
{}
draft
c_e
|
...
...
@@ -42,3 +42,3 @@
|
o
3
foo
{}
draft
c_d
o
3
branch
//
foo
{}
draft
c_d
|
...
...
@@ -44,3 +44,3 @@
|
o
2
foo
{}
draft
c_c
o
2
branch
//
foo
{}
draft
c_c
|
...
...
@@ -46,3 +46,3 @@
|
o
1
other
{}
draft
c_b
o
1
other
//
branch
{}
draft
c_b
|
...
...
@@ -48,7 +48,7 @@
|
o
0
other
{}
draft
c_a
o
0
other
//
branch
{}
draft
c_a
Check
that
topic
without
any
parent
does
not
crash
--
list
---------------------------------------------------------
...
...
@@ -50,8 +50,8 @@
Check
that
topic
without
any
parent
does
not
crash
--
list
---------------------------------------------------------
$
hg
up
other
$
hg
up
other
//
branch
0
files
updated
,
0
files
merged
,
4
files
removed
,
0
files
unresolved
$
hg
stack
...
...
@@ -56,5 +56,5 @@
0
files
updated
,
0
files
merged
,
4
files
removed
,
0
files
unresolved
$
hg
stack
### target: other (branch)
### target: other
//branch
(branch)
s2
@
c_b
(
current
)
s1:
c_a
...
...
@@ -59,7 +59,7 @@
s2
@
c_b
(
current
)
s1:
c_a
$
hg
phase
--
public
'
branch("other")
'
$
hg
up
foo
$
hg
phase
--
public
'
branch("other
//branch
")
'
$
hg
up
branch
//
foo
4
files
updated
,
0
files
merged
,
0
files
removed
,
0
files
unresolved
Simple
test
...
...
@@ -68,5 +68,5 @@
'
hg stack
'
list
all
changeset
in
the
topic
$
hg
branch
foo
branch
//
foo
$
hg
stack
...
...
@@ -72,8 +72,8 @@
$
hg
stack
### target: foo (branch)
### target:
branch//
foo (branch)
s4
@
c_f
(
current
)
s3:
c_e
s2:
c_d
s1:
c_c
s0
^
c_b
(
base
)
$
hg
stack
-
v
...
...
@@ -74,18 +74,18 @@
s4
@
c_f
(
current
)
s3:
c_e
s2:
c_d
s1:
c_c
s0
^
c_b
(
base
)
$
hg
stack
-
v
### target: foo (branch)
s4
(
913
c298d8b0a
)
@
c_f
(
current
)
s3
(
4
f2a69f6d380
):
c_e
s2
(
f61adbacd17a
):
c_d
s1
(
3e9313
bc4b71
):
c_c
s0
(
4
a04f1104a27
)
^
c_b
(
base
)
### target:
branch//
foo (branch)
s4
(
663
cefa3e4b1
)
@
c_f
(
current
)
s3
(
645
bf804ca0d
):
c_e
s2
(
0
ca8f8df2c3b
):
c_d
s1
(
9573
c6ca6e3d
):
c_c
s0
(
f113ed834a1b
)
^
c_b
(
base
)
Test
"
t#
"
reference
-------------------
$
hg
up
s2
0
files
updated
,
0
files
merged
,
2
files
removed
,
0
files
unresolved
...
...
@@ -86,9 +86,9 @@
Test
"
t#
"
reference
-------------------
$
hg
up
s2
0
files
updated
,
0
files
merged
,
2
files
removed
,
0
files
unresolved
$
hg
up
foo
$
hg
up
branch
//
foo
2
files
updated
,
0
files
merged
,
0
files
removed
,
0
files
unresolved
$
hg
up
s42
...
...
@@ -93,7 +93,7 @@
2
files
updated
,
0
files
merged
,
0
files
removed
,
0
files
unresolved
$
hg
up
s42
abort:
cannot
resolve
"
s42
":
branch
"
foo
"
has
only
4
non
-
public
changesets
abort:
cannot
resolve
"
s42
":
branch
"
branch//
foo
"
has
only
4
non
-
public
changesets
[
255
]
$
hg
up
s2
0
files
updated
,
0
files
merged
,
2
files
removed
,
0
files
unresolved
$
hg
summary
...
...
@@ -96,6 +96,6 @@
[
255
]
$
hg
up
s2
0
files
updated
,
0
files
merged
,
2
files
removed
,
0
files
unresolved
$
hg
summary
parent:
3
:
f61adbacd17a
parent:
3
:
0
ca8f8df2c3b
c_d
...
...
@@ -101,5 +101,5 @@
c_d
branch:
foo
branch:
branch
//
foo
commit:
(
clean
)
update:
2
new
changesets
(
update
)
phases:
4
draft
...
...
@@ -111,5 +111,5 @@
$
hg
commit
--
amend
2
new
orphan
changesets
$
hg
log
-
G
@
6
foo
{}
draft
c_d
@
6
branch
//
foo
{}
draft
c_d
|
...
...
@@ -115,3 +115,3 @@
|
|
*
5
foo
{}
draft
c_f
|
*
5
branch
//
foo
{}
draft
c_f
|
|
...
...
@@ -117,3 +117,3 @@
|
|
|
*
4
foo
{}
draft
c_e
|
*
4
branch
//
foo
{}
draft
c_e
|
|
...
...
@@ -119,3 +119,3 @@
|
|
|
x
3
foo
{}
draft
c_d
|
x
3
branch
//
foo
{}
draft
c_d
|/
...
...
@@ -121,3 +121,3 @@
|/
o
2
foo
{}
draft
c_c
o
2
branch
//
foo
{}
draft
c_c
|
...
...
@@ -123,3 +123,3 @@
|
o
1
other
{}
public
c_b
o
1
other
//
branch
{}
public
c_b
|
...
...
@@ -125,4 +125,4 @@
|
o
0
other
{}
public
c_a
o
0
other
//
branch
{}
public
c_a
$
hg
stack
...
...
@@ -127,6 +127,6 @@
$
hg
stack
### target: foo (branch)
### target:
branch//
foo (branch)
s4
$
c_f
(
orphan
)
s3
$
c_e
(
orphan
)
s2
@
c_d
(
current
)
...
...
@@ -135,7 +135,7 @@
$
hg
up
s3
2
files
updated
,
0
files
merged
,
0
files
removed
,
0
files
unresolved
$
hg
stack
### target: foo (branch)
### target:
branch//
foo (branch)
s4
$
c_f
(
orphan
)
s3
@
c_e
(
current
orphan
)
s2:
c_d
...
...
@@ -147,10 +147,10 @@
Also
test
the
revset:
$
hg
log
-
r
'
stack()
'
2
foo
{}
draft
c_c
6
foo
{}
draft
c_d
4
foo
{}
draft
c_e
5
foo
{}
draft
c_f
2
branch
//
foo
{}
draft
c_c
6
branch
//
foo
{}
draft
c_d
4
branch
//
foo
{}
draft
c_e
5
branch
//
foo
{}
draft
c_f
Case
with
multiple
heads
on
the
topic
-------------------------------------
...
...
@@ -158,6 +158,6 @@
Make
things
linear
again
$
hg
rebase
-
s 'desc(c_e)' -d 'd
esc
(
c_d
)
-
obsolete
()'
rebasing 4:
4f2a69f6d380
"c_e"
rebasing 5:
913c298d8b0a
"c_f"
rebasing 4:
645bf804ca0d
"c_e"
rebasing 5:
663cefa3e4b1
"c_f"
$ hg log -G
...
...
@@ -163,3 +163,3 @@
$ hg log -G
o 8 foo {} draft c_f
o 8
branch//
foo {} draft c_f
|
...
...
@@ -165,3 +165,3 @@
|
o 7 foo {} draft c_e
o 7
branch//
foo {} draft c_e
|
...
...
@@ -167,3 +167,3 @@
|
@ 6 foo {} draft c_d
@ 6
branch//
foo {} draft c_d
|
...
...
@@ -169,3 +169,3 @@
|
o 2 foo {} draft c_c
o 2
branch//
foo {} draft c_c
|
...
...
@@ -171,3 +171,3 @@
|
o 1 other {} public c_b
o 1 other
//branch
{} public c_b
|
...
...
@@ -173,5 +173,5 @@
|
o 0 other {} public c_a
o 0 other
//branch
{} public c_a
Create the second branch
...
...
@@ -187,5 +187,5 @@
$ hg add hhh
$ hg commit -m c_h
$ hg log -G
@ 10 foo {} draft c_h
@ 10
branch//
foo {} draft c_h
|
...
...
@@ -191,3 +191,3 @@
|
o 9 foo {} draft c_g
o 9
branch//
foo {} draft c_g
|
...
...
@@ -193,3 +193,3 @@
|
| o 8 foo {} draft c_f
| o 8
branch//
foo {} draft c_f
| |
...
...
@@ -195,3 +195,3 @@
| |
| o 7 foo {} draft c_e
| o 7
branch//
foo {} draft c_e
|/
...
...
@@ -197,3 +197,3 @@
|/
o 6 foo {} draft c_d
o 6
branch//
foo {} draft c_d
|
...
...
@@ -199,3 +199,3 @@
|
o 2 foo {} draft c_c
o 2
branch//
foo {} draft c_c
|
...
...
@@ -201,3 +201,3 @@
|
o 1 other {} public c_b
o 1 other
//branch
{} public c_b
|
...
...
@@ -203,7 +203,7 @@
|
o 0 other {} public c_a
o 0 other
//branch
{} public c_a
Test output
$ hg stack
...
...
@@ -205,9 +205,9 @@
Test output
$ hg stack
### target: foo (branch) (2 heads)
### target:
branch//
foo (branch) (2 heads)
s6@ c_h (current)
s5: c_g
s2^ c_d (base)
...
...
@@ -228,6 +228,6 @@
$ hg commit --amend -m
'
c_D
'
4 new orphan changesets
$ hg rebase -d . -s
'
desc
(
c_g
)'
rebasing 9:
2ebb6e48ab8a
"c_g"
rebasing 10:
634f38e27a1d
"c_h"
rebasing 9:
17fd8270b733
"c_g"
rebasing 10:
ba683ba67bd2
"c_h"
$ hg log -G
...
...
@@ -233,3 +233,3 @@
$ hg log -G
o 13 foo {} draft c_h
o 13
branch//
foo {} draft c_h
|
...
...
@@ -235,3 +235,3 @@
|
o 12 foo {} draft c_g
o 12
branch//
foo {} draft c_g
|
...
...
@@ -237,3 +237,3 @@
|
@ 11 foo {} draft c_D
@ 11
branch//
foo {} draft c_D
|
...
...
@@ -239,3 +239,3 @@
|
| * 8 foo {} draft c_f
| * 8
branch//
foo {} draft c_f
| |
...
...
@@ -241,3 +241,3 @@
| |
| * 7 foo {} draft c_e
| * 7
branch//
foo {} draft c_e
| |
...
...
@@ -243,3 +243,3 @@
| |
| x 6 foo {} draft c_d
| x 6
branch//
foo {} draft c_d
|/
...
...
@@ -245,3 +245,3 @@
|/
o 2 foo {} draft c_c
o 2
branch//
foo {} draft c_c
|
...
...
@@ -247,3 +247,3 @@
|
o 1 other {} public c_b
o 1 other
//branch
{} public c_b
|
...
...
@@ -249,5 +249,5 @@
|
o 0 other {} public c_a
o 0 other
//branch
{} public c_a
$ hg stack
...
...
@@ -251,7 +251,7 @@
$ hg stack
### target: foo (branch) (2 heads)
### target:
branch//
foo (branch) (2 heads)
s6: c_h
s5: c_g
s2^ c_D (base current)
...
...
@@ -265,5 +265,5 @@
----------------------------------------------------------
$
hg
log
--
graph
o
13
foo
{}
draft
c_h
o
13
branch
//
foo
{}
draft
c_h
|
...
...
@@ -269,3 +269,3 @@
|
o
12
foo
{}
draft
c_g
o
12
branch
//
foo
{}
draft
c_g
|
...
...
@@ -271,3 +271,3 @@
|
@
11
foo
{}
draft
c_D
@
11
branch
//
foo
{}
draft
c_D
|
...
...
@@ -273,3 +273,3 @@
|
|
*
8
foo
{}
draft
c_f
|
*
8
branch
//
foo
{}
draft
c_f
|
|
...
...
@@ -275,3 +275,3 @@
|
|
|
*
7
foo
{}
draft
c_e
|
*
7
branch
//
foo
{}
draft
c_e
|
|
...
...
@@ -277,3 +277,3 @@
|
|
|
x
6
foo
{}
draft
c_d
|
x
6
branch
//
foo
{}
draft
c_d
|/
...
...
@@ -279,3 +279,3 @@
|/
o
2
foo
{}
draft
c_c
o
2
branch
//
foo
{}
draft
c_c
|
...
...
@@ -281,3 +281,3 @@
|
o
1
other
{}
public
c_b
o
1
other
//
branch
{}
public
c_b
|
...
...
@@ -283,5 +283,5 @@
|
o
0
other
{}
public
c_a
o
0
other
//
branch
{}
public
c_a
$
hg
stack
...
...
@@ -285,7 +285,7 @@
$
hg
stack
### target: foo (branch) (2 heads)
### target:
branch//
foo (branch) (2 heads)
s6:
c_h
s5:
c_g
s2
^
c_D
(
base
current
)
...
...
@@ -296,7 +296,7 @@
s0
^
c_b
(
base
)
$
hg
phase
--
public
s1
$
hg
stack
### target: foo (branch) (2 heads)
### target:
branch//
foo (branch) (2 heads)
s5:
c_h
s4:
c_g
s1
^
c_D
(
base
current
)
...
...
@@ -311,7 +311,7 @@
$ hg topic --rev s4::s5 sometopic
changed topic on 2 changesets to "sometopic"
$ hg stack
### target: foo (branch)
### target:
branch//
foo (branch)
s3$ c_f (orphan)
s2$ c_e (orphan)
s1@ c_D (current)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment