##// END OF EJS Templates
worker: raise exception instead of calling sys.exit() with child's code...
worker: raise exception instead of calling sys.exit() with child's code When a worker process returns an error code, we would call `sys.exit()` with that exit code on the main process. The `SystemExit` exception would then get caught in `scmutil.callcatch()`, which would return that error code. The comment there says "Commands shouldn't sys.exit directly", which I agree with. This patch changes it so we raise a specific exception when a worker fails so we can catch instead. I think that means that `SystemExit` is now always an internal error. (I had earlier thought that this call to `sys.exit()` was from within the child process until Matt Harbison made me look again, so thanks for that!) Differential Revision: https://phab.mercurial-scm.org/D9287

File last commit:

r46356:f90a5c21 default
r46429:8f07f5a9 default
Show More
test-copytrace-heuristics.t
726 lines | 15.1 KiB | text/troff | Tads3Lexer
/ tests / test-copytrace-heuristics.t
Pulkit Goyal
copytrace: move fast heuristic copytracing algorithm to core...
r34180 Test for the heuristic copytracing algorithm
============================================
$ cat >> $TESTTMP/copytrace.sh << '__EOF__'
> initclient() {
> cat >> $1/.hg/hgrc <<EOF
> [experimental]
> copytrace = heuristics
Pulkit Goyal
tests: optimize test-copytrace-heuristics.t...
r34568 > copytrace.sourcecommitlimit = -1
Pulkit Goyal
copytrace: move fast heuristic copytracing algorithm to core...
r34180 > EOF
> }
> __EOF__
$ . "$TESTTMP/copytrace.sh"
$ cat >> $HGRCPATH << EOF
> [extensions]
> rebase=
Martin von Zweigbergk
tests: defines aliases for `hg log` calls in test-copytrace-heuristics.t...
r42358 > [alias]
Martin von Zweigbergk
tests: make log style a little easier to read in test-copytrace-heuristics.t...
r42362 > l = log -G -T 'rev: {rev}\ndesc: {desc}\n'
> pl = log -G -T 'rev: {rev}, phase: {phase}\ndesc: {desc}\n'
Pulkit Goyal
copytrace: move fast heuristic copytracing algorithm to core...
r34180 > EOF
Pulkit Goyal
tests: optimize test-copytrace-heuristics.t...
r34568 NOTE: calling initclient() set copytrace.sourcecommitlimit=-1 as we want to
prevent the full copytrace algorithm to run and test the heuristic algorithm
without complexing the test cases with public and draft commits.
Pulkit Goyal
copytrace: move fast heuristic copytracing algorithm to core...
r34180 Check filename heuristics (same dirname and same basename)
Pulkit Goyal
tests: optimize test-copytrace-heuristics.t...
r34568 ----------------------------------------------------------
$ hg init repo
$ initclient repo
$ cd repo
Pulkit Goyal
copytrace: move fast heuristic copytracing algorithm to core...
r34180 $ echo a > a
$ mkdir dir
$ echo a > dir/file.txt
$ hg addremove
adding a
adding dir/file.txt
$ hg ci -m initial
$ hg mv a b
$ hg mv -q dir dir2
$ hg ci -m 'mv a b, mv dir/ dir2/'
$ hg up -q 0
$ echo b > a
$ echo b > dir/file.txt
$ hg ci -qm 'mod a, mod dir/file.txt'
Martin von Zweigbergk
tests: defines aliases for `hg log` calls in test-copytrace-heuristics.t...
r42358 $ hg l
Martin von Zweigbergk
tests: make log style a little easier to read in test-copytrace-heuristics.t...
r42362 @ rev: 2
| desc: mod a, mod dir/file.txt
| o rev: 1
|/ desc: mv a b, mv dir/ dir2/
o rev: 0
desc: initial
Pulkit Goyal
copytrace: move fast heuristic copytracing algorithm to core...
r34180
$ hg rebase -s . -d 1
Martin von Zweigbergk
rebase: change and standarize template for rebase's one-line summary...
r46356 rebasing 2:557f403c0afd tip "mod a, mod dir/file.txt"
Pulkit Goyal
copytrace: move fast heuristic copytracing algorithm to core...
r34180 merging b and a to b
merging dir2/file.txt and dir/file.txt to dir2/file.txt
Matt Harbison
tests: remove (glob) annotations that were only for '\' matches...
r35394 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/557f403c0afd-9926eeff-rebase.hg
Pulkit Goyal
copytrace: move fast heuristic copytracing algorithm to core...
r34180 $ cd ..
$ rm -rf repo
Make sure filename heuristics do not when they are not related
Pulkit Goyal
tests: optimize test-copytrace-heuristics.t...
r34568 --------------------------------------------------------------
$ hg init repo
$ initclient repo
$ cd repo
Pulkit Goyal
copytrace: move fast heuristic copytracing algorithm to core...
r34180 $ echo 'somecontent' > a
$ hg add a
$ hg ci -m initial
$ hg rm a
$ echo 'completelydifferentcontext' > b
$ hg add b
$ hg ci -m 'rm a, add b'
$ hg up -q 0
$ printf 'somecontent\nmoarcontent' > a
$ hg ci -qm 'mode a'
Martin von Zweigbergk
tests: defines aliases for `hg log` calls in test-copytrace-heuristics.t...
r42358 $ hg l
Martin von Zweigbergk
tests: make log style a little easier to read in test-copytrace-heuristics.t...
r42362 @ rev: 2
| desc: mode a
| o rev: 1
|/ desc: rm a, add b
o rev: 0
desc: initial
Pulkit Goyal
copytrace: move fast heuristic copytracing algorithm to core...
r34180
$ hg rebase -s . -d 1
Martin von Zweigbergk
rebase: change and standarize template for rebase's one-line summary...
r46356 rebasing 2:d526312210b9 tip "mode a"
Pulkit Goyal
filemerge: fix the wrong placements of messages in prompt...
r39321 file 'a' was deleted in local [dest] but was modified in other [source].
Kyle Lippincott
filemerge: make last line of prompts <40 english chars (issue6158)...
r42765 You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved.
What do you want to do? u
Daniel Ploch
error: unify the error message formats for 'rebase' and 'unshelve'...
r45710 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
Pulkit Goyal
copytrace: move fast heuristic copytracing algorithm to core...
r34180 [1]
$ cd ..
$ rm -rf repo
Test when lca didn't modified the file that was moved
Pulkit Goyal
tests: optimize test-copytrace-heuristics.t...
r34568 -----------------------------------------------------
$ hg init repo
Pulkit Goyal
copytrace: move fast heuristic copytracing algorithm to core...
r34180 $ initclient repo
$ cd repo
$ echo 'somecontent' > a
$ hg add a
$ hg ci -m initial
$ echo c > c
$ hg add c
$ hg ci -m randomcommit
$ hg mv a b
$ hg ci -m 'mv a b'
Pulkit Goyal
tests: optimize test-copytrace-heuristics.t...
r34568 $ hg up -q 1
$ echo b > a
$ hg ci -qm 'mod a'
Martin von Zweigbergk
tests: defines aliases for `hg log` calls in test-copytrace-heuristics.t...
r42358 $ hg pl
Martin von Zweigbergk
tests: make log style a little easier to read in test-copytrace-heuristics.t...
r42362 @ rev: 3, phase: draft
| desc: mod a
| o rev: 2, phase: draft
|/ desc: mv a b
o rev: 1, phase: draft
| desc: randomcommit
o rev: 0, phase: draft
desc: initial
Pulkit Goyal
tests: optimize test-copytrace-heuristics.t...
r34568
$ hg rebase -s . -d 2
Martin von Zweigbergk
rebase: change and standarize template for rebase's one-line summary...
r46356 rebasing 3:9d5cf99c3d9f tip "mod a"
Pulkit Goyal
tests: optimize test-copytrace-heuristics.t...
r34568 merging b and a to b
Matt Harbison
tests: remove (glob) annotations that were only for '\' matches...
r35394 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/9d5cf99c3d9f-f02358cc-rebase.hg
Pulkit Goyal
copytrace: move fast heuristic copytracing algorithm to core...
r34180 $ cd ..
Pulkit Goyal
tests: optimize test-copytrace-heuristics.t...
r34568 $ rm -rf repo
Rebase "backwards"
------------------
$ hg init repo
Pulkit Goyal
copytrace: move fast heuristic copytracing algorithm to core...
r34180 $ initclient repo
$ cd repo
Pulkit Goyal
tests: optimize test-copytrace-heuristics.t...
r34568 $ echo 'somecontent' > a
$ hg add a
$ hg ci -m initial
$ echo c > c
$ hg add c
$ hg ci -m randomcommit
$ hg mv a b
$ hg ci -m 'mv a b'
Pulkit Goyal
copytrace: move fast heuristic copytracing algorithm to core...
r34180 $ hg up -q 2
$ echo b > b
$ hg ci -qm 'mod b'
Martin von Zweigbergk
tests: defines aliases for `hg log` calls in test-copytrace-heuristics.t...
r42358 $ hg l
Martin von Zweigbergk
tests: make log style a little easier to read in test-copytrace-heuristics.t...
r42362 @ rev: 3
| desc: mod b
o rev: 2
| desc: mv a b
o rev: 1
| desc: randomcommit
o rev: 0
desc: initial
Pulkit Goyal
copytrace: move fast heuristic copytracing algorithm to core...
r34180
$ hg rebase -s . -d 0
Martin von Zweigbergk
rebase: change and standarize template for rebase's one-line summary...
r46356 rebasing 3:fbe97126b396 tip "mod b"
Pulkit Goyal
copytrace: move fast heuristic copytracing algorithm to core...
r34180 merging a and b to a
Matt Harbison
tests: remove (glob) annotations that were only for '\' matches...
r35394 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/fbe97126b396-cf5452a1-rebase.hg
Pulkit Goyal
copytrace: move fast heuristic copytracing algorithm to core...
r34180 $ cd ..
$ rm -rf repo
Pulkit Goyal
tests: optimize test-copytrace-heuristics.t...
r34568 Check a few potential move candidates
-------------------------------------
Pulkit Goyal
copytrace: move fast heuristic copytracing algorithm to core...
r34180 $ hg init repo
$ initclient repo
$ cd repo
$ mkdir dir
$ echo a > dir/a
$ hg add dir/a
$ hg ci -qm initial
$ hg mv dir/a dir/b
$ hg ci -qm 'mv dir/a dir/b'
$ mkdir dir2
$ echo b > dir2/a
$ hg add dir2/a
$ hg ci -qm 'create dir2/a'
$ hg up -q 0
$ echo b > dir/a
$ hg ci -qm 'mod dir/a'
Martin von Zweigbergk
tests: defines aliases for `hg log` calls in test-copytrace-heuristics.t...
r42358 $ hg l
Martin von Zweigbergk
tests: make log style a little easier to read in test-copytrace-heuristics.t...
r42362 @ rev: 3
| desc: mod dir/a
| o rev: 2
| | desc: create dir2/a
| o rev: 1
|/ desc: mv dir/a dir/b
o rev: 0
desc: initial
Pulkit Goyal
copytrace: move fast heuristic copytracing algorithm to core...
r34180
$ hg rebase -s . -d 2
Martin von Zweigbergk
rebase: change and standarize template for rebase's one-line summary...
r46356 rebasing 3:6b2f4cece40f tip "mod dir/a"
Pulkit Goyal
copytrace: move fast heuristic copytracing algorithm to core...
r34180 merging dir/b and dir/a to dir/b
Matt Harbison
tests: remove (glob) annotations that were only for '\' matches...
r35394 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/6b2f4cece40f-503efe60-rebase.hg
Pulkit Goyal
copytrace: move fast heuristic copytracing algorithm to core...
r34180 $ cd ..
$ rm -rf repo
Pulkit Goyal
copies: add a config to limit the number of candidates to check in heuristics...
r34847 Test the copytrace.movecandidateslimit with many move candidates
----------------------------------------------------------------
$ hg init repo
$ initclient repo
$ cd repo
$ echo a > a
$ hg add a
$ hg ci -m initial
$ hg mv a foo
$ echo a > b
$ echo a > c
$ echo a > d
$ echo a > e
$ echo a > f
$ echo a > g
$ hg add b
$ hg add c
$ hg add d
$ hg add e
$ hg add f
$ hg add g
$ hg ci -m 'mv a foo, add many files'
$ hg up -q ".^"
$ echo b > a
$ hg ci -m 'mod a'
created new head
Martin von Zweigbergk
tests: defines aliases for `hg log` calls in test-copytrace-heuristics.t...
r42358 $ hg l
Martin von Zweigbergk
tests: make log style a little easier to read in test-copytrace-heuristics.t...
r42362 @ rev: 2
| desc: mod a
| o rev: 1
|/ desc: mv a foo, add many files
o rev: 0
desc: initial
Pulkit Goyal
copies: add a config to limit the number of candidates to check in heuristics...
r34847
With small limit
$ hg rebase -s 2 -d 1 --config experimental.copytrace.movecandidateslimit=0
Martin von Zweigbergk
rebase: change and standarize template for rebase's one-line summary...
r46356 rebasing 2:ef716627c70b tip "mod a"
Pulkit Goyal
copies: add a config to limit the number of candidates to check in heuristics...
r34847 skipping copytracing for 'a', more candidates than the limit: 7
Pulkit Goyal
filemerge: fix the wrong placements of messages in prompt...
r39321 file 'a' was deleted in local [dest] but was modified in other [source].
Kyle Lippincott
filemerge: make last line of prompts <40 english chars (issue6158)...
r42765 You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved.
What do you want to do? u
Daniel Ploch
error: unify the error message formats for 'rebase' and 'unshelve'...
r45710 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
Pulkit Goyal
copies: add a config to limit the number of candidates to check in heuristics...
r34847 [1]
$ hg rebase --abort
rebase aborted
With default limit which is 100
$ hg rebase -s 2 -d 1
Martin von Zweigbergk
rebase: change and standarize template for rebase's one-line summary...
r46356 rebasing 2:ef716627c70b tip "mod a"
Pulkit Goyal
copies: add a config to limit the number of candidates to check in heuristics...
r34847 merging foo and a to foo
Matt Harbison
tests: remove (glob) annotations that were only for '\' matches...
r35394 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/ef716627c70b-24681561-rebase.hg
Pulkit Goyal
copies: add a config to limit the number of candidates to check in heuristics...
r34847
$ cd ..
$ rm -rf repo
Pulkit Goyal
copytrace: move fast heuristic copytracing algorithm to core...
r34180 Move file in one branch and delete it in another
Pulkit Goyal
tests: optimize test-copytrace-heuristics.t...
r34568 -----------------------------------------------
$ hg init repo
$ initclient repo
$ cd repo
Pulkit Goyal
copytrace: move fast heuristic copytracing algorithm to core...
r34180 $ echo a > a
$ hg add a
$ hg ci -m initial
$ hg mv a b
$ hg ci -m 'mv a b'
$ hg up -q ".^"
$ hg rm a
$ hg ci -m 'del a'
created new head
Martin von Zweigbergk
tests: defines aliases for `hg log` calls in test-copytrace-heuristics.t...
r42358 $ hg pl
Martin von Zweigbergk
tests: make log style a little easier to read in test-copytrace-heuristics.t...
r42362 @ rev: 2, phase: draft
| desc: del a
| o rev: 1, phase: draft
|/ desc: mv a b
o rev: 0, phase: draft
desc: initial
Pulkit Goyal
copytrace: move fast heuristic copytracing algorithm to core...
r34180
$ hg rebase -s 1 -d 2
rebasing 1:472e38d57782 "mv a b"
Matt Harbison
tests: remove (glob) annotations that were only for '\' matches...
r35394 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/472e38d57782-17d50e29-rebase.hg
Pulkit Goyal
copytrace: move fast heuristic copytracing algorithm to core...
r34180 $ hg up -q c492ed3c7e35dcd1dc938053b8adf56e2cfbd062
Joerg Sonnenberger
tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems...
r45218 $ ls -A
.hg
Pulkit Goyal
copytrace: move fast heuristic copytracing algorithm to core...
r34180 b
$ cd ..
$ rm -rf repo
Move a directory in draft branch
Pulkit Goyal
tests: optimize test-copytrace-heuristics.t...
r34568 --------------------------------
$ hg init repo
$ initclient repo
$ cd repo
Pulkit Goyal
copytrace: move fast heuristic copytracing algorithm to core...
r34180 $ mkdir dir
$ echo a > dir/a
$ hg add dir/a
$ hg ci -qm initial
$ echo b > dir/a
$ hg ci -qm 'mod dir/a'
$ hg up -q ".^"
$ hg mv -q dir/ dir2
$ hg ci -qm 'mv dir/ dir2/'
Martin von Zweigbergk
tests: defines aliases for `hg log` calls in test-copytrace-heuristics.t...
r42358 $ hg l
Martin von Zweigbergk
tests: make log style a little easier to read in test-copytrace-heuristics.t...
r42362 @ rev: 2
| desc: mv dir/ dir2/
| o rev: 1
|/ desc: mod dir/a
o rev: 0
desc: initial
Pulkit Goyal
copytrace: move fast heuristic copytracing algorithm to core...
r34180
$ hg rebase -s . -d 1
Martin von Zweigbergk
rebase: change and standarize template for rebase's one-line summary...
r46356 rebasing 2:a33d80b6e352 tip "mv dir/ dir2/"
Pulkit Goyal
copytrace: move fast heuristic copytracing algorithm to core...
r34180 merging dir/a and dir2/a to dir2/a
Matt Harbison
tests: remove (glob) annotations that were only for '\' matches...
r35394 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/a33d80b6e352-fecb9ada-rebase.hg
Pulkit Goyal
copytrace: move fast heuristic copytracing algorithm to core...
r34180 $ cd ..
$ rm -rf server
$ rm -rf repo
Move file twice and rebase mod on top of moves
Pulkit Goyal
tests: optimize test-copytrace-heuristics.t...
r34568 ----------------------------------------------
$ hg init repo
$ initclient repo
$ cd repo
Pulkit Goyal
copytrace: move fast heuristic copytracing algorithm to core...
r34180 $ echo a > a
$ hg add a
$ hg ci -m initial
$ hg mv a b
$ hg ci -m 'mv a b'
$ hg mv b c
$ hg ci -m 'mv b c'
$ hg up -q 0
$ echo c > a
$ hg ci -m 'mod a'
created new head
Pulkit Goyal
tests: optimize test-copytrace-heuristics.t...
r34568
Martin von Zweigbergk
tests: defines aliases for `hg log` calls in test-copytrace-heuristics.t...
r42358 $ hg l
Martin von Zweigbergk
tests: make log style a little easier to read in test-copytrace-heuristics.t...
r42362 @ rev: 3
| desc: mod a
| o rev: 2
| | desc: mv b c
| o rev: 1
|/ desc: mv a b
o rev: 0
desc: initial
Pulkit Goyal
tests: optimize test-copytrace-heuristics.t...
r34568 $ hg rebase -s . -d 2
Martin von Zweigbergk
rebase: change and standarize template for rebase's one-line summary...
r46356 rebasing 3:d41316942216 tip "mod a"
Pulkit Goyal
tests: optimize test-copytrace-heuristics.t...
r34568 merging c and a to c
Matt Harbison
tests: remove (glob) annotations that were only for '\' matches...
r35394 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/d41316942216-2b5949bc-rebase.hg
Pulkit Goyal
tests: optimize test-copytrace-heuristics.t...
r34568
$ cd ..
$ rm -rf repo
Move file twice and rebase moves on top of mods
-----------------------------------------------
$ hg init repo
$ initclient repo
$ cd repo
$ echo a > a
$ hg add a
$ hg ci -m initial
$ hg mv a b
$ hg ci -m 'mv a b'
$ hg mv b c
$ hg ci -m 'mv b c'
$ hg up -q 0
$ echo c > a
$ hg ci -m 'mod a'
created new head
Martin von Zweigbergk
tests: defines aliases for `hg log` calls in test-copytrace-heuristics.t...
r42358 $ hg l
Martin von Zweigbergk
tests: make log style a little easier to read in test-copytrace-heuristics.t...
r42362 @ rev: 3
| desc: mod a
| o rev: 2
| | desc: mv b c
| o rev: 1
|/ desc: mv a b
o rev: 0
desc: initial
Pulkit Goyal
copytrace: move fast heuristic copytracing algorithm to core...
r34180 $ hg rebase -s 1 -d .
rebasing 1:472e38d57782 "mv a b"
merging a and b to b
rebasing 2:d3efd280421d "mv b c"
merging b and c to c
Matt Harbison
tests: remove (glob) annotations that were only for '\' matches...
r35394 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/472e38d57782-ab8d3c58-rebase.hg
Pulkit Goyal
copytrace: move fast heuristic copytracing algorithm to core...
r34180
$ cd ..
$ rm -rf repo
Move one file and add another file in the same folder in one branch, modify file in another branch
Pulkit Goyal
tests: optimize test-copytrace-heuristics.t...
r34568 --------------------------------------------------------------------------------------------------
$ hg init repo
$ initclient repo
$ cd repo
Pulkit Goyal
copytrace: move fast heuristic copytracing algorithm to core...
r34180 $ echo a > a
$ hg add a
$ hg ci -m initial
$ hg mv a b
$ hg ci -m 'mv a b'
$ echo c > c
$ hg add c
$ hg ci -m 'add c'
$ hg up -q 0
$ echo b > a
$ hg ci -m 'mod a'
created new head
Martin von Zweigbergk
tests: defines aliases for `hg log` calls in test-copytrace-heuristics.t...
r42358 $ hg l
Martin von Zweigbergk
tests: make log style a little easier to read in test-copytrace-heuristics.t...
r42362 @ rev: 3
| desc: mod a
| o rev: 2
| | desc: add c
| o rev: 1
|/ desc: mv a b
o rev: 0
desc: initial
Pulkit Goyal
copytrace: move fast heuristic copytracing algorithm to core...
r34180
$ hg rebase -s . -d 2
Martin von Zweigbergk
rebase: change and standarize template for rebase's one-line summary...
r46356 rebasing 3:ef716627c70b tip "mod a"
Pulkit Goyal
copytrace: move fast heuristic copytracing algorithm to core...
r34180 merging b and a to b
Matt Harbison
tests: remove (glob) annotations that were only for '\' matches...
r35394 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/ef716627c70b-24681561-rebase.hg
Joerg Sonnenberger
tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems...
r45218 $ ls -A
.hg
Pulkit Goyal
copytrace: move fast heuristic copytracing algorithm to core...
r34180 b
c
$ cat b
b
Pulkit Goyal
tests: optimize test-copytrace-heuristics.t...
r34568 $ rm -rf repo
Pulkit Goyal
copytrace: move fast heuristic copytracing algorithm to core...
r34180
Merge test
Pulkit Goyal
tests: optimize test-copytrace-heuristics.t...
r34568 ----------
$ hg init repo
$ initclient repo
$ cd repo
Pulkit Goyal
copytrace: move fast heuristic copytracing algorithm to core...
r34180 $ echo a > a
$ hg add a
$ hg ci -m initial
$ echo b > a
$ hg ci -m 'modify a'
$ hg up -q 0
$ hg mv a b
$ hg ci -m 'mv a b'
created new head
$ hg up -q 2
Martin von Zweigbergk
tests: defines aliases for `hg log` calls in test-copytrace-heuristics.t...
r42358 $ hg l
Martin von Zweigbergk
tests: make log style a little easier to read in test-copytrace-heuristics.t...
r42362 @ rev: 2
| desc: mv a b
| o rev: 1
|/ desc: modify a
o rev: 0
desc: initial
Pulkit Goyal
copytrace: move fast heuristic copytracing algorithm to core...
r34180
$ hg merge 1
merging b and a to b
0 files updated, 1 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit)
$ hg ci -m merge
Joerg Sonnenberger
tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems...
r45218 $ ls -A
.hg
Pulkit Goyal
copytrace: move fast heuristic copytracing algorithm to core...
r34180 b
$ cd ..
$ rm -rf repo
Copy and move file
Pulkit Goyal
tests: optimize test-copytrace-heuristics.t...
r34568 ------------------
$ hg init repo
$ initclient repo
$ cd repo
Pulkit Goyal
copytrace: move fast heuristic copytracing algorithm to core...
r34180 $ echo a > a
$ hg add a
$ hg ci -m initial
$ hg cp a c
$ hg mv a b
$ hg ci -m 'cp a c, mv a b'
$ hg up -q 0
$ echo b > a
$ hg ci -m 'mod a'
created new head
Martin von Zweigbergk
tests: defines aliases for `hg log` calls in test-copytrace-heuristics.t...
r42358 $ hg l
Martin von Zweigbergk
tests: make log style a little easier to read in test-copytrace-heuristics.t...
r42362 @ rev: 2
| desc: mod a
| o rev: 1
|/ desc: cp a c, mv a b
o rev: 0
desc: initial
Pulkit Goyal
copytrace: move fast heuristic copytracing algorithm to core...
r34180
$ hg rebase -s . -d 1
Martin von Zweigbergk
rebase: change and standarize template for rebase's one-line summary...
r46356 rebasing 2:ef716627c70b tip "mod a"
Pulkit Goyal
copytrace: move fast heuristic copytracing algorithm to core...
r34180 merging b and a to b
merging c and a to c
Matt Harbison
tests: remove (glob) annotations that were only for '\' matches...
r35394 saved backup bundle to $TESTTMP/repo/repo/.hg/strip-backup/ef716627c70b-24681561-rebase.hg
Joerg Sonnenberger
tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems...
r45218 $ ls -A
.hg
Pulkit Goyal
copytrace: move fast heuristic copytracing algorithm to core...
r34180 b
c
$ cat b
b
$ cat c
b
$ cd ..
$ rm -rf repo
Do a merge commit with many consequent moves in one branch
Pulkit Goyal
tests: optimize test-copytrace-heuristics.t...
r34568 ----------------------------------------------------------
$ hg init repo
$ initclient repo
$ cd repo
Pulkit Goyal
copytrace: move fast heuristic copytracing algorithm to core...
r34180 $ echo a > a
$ hg add a
$ hg ci -m initial
$ echo b > a
$ hg ci -qm 'mod a'
$ hg up -q ".^"
$ hg mv a b
$ hg ci -qm 'mv a b'
$ hg mv b c
$ hg ci -qm 'mv b c'
$ hg up -q 1
Martin von Zweigbergk
tests: defines aliases for `hg log` calls in test-copytrace-heuristics.t...
r42358 $ hg l
Martin von Zweigbergk
tests: make log style a little easier to read in test-copytrace-heuristics.t...
r42362 o rev: 3
| desc: mv b c
o rev: 2
| desc: mv a b
| @ rev: 1
|/ desc: mod a
o rev: 0
desc: initial
Pulkit Goyal
copytrace: move fast heuristic copytracing algorithm to core...
r34180
$ hg merge 3
merging a and c to c
0 files updated, 1 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit)
$ hg ci -qm 'merge'
Martin von Zweigbergk
tests: defines aliases for `hg log` calls in test-copytrace-heuristics.t...
r42358 $ hg pl
Martin von Zweigbergk
tests: make log style a little easier to read in test-copytrace-heuristics.t...
r42362 @ rev: 4, phase: draft
|\ desc: merge
| o rev: 3, phase: draft
| | desc: mv b c
| o rev: 2, phase: draft
| | desc: mv a b
o | rev: 1, phase: draft
|/ desc: mod a
o rev: 0, phase: draft
desc: initial
Joerg Sonnenberger
tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems...
r45218 $ ls -A
.hg
Pulkit Goyal
copytrace: move fast heuristic copytracing algorithm to core...
r34180 c
$ cd ..
$ rm -rf repo
Test shelve/unshelve
Pulkit Goyal
tests: optimize test-copytrace-heuristics.t...
r34568 -------------------
$ hg init repo
$ initclient repo
$ cd repo
Pulkit Goyal
copytrace: move fast heuristic copytracing algorithm to core...
r34180 $ echo a > a
$ hg add a
$ hg ci -m initial
$ echo b > a
$ hg shelve
shelved as default
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg mv a b
$ hg ci -m 'mv a b'
Martin von Zweigbergk
tests: defines aliases for `hg log` calls in test-copytrace-heuristics.t...
r42358 $ hg l
Martin von Zweigbergk
tests: make log style a little easier to read in test-copytrace-heuristics.t...
r42362 @ rev: 1
| desc: mv a b
o rev: 0
desc: initial
Pulkit Goyal
copytrace: move fast heuristic copytracing algorithm to core...
r34180 $ hg unshelve
unshelving change 'default'
rebasing shelved changes
merging b and a to b
Joerg Sonnenberger
tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems...
r45218 $ ls -A
.hg
Pulkit Goyal
copytrace: move fast heuristic copytracing algorithm to core...
r34180 b
$ cat b
b
$ cd ..
$ rm -rf repo
Pulkit Goyal
copytrace: use the full copytracing method if only drafts are involved...
r34289
Test full copytrace ability on draft branch
-------------------------------------------
File directory and base name changed in same move
$ hg init repo
$ initclient repo
$ mkdir repo/dir1
$ cd repo/dir1
$ echo a > a
$ hg add a
$ hg ci -qm initial
$ cd ..
$ hg mv -q dir1 dir2
$ hg mv dir2/a dir2/b
$ hg ci -qm 'mv a b; mv dir1 dir2'
$ hg up -q '.^'
$ cd dir1
$ echo b >> a
$ cd ..
$ hg ci -qm 'mod a'
Martin von Zweigbergk
tests: defines aliases for `hg log` calls in test-copytrace-heuristics.t...
r42358 $ hg pl
Martin von Zweigbergk
tests: make log style a little easier to read in test-copytrace-heuristics.t...
r42362 @ rev: 2, phase: draft
| desc: mod a
| o rev: 1, phase: draft
|/ desc: mv a b; mv dir1 dir2
o rev: 0, phase: draft
desc: initial
Pulkit Goyal
copytrace: use the full copytracing method if only drafts are involved...
r34289
Pulkit Goyal
tests: optimize test-copytrace-heuristics.t...
r34568 $ hg rebase -s . -d 1 --config experimental.copytrace.sourcecommitlimit=100
Martin von Zweigbergk
rebase: change and standarize template for rebase's one-line summary...
r46356 rebasing 2:6207d2d318e7 tip "mod a"
Pulkit Goyal
copytrace: use the full copytracing method if only drafts are involved...
r34289 merging dir2/b and dir1/a to dir2/b
Matt Harbison
tests: remove (glob) annotations that were only for '\' matches...
r35394 saved backup bundle to $TESTTMP/repo/repo/.hg/strip-backup/6207d2d318e7-1c9779ad-rebase.hg
Pulkit Goyal
copytrace: use the full copytracing method if only drafts are involved...
r34289 $ cat dir2/b
a
b
$ cd ..
$ rm -rf repo
Move directory in one merge parent, while adding file to original directory
in other merge parent. File moved on rebase.
Pulkit Goyal
tests: optimize test-copytrace-heuristics.t...
r34568
Pulkit Goyal
copytrace: use the full copytracing method if only drafts are involved...
r34289 $ hg init repo
$ initclient repo
$ mkdir repo/dir1
$ cd repo/dir1
$ echo dummy > dummy
$ hg add dummy
$ cd ..
$ hg ci -qm initial
$ cd dir1
$ echo a > a
$ hg add a
$ cd ..
$ hg ci -qm 'hg add dir1/a'
$ hg up -q '.^'
$ hg mv -q dir1 dir2
$ hg ci -qm 'mv dir1 dir2'
Martin von Zweigbergk
tests: defines aliases for `hg log` calls in test-copytrace-heuristics.t...
r42358 $ hg pl
Martin von Zweigbergk
tests: make log style a little easier to read in test-copytrace-heuristics.t...
r42362 @ rev: 2, phase: draft
| desc: mv dir1 dir2
| o rev: 1, phase: draft
|/ desc: hg add dir1/a
o rev: 0, phase: draft
desc: initial
Pulkit Goyal
copytrace: use the full copytracing method if only drafts are involved...
r34289
Pulkit Goyal
tests: optimize test-copytrace-heuristics.t...
r34568 $ hg rebase -s . -d 1 --config experimental.copytrace.sourcecommitlimit=100
Martin von Zweigbergk
rebase: change and standarize template for rebase's one-line summary...
r46356 rebasing 2:e8919e7df8d0 tip "mv dir1 dir2"
Matt Harbison
tests: remove (glob) annotations that were only for '\' matches...
r35394 saved backup bundle to $TESTTMP/repo/repo/.hg/strip-backup/e8919e7df8d0-f62fab62-rebase.hg
Pulkit Goyal
copytrace: use the full copytracing method if only drafts are involved...
r34289 $ ls dir2
a
dummy
$ rm -rf repo
Pulkit Goyal
copytrace: add a a new config to limit the number of drafts in heuristics...
r34312
Testing the sourcecommitlimit config
Pulkit Goyal
tests: optimize test-copytrace-heuristics.t...
r34568 -----------------------------------
Pulkit Goyal
copytrace: add a a new config to limit the number of drafts in heuristics...
r34312
$ hg init repo
$ initclient repo
$ cd repo
$ echo a > a
$ hg ci -Aqm "added a"
$ echo "more things" >> a
$ hg ci -qm "added more things to a"
$ hg up 0
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ echo b > b
$ hg ci -Aqm "added b"
$ mkdir foo
$ hg mv a foo/bar
$ hg ci -m "Moved a to foo/bar"
Martin von Zweigbergk
tests: defines aliases for `hg log` calls in test-copytrace-heuristics.t...
r42358 $ hg pl
Martin von Zweigbergk
tests: make log style a little easier to read in test-copytrace-heuristics.t...
r42362 @ rev: 3, phase: draft
| desc: Moved a to foo/bar
o rev: 2, phase: draft
| desc: added b
| o rev: 1, phase: draft
|/ desc: added more things to a
o rev: 0, phase: draft
desc: added a
Pulkit Goyal
copytrace: add a a new config to limit the number of drafts in heuristics...
r34312
When the sourcecommitlimit is small and we have more drafts, we use heuristics only
Martin von Zweigbergk
tests: make log style a little easier to read in test-copytrace-heuristics.t...
r42362 $ hg rebase -s 1 -d .
Pulkit Goyal
copytrace: add a a new config to limit the number of drafts in heuristics...
r34312 rebasing 1:8b6e13696c38 "added more things to a"
Pulkit Goyal
filemerge: fix the wrong placements of messages in prompt...
r39321 file 'a' was deleted in local [dest] but was modified in other [source].
Kyle Lippincott
filemerge: make last line of prompts <40 english chars (issue6158)...
r42765 You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved.
What do you want to do? u
Daniel Ploch
error: unify the error message formats for 'rebase' and 'unshelve'...
r45710 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
Pulkit Goyal
copytrace: add a a new config to limit the number of drafts in heuristics...
r34312 [1]
But when we have "sourcecommitlimit > (no. of drafts from base to c1)", we do
fullcopytracing
$ hg rebase --abort
rebase aborted
Martin von Zweigbergk
tests: make log style a little easier to read in test-copytrace-heuristics.t...
r42362 $ hg rebase -s 1 -d . --config experimental.copytrace.sourcecommitlimit=100
Pulkit Goyal
copytrace: add a a new config to limit the number of drafts in heuristics...
r34312 rebasing 1:8b6e13696c38 "added more things to a"
merging foo/bar and a to foo/bar
Matt Harbison
tests: remove (glob) annotations that were only for '\' matches...
r35394 saved backup bundle to $TESTTMP/repo/repo/repo/.hg/strip-backup/8b6e13696c38-fc14ac83-rebase.hg
Pulkit Goyal
copytrace: add a a new config to limit the number of drafts in heuristics...
r34312 $ cd ..
$ rm -rf repo