Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
mercurial-devel
Manage
Activity
Members
Labels
Plan
Wiki
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
Environments
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
mercurial-devel
Commits
06793ad3
Commit
06793ad3
authored
14 years ago
by
Nicolas Dumazet
Browse files
Options
Downloads
Patches
Plain Diff
tests: unify test-add
parent
80c63b2a
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-add.out
+0
-40
0 additions, 40 deletions
tests/test-add.out
tests/test-add.t
+89
-48
89 additions, 48 deletions
tests/test-add.t
with
89 additions
and
88 deletions
tests/test-add.out
deleted
100644 → 0
+
0
−
40
View file @
80c63b2a
adding a
? a
adding a
A a
adding a
A a
A a
? b
A a
A b
% should fail
b already tracked!
A a
A b
% should fail
a already tracked!
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
created new head
merging a
warning: conflicts during merge.
merging a 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
M a
? a.orig
% should fail
a already tracked!
M a
? a.orig
% issue683
? a.orig
R a
? a.orig
M a
? a.orig
c: No such file or directory
d: No such file or directory
M a
A c
? a.orig
This diff is collapsed.
Click to expand it.
tests/test-add
→
tests/test-add
.t
100755 → 100644
+
89
−
48
View file @
06793ad3
#!/bin/sh
hg init a
cd
a
echo
a
>
a
hg add
-n
hg st
hg add
hg st
hg forget a
hg add
hg st
$
hg
init
a
$
cd
a
$
echo
a
>
a
$
hg
add
-
n
adding
a
$
hg
st
?
a
$
hg
add
adding
a
$
hg
st
A
a
$
hg
forget
a
$
hg
add
adding
a
$
hg
st
A
a
...
...
@@ -13,10 +17,13 @@
echo
b
>
b
hg add
-n
b
hg st
hg add b
||
echo
"failed to add b"
hg st
echo
% should fail
hg add b
hg st
$
echo
b
>
b
$
hg
add
-
n
b
$
hg
st
A
a
?
b
$
hg
add
b
||
echo
"
failed to add b
"
$
hg
st
A
a
A
b
should
fail
...
...
@@ -22,5 +29,14 @@
hg ci
-m
0
--traceback
echo
% should fail
hg add a
$
hg
add
b
b
already
tracked
!
$
hg
st
A
a
A
b
$
hg
ci
-
m 0 --traceback
should fail
$ hg add a
a already tracked!
...
...
@@ -26,7 +42,9 @@
echo
aa
>
a
hg ci
-m
1
hg up 0
echo
aaa
>
a
hg ci
-m
2
$ echo aa > a
$ hg ci -m 1
$ hg up 0
1
files
updated
,
0
files
merged
,
0
files
removed
,
0
files
unresolved
$
echo
aaa
>
a
$
hg
ci
-
m
2
created
new
head
...
...
@@ -32,9 +50,13 @@
hg merge
hg st
echo
% should fail
hg add a
hg st
hg resolve
-m
a
hg ci
-m
merge
$
hg
merge
merging
a
warning:
conflicts
during
merge
.
merging
a
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
$
hg
st
M
a
?
a
.
orig
should
fail
...
...
@@ -40,11 +62,11 @@
echo
% issue683
hg forget a
hg add a
hg st
hg
rm
a
hg st
echo
a
>
a
hg add a
hg st
$
hg
add
a
a
already
tracked
!
$
hg
st
M
a
?
a
.
orig
$
hg
resolve
-
m a
$ hg ci -m merge
issue683
...
...
@@ -50,6 +72,15 @@
hg add c
&&
echo
"unexpected addition of missing file"
echo
c
>
c
hg add d c
&&
echo
"unexpected addition of missing file"
hg st
$ hg forget a
$
hg
add
a
$
hg
st
?
a
.
orig
$
hg
rm
a
$
hg
st
R
a
?
a
.
orig
$
echo
a
>
a
$
hg
add
a
$
hg
st
M
a
?
a
.
orig
...
...
@@ -55,1 +86,11 @@
$
hg
add
c
&&
echo
"
unexpected addition of missing file
"
c:
No
such
file
or
directory
$
echo
c
>
c
$
hg
add
d
c
&&
echo
"
unexpected addition of missing file
"
d:
No
such
file
or
directory
$
hg
st
M
a
A
c
?
a
.
orig
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