Mercurial > hg
annotate tests/test-diff-change.t @ 35428:71427ff1dff8
workers: handling exceptions in windows workers
This adds handling of exceptions from worker threads and resurfaces them as if the function ran without workers.
If any of the threads throws, the main thread kills all running threads giving them 5 sec to handle the interruption and raises the first exception received.
We don't have to join threads if is_alive() is false
Test Plan:
Ran multiple updates/enable/disable sparse profile and things worked well
Ran test on CentOS- all tests passing on @ passed here
Added a forged exception into the worker code and got it properly resurfaced and the rest of workers killed: P58642088
PS C:\open\<repo>> ..\facebook-hg-rpms\build\hg\hg.exe --config extensions.fsmonitor=! sparse --enable-profile <profile>
updating [==> ] 1300/39166 1m57sException in thread Thread-3:
Traceback (most recent call last):
File "C:\open\facebook-hg-rpms\build\hg\hg-python\lib\threading.py", line 801, in __bootstrap_inner
self.run()
File "C:\open\facebook-hg-rpms\build\hg\mercurial\worker.py", line 244, in run
raise e
Exception: Forged exception
Exception in thread Thread-2:
Traceback (most recent call last):
File "C:\open\facebook-hg-rpms\build\hg\hg-python\lib\threading.py", line 801, in __bootstrap_inner
self.run()
File "C:\open\facebook-hg-rpms\build\hg\mercurial\worker.py", line 244, in run
raise e
Exception: Forged exception
<...>
Traceback (most recent call last):
File "C:\open\facebook-hg-rpms\build\hg\hgexe.py", line 41, in <module>
dispatch.run()
File "C:\open\facebook-hg-rpms\build\hg\mercurial\dispatch.py", line 85, in run
status = (dispatch(req) or 0) & 255
File "C:\open\facebook-hg-rpms\build\hg\mercurial\dispatch.py", line 173, in dispatch
ret = _runcatch(req)
File "C:\open\facebook-hg-rpms\build\hg\mercurial\dispatch.py", line 324, in _runcatch
return _callcatch(ui, _runcatchfunc)
File "C:\open\facebook-hg-rpms\build\hg\mercurial\dispatch.py", line 332, in _callcatch
return scmutil.callcatch(ui, func)
File "C:\open\facebook-hg-rpms\build\hg\mercurial\scmutil.py", line 154, in callcatch
return func()
File "C:\open\facebook-hg-rpms\build\hg\mercurial\dispatch.py", line 314, in _runcatchfunc
return _dispatch(req)
File "C:\open\facebook-hg-rpms\build\hg\mercurial\dispatch.py", line 951, in _dispatch
cmdpats, cmdoptions)
File "C:\open\facebook-hg-rpms\build\hg\hg-python\lib\site-packages\remotefilelog\__init__.py", line 415, in runcommand
return orig(lui, repo, *args, **kwargs)
File "C:\open\facebook-hg-rpms\build\hg\hg-python\lib\site-packages\hgext3rd\undo.py", line 118, in _runcommandwrapper
result = orig(lui, repo, cmd, fullargs, *args)
File "C:\open\facebook-hg-rpms\build\hg\hgext\journal.py", line 84, in runcommand
return orig(lui, repo, cmd, fullargs, *args)
File "C:\open\facebook-hg-rpms\build\hg\hg-python\lib\site-packages\hgext3rd\perftweaks.py", line 268, in _tracksparseprofiles
res = runcommand(lui, repo, *args)
File "C:\open\facebook-hg-rpms\build\hg\hg-python\lib\site-packages\hgext3rd\perftweaks.py", line 256, in _trackdirstatesizes
res = runcommand(lui, repo, *args)
File "C:\open\facebook-hg-rpms\build\hg\hg-python\lib\site-packages\hgext3rd\copytrace.py", line 144, in _runcommand
return orig(lui, repo, cmd, fullargs, ui, *args, **kwargs)
File "C:\open\facebook-hg-rpms\build\hg\hg-python\lib\site-packages\hgext3rd\fbamend\hiddenoverride.py", line 119, in runcommand
result = orig(lui, repo, cmd, fullargs, *args)
File "C:\open\facebook-hg-rpms\build\hg\mercurial\dispatch.py", line 712, in runcommand
ret = _runcommand(ui, options, cmd, d)
File "C:\open\facebook-hg-rpms\build\hg\mercurial\dispatch.py", line 959, in _runcommand
return cmdfunc()
File "C:\open\facebook-hg-rpms\build\hg\mercurial\dispatch.py", line 948, in <lambda>
d = lambda: util.checksignature(func)(ui, *args, **strcmdopt)
File "C:\open\facebook-hg-rpms\build\hg\mercurial\util.py", line 1183, in check
return func(*args, **kwargs)
File "C:\open\facebook-hg-rpms\build\hg\hg-python\lib\site-packages\hgext3rd\fbsparse.py", line 860, in sparse
disableprofile=disableprofile, force=force)
File "C:\open\facebook-hg-rpms\build\hg\hg-python\lib\site-packages\hgext3rd\fbsparse.py", line 949, in _config
len, _refresh(ui, repo, oldstatus, oldsparsematch, force))
File "C:\open\facebook-hg-rpms\build\hg\hg-python\lib\site-packages\hgext3rd\fbsparse.py", line 1116, in _refresh
mergemod.applyupdates(repo, typeactions, repo[None], repo['.'], False)
File "C:\open\facebook-hg-rpms\build\hg\hg-python\lib\site-packages\remotefilelog\__init__.py", line 311, in applyupdates
return orig(repo, actions, wctx, mctx, overwrite, labels=labels)
File "C:\open\facebook-hg-rpms\build\hg\mercurial\merge.py", line 1464, in applyupdates
for i, item in prog:
File "C:\open\facebook-hg-rpms\build\hg\mercurial\worker.py", line 286, in _windowsworker
raise t.exception
Exception: Forged exception
PS C:\open\ovrsource>
Differential Revision: https://phab.mercurial-scm.org/D1459
author | Wojciech Lis <wlis@fb.com> |
---|---|
date | Mon, 20 Nov 2017 10:27:41 -0800 |
parents | 98976e3cae57 |
children | 64292addbe67 |
rev | line source |
---|---|
12136
30b5e83004e0
tests: unify test-diff-change
Adrian Buehlmann <adrian@cadifra.com>
parents:
7680
diff
changeset
|
1 Testing diff --change |
7628
9c6ae2e09e11
diff: add --change option to display single changeset diff (issue1420)
Stepan Koltsov <yozh@mx1.ru>
parents:
diff
changeset
|
2 |
12136
30b5e83004e0
tests: unify test-diff-change
Adrian Buehlmann <adrian@cadifra.com>
parents:
7680
diff
changeset
|
3 $ hg init a |
30b5e83004e0
tests: unify test-diff-change
Adrian Buehlmann <adrian@cadifra.com>
parents:
7680
diff
changeset
|
4 $ cd a |
7628
9c6ae2e09e11
diff: add --change option to display single changeset diff (issue1420)
Stepan Koltsov <yozh@mx1.ru>
parents:
diff
changeset
|
5 |
12136
30b5e83004e0
tests: unify test-diff-change
Adrian Buehlmann <adrian@cadifra.com>
parents:
7680
diff
changeset
|
6 $ echo "first" > file.txt |
30b5e83004e0
tests: unify test-diff-change
Adrian Buehlmann <adrian@cadifra.com>
parents:
7680
diff
changeset
|
7 $ hg add file.txt |
30b5e83004e0
tests: unify test-diff-change
Adrian Buehlmann <adrian@cadifra.com>
parents:
7680
diff
changeset
|
8 $ hg commit -m 'first commit' # 0 |
7628
9c6ae2e09e11
diff: add --change option to display single changeset diff (issue1420)
Stepan Koltsov <yozh@mx1.ru>
parents:
diff
changeset
|
9 |
12136
30b5e83004e0
tests: unify test-diff-change
Adrian Buehlmann <adrian@cadifra.com>
parents:
7680
diff
changeset
|
10 $ echo "second" > file.txt |
30b5e83004e0
tests: unify test-diff-change
Adrian Buehlmann <adrian@cadifra.com>
parents:
7680
diff
changeset
|
11 $ hg commit -m 'second commit' # 1 |
30b5e83004e0
tests: unify test-diff-change
Adrian Buehlmann <adrian@cadifra.com>
parents:
7680
diff
changeset
|
12 |
30b5e83004e0
tests: unify test-diff-change
Adrian Buehlmann <adrian@cadifra.com>
parents:
7680
diff
changeset
|
13 $ echo "third" > file.txt |
30b5e83004e0
tests: unify test-diff-change
Adrian Buehlmann <adrian@cadifra.com>
parents:
7680
diff
changeset
|
14 $ hg commit -m 'third commit' # 2 |
7628
9c6ae2e09e11
diff: add --change option to display single changeset diff (issue1420)
Stepan Koltsov <yozh@mx1.ru>
parents:
diff
changeset
|
15 |
12136
30b5e83004e0
tests: unify test-diff-change
Adrian Buehlmann <adrian@cadifra.com>
parents:
7680
diff
changeset
|
16 $ hg diff --nodates --change 1 |
30b5e83004e0
tests: unify test-diff-change
Adrian Buehlmann <adrian@cadifra.com>
parents:
7680
diff
changeset
|
17 diff -r 4bb65dda5db4 -r e9b286083166 file.txt |
30b5e83004e0
tests: unify test-diff-change
Adrian Buehlmann <adrian@cadifra.com>
parents:
7680
diff
changeset
|
18 --- a/file.txt |
30b5e83004e0
tests: unify test-diff-change
Adrian Buehlmann <adrian@cadifra.com>
parents:
7680
diff
changeset
|
19 +++ b/file.txt |
30b5e83004e0
tests: unify test-diff-change
Adrian Buehlmann <adrian@cadifra.com>
parents:
7680
diff
changeset
|
20 @@ -1,1 +1,1 @@ |
30b5e83004e0
tests: unify test-diff-change
Adrian Buehlmann <adrian@cadifra.com>
parents:
7680
diff
changeset
|
21 -first |
30b5e83004e0
tests: unify test-diff-change
Adrian Buehlmann <adrian@cadifra.com>
parents:
7680
diff
changeset
|
22 +second |
7628
9c6ae2e09e11
diff: add --change option to display single changeset diff (issue1420)
Stepan Koltsov <yozh@mx1.ru>
parents:
diff
changeset
|
23 |
12136
30b5e83004e0
tests: unify test-diff-change
Adrian Buehlmann <adrian@cadifra.com>
parents:
7680
diff
changeset
|
24 $ hg diff --change e9b286083166 |
30b5e83004e0
tests: unify test-diff-change
Adrian Buehlmann <adrian@cadifra.com>
parents:
7680
diff
changeset
|
25 diff -r 4bb65dda5db4 -r e9b286083166 file.txt |
30b5e83004e0
tests: unify test-diff-change
Adrian Buehlmann <adrian@cadifra.com>
parents:
7680
diff
changeset
|
26 --- a/file.txt Thu Jan 01 00:00:00 1970 +0000 |
30b5e83004e0
tests: unify test-diff-change
Adrian Buehlmann <adrian@cadifra.com>
parents:
7680
diff
changeset
|
27 +++ b/file.txt Thu Jan 01 00:00:00 1970 +0000 |
30b5e83004e0
tests: unify test-diff-change
Adrian Buehlmann <adrian@cadifra.com>
parents:
7680
diff
changeset
|
28 @@ -1,1 +1,1 @@ |
30b5e83004e0
tests: unify test-diff-change
Adrian Buehlmann <adrian@cadifra.com>
parents:
7680
diff
changeset
|
29 -first |
30b5e83004e0
tests: unify test-diff-change
Adrian Buehlmann <adrian@cadifra.com>
parents:
7680
diff
changeset
|
30 +second |
7628
9c6ae2e09e11
diff: add --change option to display single changeset diff (issue1420)
Stepan Koltsov <yozh@mx1.ru>
parents:
diff
changeset
|
31 |
26019
85f5352c7ca7
revpair: update test to make a difference if odd range not handled specially
Yuya Nishihara <yuya@tcha.org>
parents:
16913
diff
changeset
|
32 $ cd .. |
85f5352c7ca7
revpair: update test to make a difference if odd range not handled specially
Yuya Nishihara <yuya@tcha.org>
parents:
16913
diff
changeset
|
33 |
26020
cc3a30ff9490
revpair: restrict odd-range handling to top-level x:y expression (issue4774)
Yuya Nishihara <yuya@tcha.org>
parents:
26019
diff
changeset
|
34 Test dumb revspecs: top-level "x:y", "x:", ":y" and ":" ranges should be handled |
cc3a30ff9490
revpair: restrict odd-range handling to top-level x:y expression (issue4774)
Yuya Nishihara <yuya@tcha.org>
parents:
26019
diff
changeset
|
35 as pairs even if x == y, but not for "f(x:y)" nor "x::y" (issue3474, issue4774) |
16790
2a0efa1112ac
revpair: handle odd ranges (issue3474)
Matt Mackall <mpm@selenic.com>
parents:
16487
diff
changeset
|
36 |
26019
85f5352c7ca7
revpair: update test to make a difference if odd range not handled specially
Yuya Nishihara <yuya@tcha.org>
parents:
16913
diff
changeset
|
37 $ hg clone -q a dumbspec |
85f5352c7ca7
revpair: update test to make a difference if odd range not handled specially
Yuya Nishihara <yuya@tcha.org>
parents:
16913
diff
changeset
|
38 $ cd dumbspec |
85f5352c7ca7
revpair: update test to make a difference if odd range not handled specially
Yuya Nishihara <yuya@tcha.org>
parents:
16913
diff
changeset
|
39 $ echo "wdir" > file.txt |
85f5352c7ca7
revpair: update test to make a difference if odd range not handled specially
Yuya Nishihara <yuya@tcha.org>
parents:
16913
diff
changeset
|
40 |
16790
2a0efa1112ac
revpair: handle odd ranges (issue3474)
Matt Mackall <mpm@selenic.com>
parents:
16487
diff
changeset
|
41 $ hg diff -r 2:2 |
26020
cc3a30ff9490
revpair: restrict odd-range handling to top-level x:y expression (issue4774)
Yuya Nishihara <yuya@tcha.org>
parents:
26019
diff
changeset
|
42 $ hg diff -r 2:. |
cc3a30ff9490
revpair: restrict odd-range handling to top-level x:y expression (issue4774)
Yuya Nishihara <yuya@tcha.org>
parents:
26019
diff
changeset
|
43 $ hg diff -r 2: |
cc3a30ff9490
revpair: restrict odd-range handling to top-level x:y expression (issue4774)
Yuya Nishihara <yuya@tcha.org>
parents:
26019
diff
changeset
|
44 $ hg diff -r :0 |
cc3a30ff9490
revpair: restrict odd-range handling to top-level x:y expression (issue4774)
Yuya Nishihara <yuya@tcha.org>
parents:
26019
diff
changeset
|
45 $ hg diff -r '2:first(2:2)' |
cc3a30ff9490
revpair: restrict odd-range handling to top-level x:y expression (issue4774)
Yuya Nishihara <yuya@tcha.org>
parents:
26019
diff
changeset
|
46 $ hg diff -r 'first(2:2)' --nodates |
cc3a30ff9490
revpair: restrict odd-range handling to top-level x:y expression (issue4774)
Yuya Nishihara <yuya@tcha.org>
parents:
26019
diff
changeset
|
47 diff -r bf5ff72eb7e0 file.txt |
cc3a30ff9490
revpair: restrict odd-range handling to top-level x:y expression (issue4774)
Yuya Nishihara <yuya@tcha.org>
parents:
26019
diff
changeset
|
48 --- a/file.txt |
cc3a30ff9490
revpair: restrict odd-range handling to top-level x:y expression (issue4774)
Yuya Nishihara <yuya@tcha.org>
parents:
26019
diff
changeset
|
49 +++ b/file.txt |
cc3a30ff9490
revpair: restrict odd-range handling to top-level x:y expression (issue4774)
Yuya Nishihara <yuya@tcha.org>
parents:
26019
diff
changeset
|
50 @@ -1,1 +1,1 @@ |
cc3a30ff9490
revpair: restrict odd-range handling to top-level x:y expression (issue4774)
Yuya Nishihara <yuya@tcha.org>
parents:
26019
diff
changeset
|
51 -third |
cc3a30ff9490
revpair: restrict odd-range handling to top-level x:y expression (issue4774)
Yuya Nishihara <yuya@tcha.org>
parents:
26019
diff
changeset
|
52 +wdir |
29771
98976e3cae57
revpair: do not optimize tree to check for odd-range spec
Yuya Nishihara <yuya@tcha.org>
parents:
26020
diff
changeset
|
53 $ hg diff -r '(2:2)' --nodates |
98976e3cae57
revpair: do not optimize tree to check for odd-range spec
Yuya Nishihara <yuya@tcha.org>
parents:
26020
diff
changeset
|
54 diff -r bf5ff72eb7e0 file.txt |
98976e3cae57
revpair: do not optimize tree to check for odd-range spec
Yuya Nishihara <yuya@tcha.org>
parents:
26020
diff
changeset
|
55 --- a/file.txt |
98976e3cae57
revpair: do not optimize tree to check for odd-range spec
Yuya Nishihara <yuya@tcha.org>
parents:
26020
diff
changeset
|
56 +++ b/file.txt |
98976e3cae57
revpair: do not optimize tree to check for odd-range spec
Yuya Nishihara <yuya@tcha.org>
parents:
26020
diff
changeset
|
57 @@ -1,1 +1,1 @@ |
98976e3cae57
revpair: do not optimize tree to check for odd-range spec
Yuya Nishihara <yuya@tcha.org>
parents:
26020
diff
changeset
|
58 -third |
98976e3cae57
revpair: do not optimize tree to check for odd-range spec
Yuya Nishihara <yuya@tcha.org>
parents:
26020
diff
changeset
|
59 +wdir |
26020
cc3a30ff9490
revpair: restrict odd-range handling to top-level x:y expression (issue4774)
Yuya Nishihara <yuya@tcha.org>
parents:
26019
diff
changeset
|
60 $ hg diff -r 2::2 --nodates |
cc3a30ff9490
revpair: restrict odd-range handling to top-level x:y expression (issue4774)
Yuya Nishihara <yuya@tcha.org>
parents:
26019
diff
changeset
|
61 diff -r bf5ff72eb7e0 file.txt |
cc3a30ff9490
revpair: restrict odd-range handling to top-level x:y expression (issue4774)
Yuya Nishihara <yuya@tcha.org>
parents:
26019
diff
changeset
|
62 --- a/file.txt |
cc3a30ff9490
revpair: restrict odd-range handling to top-level x:y expression (issue4774)
Yuya Nishihara <yuya@tcha.org>
parents:
26019
diff
changeset
|
63 +++ b/file.txt |
cc3a30ff9490
revpair: restrict odd-range handling to top-level x:y expression (issue4774)
Yuya Nishihara <yuya@tcha.org>
parents:
26019
diff
changeset
|
64 @@ -1,1 +1,1 @@ |
cc3a30ff9490
revpair: restrict odd-range handling to top-level x:y expression (issue4774)
Yuya Nishihara <yuya@tcha.org>
parents:
26019
diff
changeset
|
65 -third |
cc3a30ff9490
revpair: restrict odd-range handling to top-level x:y expression (issue4774)
Yuya Nishihara <yuya@tcha.org>
parents:
26019
diff
changeset
|
66 +wdir |
16790
2a0efa1112ac
revpair: handle odd ranges (issue3474)
Matt Mackall <mpm@selenic.com>
parents:
16487
diff
changeset
|
67 $ hg diff -r "2 and 1" |
2a0efa1112ac
revpair: handle odd ranges (issue3474)
Matt Mackall <mpm@selenic.com>
parents:
16487
diff
changeset
|
68 abort: empty revision range |
2a0efa1112ac
revpair: handle odd ranges (issue3474)
Matt Mackall <mpm@selenic.com>
parents:
16487
diff
changeset
|
69 [255] |
7628
9c6ae2e09e11
diff: add --change option to display single changeset diff (issue1420)
Stepan Koltsov <yozh@mx1.ru>
parents:
diff
changeset
|
70 |
26019
85f5352c7ca7
revpair: update test to make a difference if odd range not handled specially
Yuya Nishihara <yuya@tcha.org>
parents:
16913
diff
changeset
|
71 $ cd .. |
85f5352c7ca7
revpair: update test to make a difference if odd range not handled specially
Yuya Nishihara <yuya@tcha.org>
parents:
16913
diff
changeset
|
72 |
26020
cc3a30ff9490
revpair: restrict odd-range handling to top-level x:y expression (issue4774)
Yuya Nishihara <yuya@tcha.org>
parents:
26019
diff
changeset
|
73 $ hg clone -qr0 a dumbspec-rev0 |
cc3a30ff9490
revpair: restrict odd-range handling to top-level x:y expression (issue4774)
Yuya Nishihara <yuya@tcha.org>
parents:
26019
diff
changeset
|
74 $ cd dumbspec-rev0 |
cc3a30ff9490
revpair: restrict odd-range handling to top-level x:y expression (issue4774)
Yuya Nishihara <yuya@tcha.org>
parents:
26019
diff
changeset
|
75 $ echo "wdir" > file.txt |
cc3a30ff9490
revpair: restrict odd-range handling to top-level x:y expression (issue4774)
Yuya Nishihara <yuya@tcha.org>
parents:
26019
diff
changeset
|
76 |
cc3a30ff9490
revpair: restrict odd-range handling to top-level x:y expression (issue4774)
Yuya Nishihara <yuya@tcha.org>
parents:
26019
diff
changeset
|
77 $ hg diff -r : |
cc3a30ff9490
revpair: restrict odd-range handling to top-level x:y expression (issue4774)
Yuya Nishihara <yuya@tcha.org>
parents:
26019
diff
changeset
|
78 $ hg diff -r 'first(:)' --nodates |
cc3a30ff9490
revpair: restrict odd-range handling to top-level x:y expression (issue4774)
Yuya Nishihara <yuya@tcha.org>
parents:
26019
diff
changeset
|
79 diff -r 4bb65dda5db4 file.txt |
cc3a30ff9490
revpair: restrict odd-range handling to top-level x:y expression (issue4774)
Yuya Nishihara <yuya@tcha.org>
parents:
26019
diff
changeset
|
80 --- a/file.txt |
cc3a30ff9490
revpair: restrict odd-range handling to top-level x:y expression (issue4774)
Yuya Nishihara <yuya@tcha.org>
parents:
26019
diff
changeset
|
81 +++ b/file.txt |
cc3a30ff9490
revpair: restrict odd-range handling to top-level x:y expression (issue4774)
Yuya Nishihara <yuya@tcha.org>
parents:
26019
diff
changeset
|
82 @@ -1,1 +1,1 @@ |
cc3a30ff9490
revpair: restrict odd-range handling to top-level x:y expression (issue4774)
Yuya Nishihara <yuya@tcha.org>
parents:
26019
diff
changeset
|
83 -first |
cc3a30ff9490
revpair: restrict odd-range handling to top-level x:y expression (issue4774)
Yuya Nishihara <yuya@tcha.org>
parents:
26019
diff
changeset
|
84 +wdir |
cc3a30ff9490
revpair: restrict odd-range handling to top-level x:y expression (issue4774)
Yuya Nishihara <yuya@tcha.org>
parents:
26019
diff
changeset
|
85 |
cc3a30ff9490
revpair: restrict odd-range handling to top-level x:y expression (issue4774)
Yuya Nishihara <yuya@tcha.org>
parents:
26019
diff
changeset
|
86 $ cd .. |
cc3a30ff9490
revpair: restrict odd-range handling to top-level x:y expression (issue4774)
Yuya Nishihara <yuya@tcha.org>
parents:
26019
diff
changeset
|
87 |
12136
30b5e83004e0
tests: unify test-diff-change
Adrian Buehlmann <adrian@cadifra.com>
parents:
7680
diff
changeset
|
88 Testing diff --change when merge: |
7628
9c6ae2e09e11
diff: add --change option to display single changeset diff (issue1420)
Stepan Koltsov <yozh@mx1.ru>
parents:
diff
changeset
|
89 |
26019
85f5352c7ca7
revpair: update test to make a difference if odd range not handled specially
Yuya Nishihara <yuya@tcha.org>
parents:
16913
diff
changeset
|
90 $ cd a |
85f5352c7ca7
revpair: update test to make a difference if odd range not handled specially
Yuya Nishihara <yuya@tcha.org>
parents:
16913
diff
changeset
|
91 |
12136
30b5e83004e0
tests: unify test-diff-change
Adrian Buehlmann <adrian@cadifra.com>
parents:
7680
diff
changeset
|
92 $ for i in 1 2 3 4 5 6 7 8 9 10; do |
16487
4fe874697a4d
tests: fix incorrect markup of continued lines of sh commands
Mads Kiilerich <mads@kiilerich.com>
parents:
12136
diff
changeset
|
93 > echo $i >> file.txt |
4fe874697a4d
tests: fix incorrect markup of continued lines of sh commands
Mads Kiilerich <mads@kiilerich.com>
parents:
12136
diff
changeset
|
94 > done |
12136
30b5e83004e0
tests: unify test-diff-change
Adrian Buehlmann <adrian@cadifra.com>
parents:
7680
diff
changeset
|
95 $ hg commit -m "lots of text" # 3 |
30b5e83004e0
tests: unify test-diff-change
Adrian Buehlmann <adrian@cadifra.com>
parents:
7680
diff
changeset
|
96 |
30b5e83004e0
tests: unify test-diff-change
Adrian Buehlmann <adrian@cadifra.com>
parents:
7680
diff
changeset
|
97 $ sed -e 's,^2$,x,' file.txt > file.txt.tmp |
30b5e83004e0
tests: unify test-diff-change
Adrian Buehlmann <adrian@cadifra.com>
parents:
7680
diff
changeset
|
98 $ mv file.txt.tmp file.txt |
30b5e83004e0
tests: unify test-diff-change
Adrian Buehlmann <adrian@cadifra.com>
parents:
7680
diff
changeset
|
99 $ hg commit -m "change 2 to x" # 4 |
7628
9c6ae2e09e11
diff: add --change option to display single changeset diff (issue1420)
Stepan Koltsov <yozh@mx1.ru>
parents:
diff
changeset
|
100 |
12136
30b5e83004e0
tests: unify test-diff-change
Adrian Buehlmann <adrian@cadifra.com>
parents:
7680
diff
changeset
|
101 $ hg up -r 3 |
30b5e83004e0
tests: unify test-diff-change
Adrian Buehlmann <adrian@cadifra.com>
parents:
7680
diff
changeset
|
102 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
30b5e83004e0
tests: unify test-diff-change
Adrian Buehlmann <adrian@cadifra.com>
parents:
7680
diff
changeset
|
103 $ sed -e 's,^8$,y,' file.txt > file.txt.tmp |
30b5e83004e0
tests: unify test-diff-change
Adrian Buehlmann <adrian@cadifra.com>
parents:
7680
diff
changeset
|
104 $ mv file.txt.tmp file.txt |
30b5e83004e0
tests: unify test-diff-change
Adrian Buehlmann <adrian@cadifra.com>
parents:
7680
diff
changeset
|
105 $ hg commit -m "change 8 to y" |
30b5e83004e0
tests: unify test-diff-change
Adrian Buehlmann <adrian@cadifra.com>
parents:
7680
diff
changeset
|
106 created new head |
7628
9c6ae2e09e11
diff: add --change option to display single changeset diff (issue1420)
Stepan Koltsov <yozh@mx1.ru>
parents:
diff
changeset
|
107 |
12136
30b5e83004e0
tests: unify test-diff-change
Adrian Buehlmann <adrian@cadifra.com>
parents:
7680
diff
changeset
|
108 $ hg up -C -r 4 |
30b5e83004e0
tests: unify test-diff-change
Adrian Buehlmann <adrian@cadifra.com>
parents:
7680
diff
changeset
|
109 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
30b5e83004e0
tests: unify test-diff-change
Adrian Buehlmann <adrian@cadifra.com>
parents:
7680
diff
changeset
|
110 $ hg merge -r 5 |
30b5e83004e0
tests: unify test-diff-change
Adrian Buehlmann <adrian@cadifra.com>
parents:
7680
diff
changeset
|
111 merging file.txt |
30b5e83004e0
tests: unify test-diff-change
Adrian Buehlmann <adrian@cadifra.com>
parents:
7680
diff
changeset
|
112 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
30b5e83004e0
tests: unify test-diff-change
Adrian Buehlmann <adrian@cadifra.com>
parents:
7680
diff
changeset
|
113 (branch merge, don't forget to commit) |
30b5e83004e0
tests: unify test-diff-change
Adrian Buehlmann <adrian@cadifra.com>
parents:
7680
diff
changeset
|
114 $ hg commit -m "merge 8 to y" # 6 |
7628
9c6ae2e09e11
diff: add --change option to display single changeset diff (issue1420)
Stepan Koltsov <yozh@mx1.ru>
parents:
diff
changeset
|
115 |
12136
30b5e83004e0
tests: unify test-diff-change
Adrian Buehlmann <adrian@cadifra.com>
parents:
7680
diff
changeset
|
116 $ hg diff --change 5 |
30b5e83004e0
tests: unify test-diff-change
Adrian Buehlmann <adrian@cadifra.com>
parents:
7680
diff
changeset
|
117 diff -r ae119d680c82 -r 9085c5c02e52 file.txt |
30b5e83004e0
tests: unify test-diff-change
Adrian Buehlmann <adrian@cadifra.com>
parents:
7680
diff
changeset
|
118 --- a/file.txt Thu Jan 01 00:00:00 1970 +0000 |
30b5e83004e0
tests: unify test-diff-change
Adrian Buehlmann <adrian@cadifra.com>
parents:
7680
diff
changeset
|
119 +++ b/file.txt Thu Jan 01 00:00:00 1970 +0000 |
30b5e83004e0
tests: unify test-diff-change
Adrian Buehlmann <adrian@cadifra.com>
parents:
7680
diff
changeset
|
120 @@ -6,6 +6,6 @@ |
30b5e83004e0
tests: unify test-diff-change
Adrian Buehlmann <adrian@cadifra.com>
parents:
7680
diff
changeset
|
121 5 |
30b5e83004e0
tests: unify test-diff-change
Adrian Buehlmann <adrian@cadifra.com>
parents:
7680
diff
changeset
|
122 6 |
30b5e83004e0
tests: unify test-diff-change
Adrian Buehlmann <adrian@cadifra.com>
parents:
7680
diff
changeset
|
123 7 |
30b5e83004e0
tests: unify test-diff-change
Adrian Buehlmann <adrian@cadifra.com>
parents:
7680
diff
changeset
|
124 -8 |
30b5e83004e0
tests: unify test-diff-change
Adrian Buehlmann <adrian@cadifra.com>
parents:
7680
diff
changeset
|
125 +y |
30b5e83004e0
tests: unify test-diff-change
Adrian Buehlmann <adrian@cadifra.com>
parents:
7680
diff
changeset
|
126 9 |
30b5e83004e0
tests: unify test-diff-change
Adrian Buehlmann <adrian@cadifra.com>
parents:
7680
diff
changeset
|
127 10 |
7628
9c6ae2e09e11
diff: add --change option to display single changeset diff (issue1420)
Stepan Koltsov <yozh@mx1.ru>
parents:
diff
changeset
|
128 |
12136
30b5e83004e0
tests: unify test-diff-change
Adrian Buehlmann <adrian@cadifra.com>
parents:
7680
diff
changeset
|
129 must be similar to 'hg diff --change 5': |
7628
9c6ae2e09e11
diff: add --change option to display single changeset diff (issue1420)
Stepan Koltsov <yozh@mx1.ru>
parents:
diff
changeset
|
130 |
12136
30b5e83004e0
tests: unify test-diff-change
Adrian Buehlmann <adrian@cadifra.com>
parents:
7680
diff
changeset
|
131 $ hg diff -c 6 |
30b5e83004e0
tests: unify test-diff-change
Adrian Buehlmann <adrian@cadifra.com>
parents:
7680
diff
changeset
|
132 diff -r 273b50f17c6d -r 979ca961fd2e file.txt |
30b5e83004e0
tests: unify test-diff-change
Adrian Buehlmann <adrian@cadifra.com>
parents:
7680
diff
changeset
|
133 --- a/file.txt Thu Jan 01 00:00:00 1970 +0000 |
30b5e83004e0
tests: unify test-diff-change
Adrian Buehlmann <adrian@cadifra.com>
parents:
7680
diff
changeset
|
134 +++ b/file.txt Thu Jan 01 00:00:00 1970 +0000 |
30b5e83004e0
tests: unify test-diff-change
Adrian Buehlmann <adrian@cadifra.com>
parents:
7680
diff
changeset
|
135 @@ -6,6 +6,6 @@ |
30b5e83004e0
tests: unify test-diff-change
Adrian Buehlmann <adrian@cadifra.com>
parents:
7680
diff
changeset
|
136 5 |
30b5e83004e0
tests: unify test-diff-change
Adrian Buehlmann <adrian@cadifra.com>
parents:
7680
diff
changeset
|
137 6 |
30b5e83004e0
tests: unify test-diff-change
Adrian Buehlmann <adrian@cadifra.com>
parents:
7680
diff
changeset
|
138 7 |
30b5e83004e0
tests: unify test-diff-change
Adrian Buehlmann <adrian@cadifra.com>
parents:
7680
diff
changeset
|
139 -8 |
30b5e83004e0
tests: unify test-diff-change
Adrian Buehlmann <adrian@cadifra.com>
parents:
7680
diff
changeset
|
140 +y |
30b5e83004e0
tests: unify test-diff-change
Adrian Buehlmann <adrian@cadifra.com>
parents:
7680
diff
changeset
|
141 9 |
30b5e83004e0
tests: unify test-diff-change
Adrian Buehlmann <adrian@cadifra.com>
parents:
7680
diff
changeset
|
142 10 |
7628
9c6ae2e09e11
diff: add --change option to display single changeset diff (issue1420)
Stepan Koltsov <yozh@mx1.ru>
parents:
diff
changeset
|
143 |
16913
f2719b387380
tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents:
16790
diff
changeset
|
144 $ cd .. |