##// END OF EJS Templates
debian: switch to using debhelper and dh_python2 to build debs...
debian: switch to using debhelper and dh_python2 to build debs This is a much larger commit than I'd like, but I honestly don't see a good way to break it up and leave things working. Summary: We now use debian/rules with debhelper to build our debs. This is much more standard, and means we use dh_python2 to do things like handle leaving .pyc files out of the built debs. The resulting package is split into mercurial and mercurial-common, with the former being the hg stub and all the native .sos, and the latter being basically everything else. builddeb and dockerdeb are updated to use the new system. The old way (using dpkg by hand) breaks with the above changes because debian/control no longer contains a version string (that's now guessed from the phony changelog.) Tests are updated to assert that the right files end up in the right debs.

File last commit:

r22046:7a9cbb31 default
r26148:7f49efca default
Show More
test-casecollision-merge.t
306 lines | 5.8 KiB | text/troff | Tads3Lexer
/ tests / test-casecollision-merge.t
Matt Mackall
tests: replace exit 80 with #require
r22046 #require icasefs
FUJIWARA Katsunori
merge: check filename case collision between changesets for branch merging...
r15673
################################
test for branch merging
################################
FUJIWARA Katsunori
icasefs: make case-folding collision detection as rename aware (issue3370)...
r16478 test for rename awareness of case-folding collision check:
FUJIWARA Katsunori
merge: check filename case collision between changesets for branch merging...
r15673
FUJIWARA Katsunori
icasefs: make case-folding collision detection as rename aware (issue3370)...
r16478 (1) colliding file is one renamed from collided file:
this is also case for issue3370.
FUJIWARA Katsunori
merge: check filename case collision between changesets for branch merging...
r15673
FUJIWARA Katsunori
icasefs: make case-folding collision detection as deletion aware (issue3648)...
r17889 $ hg init branch_merge_renaming
$ cd branch_merge_renaming
FUJIWARA Katsunori
merge: check filename case collision between changesets for branch merging...
r15673
FUJIWARA Katsunori
icasefs: make case-folding collision detection as rename aware (issue3370)...
r16478 $ echo a > a
$ hg add a
FUJIWARA Katsunori
icasefs: enhance test to prevent regression by changes in the future...
r19106 $ echo b > b
$ hg add b
FUJIWARA Katsunori
icasefs: make case-folding collision detection as rename aware (issue3370)...
r16478 $ hg commit -m '#0'
FUJIWARA Katsunori
icasefs: rewrite case-folding collision detection (issue3452)...
r19105 $ hg tag -l A
FUJIWARA Katsunori
icasefs: make case-folding collision detection as rename aware (issue3370)...
r16478 $ hg rename a tmp
$ hg rename tmp A
$ hg commit -m '#1'
FUJIWARA Katsunori
icasefs: rewrite case-folding collision detection (issue3452)...
r19105 $ hg tag -l B
FUJIWARA Katsunori
icasefs: refactor "test-casecollision-merge.t" to reuse in succeeding fixes...
r19104 $ hg update -q 0
$ touch x
$ hg add x
FUJIWARA Katsunori
icasefs: make case-folding collision detection as rename aware (issue3370)...
r16478 $ hg commit -m '#2'
FUJIWARA Katsunori
merge: check filename case collision between changesets for branch merging...
r15673 created new head
FUJIWARA Katsunori
icasefs: rewrite case-folding collision detection (issue3452)...
r19105 $ hg tag -l C
FUJIWARA Katsunori
merge: check filename case collision between changesets for branch merging...
r15673
FUJIWARA Katsunori
icasefs: refactor "test-casecollision-merge.t" to reuse in succeeding fixes...
r19104 $ hg merge -q
FUJIWARA Katsunori
icasefs: make case-folding collision detection as rename aware (issue3370)...
r16478 $ hg status -A
M A
R a
FUJIWARA Katsunori
icasefs: enhance test to prevent regression by changes in the future...
r19106 C b
FUJIWARA Katsunori
icasefs: refactor "test-casecollision-merge.t" to reuse in succeeding fixes...
r19104 C x
FUJIWARA Katsunori
icasefs: make case-folding collision detection as rename aware (issue3370)...
r16478
FUJIWARA Katsunori
icasefs: refactor "test-casecollision-merge.t" to reuse in succeeding fixes...
r19104 $ hg update -q --clean 1
$ hg merge -q
FUJIWARA Katsunori
icasefs: make case-folding collision detection as rename aware (issue3370)...
r16478 $ hg status -A
FUJIWARA Katsunori
icasefs: refactor "test-casecollision-merge.t" to reuse in succeeding fixes...
r19104 M x
C A
FUJIWARA Katsunori
icasefs: enhance test to prevent regression by changes in the future...
r19106 C b
FUJIWARA Katsunori
icasefs: rewrite case-folding collision detection (issue3452)...
r19105 $ hg commit -m '(D)'
$ hg tag -l D
additional test for issue3452:
| this assumes the history below.
|
| (A) -- (C) -- (E) -------
| \ \ \
| \ \ \
| (B) -- (D) -- (F) -- (G)
|
| A: add file 'a'
| B: rename from 'a' to 'A'
| C: add 'x' (or operation other than modification of 'a')
| D: merge C into B
| E: modify 'a'
| F: modify 'A'
| G: merge E into F
|
| issue3452 occurs when (B) is recorded before (C)
$ hg update -q --clean C
$ echo "modify 'a' at (E)" > a
FUJIWARA Katsunori
icasefs: enhance test to prevent regression by changes in the future...
r19106 $ echo "modify 'b' at (E)" > b
FUJIWARA Katsunori
icasefs: rewrite case-folding collision detection (issue3452)...
r19105 $ hg commit -m '(E)'
created new head
$ hg tag -l E
$ hg update -q --clean D
$ echo "modify 'A' at (F)" > A
$ hg commit -m '(F)'
$ hg tag -l F
$ hg merge -q --tool internal:other E
$ hg status -A
M A
a
FUJIWARA Katsunori
icasefs: enhance test to prevent regression by changes in the future...
r19106 M b
FUJIWARA Katsunori
icasefs: rewrite case-folding collision detection (issue3452)...
r19105 C x
$ cat A
modify 'a' at (E)
FUJIWARA Katsunori
icasefs: make case-folding collision detection as rename aware (issue3370)...
r16478
FUJIWARA Katsunori
icasefs: enhance test to prevent regression by changes in the future...
r19106 test also the case that (B) is recorded after (C), to prevent
regression by changes in the future.
to avoid unexpected (successful) behavior by filelog unification,
target file is not 'a'/'A' but 'b'/'B' in this case.
$ hg update -q --clean A
$ hg rename b tmp
$ hg rename tmp B
$ hg commit -m '(B1)'
created new head
$ hg tag -l B1
$ hg merge -q C
$ hg status -A
M x
C B
C a
$ hg commit -m '(D1)'
$ hg tag -l D1
$ echo "modify 'B' at (F1)" > B
$ hg commit -m '(F1)'
$ hg tag -l F1
$ hg merge -q --tool internal:other E
$ hg status -A
M B
b
M a
C x
$ cat B
modify 'b' at (E)
FUJIWARA Katsunori
icasefs: make case-folding collision detection as rename aware (issue3370)...
r16478 $ cd ..
(2) colliding file is not related to collided file
FUJIWARA Katsunori
icasefs: make case-folding collision detection as deletion aware (issue3648)...
r17889 $ hg init branch_merge_collding
$ cd branch_merge_collding
FUJIWARA Katsunori
icasefs: make case-folding collision detection as rename aware (issue3370)...
r16478
$ echo a > a
$ hg add a
$ hg commit -m '#0'
$ hg remove a
$ hg commit -m '#1'
$ echo A > A
$ hg add A
$ hg commit -m '#2'
$ hg update --clean 0
1 files updated, 0 files merged, 1 files removed, 0 files unresolved
FUJIWARA Katsunori
icasefs: make case-folding collision detection as deletion aware (issue3648)...
r17889 $ echo x > x
$ hg add x
FUJIWARA Katsunori
icasefs: make case-folding collision detection as rename aware (issue3370)...
r16478 $ hg commit -m '#3'
created new head
FUJIWARA Katsunori
icasefs: make case-folding collision detection as deletion aware (issue3648)...
r17889 $ echo 'modified at #4' > a
$ hg commit -m '#4'
FUJIWARA Katsunori
merge: check filename case collision between changesets for branch merging...
r15673
$ hg merge
FUJIWARA Katsunori
icasefs: rewrite case-folding collision detection (issue3452)...
r19105 abort: case-folding collision between a and A
FUJIWARA Katsunori
merge: check filename case collision between changesets for branch merging...
r15673 [255]
FUJIWARA Katsunori
icasefs: make case-folding collision detection as rename aware (issue3370)...
r16478 $ hg parents --template '{rev}\n'
FUJIWARA Katsunori
icasefs: make case-folding collision detection as deletion aware (issue3648)...
r17889 4
FUJIWARA Katsunori
icasefs: make case-folding collision detection as rename aware (issue3370)...
r16478 $ hg status -A
C a
FUJIWARA Katsunori
icasefs: make case-folding collision detection as deletion aware (issue3648)...
r17889 C x
FUJIWARA Katsunori
icasefs: make case-folding collision detection as rename aware (issue3370)...
r16478 $ cat a
FUJIWARA Katsunori
icasefs: make case-folding collision detection as deletion aware (issue3648)...
r17889 modified at #4
FUJIWARA Katsunori
merge: check filename case collision between changesets for branch merging...
r15673
FUJIWARA Katsunori
icasefs: make case-folding collision detection as rename aware (issue3370)...
r16478 $ hg update --clean 2
FUJIWARA Katsunori
icasefs: make case-folding collision detection as deletion aware (issue3648)...
r17889 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
FUJIWARA Katsunori
icasefs: make case-folding collision detection as rename aware (issue3370)...
r16478 $ hg merge
abort: case-folding collision between a and A
[255]
FUJIWARA Katsunori
merge: check filename case collision between changesets for branch merging...
r15673 $ hg parents --template '{rev}\n'
2
FUJIWARA Katsunori
icasefs: make case-folding collision detection as rename aware (issue3370)...
r16478 $ hg status -A
C A
$ cat A
A
FUJIWARA Katsunori
icasefs: make case-folding collision detection as deletion aware (issue3648)...
r17889 test for deletion awareness of case-folding collision check (issue3648):
revision '#3' doesn't change 'a', so 'a' should be recognized as
safely removed in merging between #2 and #3.
$ hg update --clean 3
2 files updated, 0 files merged, 1 files removed, 0 files unresolved
$ hg merge 2
1 files updated, 0 files merged, 1 files removed, 0 files unresolved
(branch merge, don't forget to commit)
$ hg status -A
M A
R a
C x
$ hg update --clean 2
1 files updated, 0 files merged, 1 files removed, 0 files unresolved
$ hg merge 3
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit)
$ hg status -A
M x
C A
FUJIWARA Katsunori
merge: check filename case collision between changesets for branch merging...
r15673 $ cd ..
FUJIWARA Katsunori
icasefs: make case-folding collision detection as rename aware (issue3370)...
r16478
FUJIWARA Katsunori
merge: check filename case collision between changesets for branch merging...
r15673 ################################
test for linear updates
################################
FUJIWARA Katsunori
icasefs: make case-folding collision detection as rename aware (issue3370)...
r16478 test for rename awareness of case-folding collision check:
FUJIWARA Katsunori
merge: check filename case collision between changesets for branch merging...
r15673
FUJIWARA Katsunori
icasefs: make case-folding collision detection as rename aware (issue3370)...
r16478 (1) colliding file is one renamed from collided file
$ hg init linearupdate_renameaware_1
$ cd linearupdate_renameaware_1
FUJIWARA Katsunori
merge: check filename case collision between changesets for branch merging...
r15673
FUJIWARA Katsunori
icasefs: make case-folding collision detection as rename aware (issue3370)...
r16478 $ echo a > a
$ hg add a
$ hg commit -m '#0'
$ hg rename a tmp
$ hg rename tmp A
$ hg commit -m '#1'
FUJIWARA Katsunori
merge: check filename case collision between changesets for branch merging...
r15673
$ hg update 0
FUJIWARA Katsunori
icasefs: make case-folding collision detection as rename aware (issue3370)...
r16478 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
FUJIWARA Katsunori
merge: check filename case collision between changesets for branch merging...
r15673
FUJIWARA Katsunori
icasefs: make case-folding collision detection as rename aware (issue3370)...
r16478 $ echo 'this is added line' >> a
FUJIWARA Katsunori
merge: check filename case collision between changesets for branch merging...
r15673 $ hg update 1
merging a and A to A
0 files updated, 1 files merged, 0 files removed, 0 files unresolved
$ hg status -A
M A
$ cat A
FUJIWARA Katsunori
icasefs: make case-folding collision detection as rename aware (issue3370)...
r16478 a
FUJIWARA Katsunori
merge: check filename case collision between changesets for branch merging...
r15673 this is added line
FUJIWARA Katsunori
icasefs: make case-folding collision detection as rename aware (issue3370)...
r16478
$ cd ..
(2) colliding file is not related to collided file
$ hg init linearupdate_renameaware_2
$ cd linearupdate_renameaware_2
$ echo a > a
$ hg add a
$ hg commit -m '#0'
$ hg remove a
$ hg commit -m '#1'
$ echo A > A
$ hg add A
$ hg commit -m '#2'
$ hg update 0
Patrick Mezard
update: fix case-collision with a clean wd and no --clean...
r16492 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
FUJIWARA Katsunori
icasefs: make case-folding collision detection as rename aware (issue3370)...
r16478 $ hg parents --template '{rev}\n'
Patrick Mezard
update: fix case-collision with a clean wd and no --clean...
r16492 0
FUJIWARA Katsunori
icasefs: make case-folding collision detection as rename aware (issue3370)...
r16478 $ hg status -A
Patrick Mezard
update: fix case-collision with a clean wd and no --clean...
r16492 C a
FUJIWARA Katsunori
icasefs: make case-folding collision detection as rename aware (issue3370)...
r16478 $ cat A
Patrick Mezard
update: fix case-collision with a clean wd and no --clean...
r16492 a
$ hg up -qC 2
FUJIWARA Katsunori
icasefs: make case-folding collision detection as rename aware (issue3370)...
r16478
$ hg update --check 0
1 files updated, 0 files merged, 1 files removed, 0 files unresolved
$ hg parents --template '{rev}\n'
0
$ hg status -A
C a
$ cat a
a
$ hg update --clean 2
1 files updated, 0 files merged, 1 files removed, 0 files unresolved
$ hg parents --template '{rev}\n'
2
$ hg status -A
C A
$ cat A
A
$ cd ..
(3) colliding file is not related to collided file: added in working dir
$ hg init linearupdate_renameaware_3
$ cd linearupdate_renameaware_3
$ echo a > a
$ hg add a
$ hg commit -m '#0'
$ hg rename a b
$ hg commit -m '#1'
$ hg update 0
1 files updated, 0 files merged, 1 files removed, 0 files unresolved
$ echo B > B
$ hg add B
$ hg status
A B
$ hg update
abort: case-folding collision between b and B
[255]
$ hg update --check
Siddharth Agarwal
update: standardize error message for dirty update --check...
r19801 abort: uncommitted changes
FUJIWARA Katsunori
icasefs: make case-folding collision detection as rename aware (issue3370)...
r16478 [255]
$ hg update --clean
1 files updated, 0 files merged, 1 files removed, 0 files unresolved
$ hg parents --template '{rev}\n'
1
$ hg status -A
C b
$ cat b
a
$ cd ..