Show More
@@ -1,127 +1,127 b'' | |||||
1 | #!/usr/bin/env python |
|
1 | #!/usr/bin/env python | |
2 |
|
2 | |||
3 | from __future__ import absolute_import |
|
3 | from __future__ import absolute_import | |
4 | import errno |
|
4 | import errno | |
5 | import os |
|
5 | import os | |
6 | import signal |
|
6 | import signal | |
7 | import sys |
|
7 | import sys | |
8 | import time |
|
8 | import time | |
9 |
|
9 | |||
10 | if os.name =='nt': |
|
10 | if os.name =='nt': | |
11 | import ctypes |
|
11 | import ctypes | |
12 |
|
12 | |||
13 | _BOOL = ctypes.c_long |
|
13 | _BOOL = ctypes.c_long | |
14 | _DWORD = ctypes.c_ulong |
|
14 | _DWORD = ctypes.c_ulong | |
15 | _UINT = ctypes.c_uint |
|
15 | _UINT = ctypes.c_uint | |
16 | _HANDLE = ctypes.c_void_p |
|
16 | _HANDLE = ctypes.c_void_p | |
17 |
|
17 | |||
18 | ctypes.windll.kernel32.CloseHandle.argtypes = [_HANDLE] |
|
18 | ctypes.windll.kernel32.CloseHandle.argtypes = [_HANDLE] | |
19 | ctypes.windll.kernel32.CloseHandle.restype = _BOOL |
|
19 | ctypes.windll.kernel32.CloseHandle.restype = _BOOL | |
20 |
|
20 | |||
21 | ctypes.windll.kernel32.GetLastError.argtypes = [] |
|
21 | ctypes.windll.kernel32.GetLastError.argtypes = [] | |
22 | ctypes.windll.kernel32.GetLastError.restype = _DWORD |
|
22 | ctypes.windll.kernel32.GetLastError.restype = _DWORD | |
23 |
|
23 | |||
24 | ctypes.windll.kernel32.OpenProcess.argtypes = [_DWORD, _BOOL, _DWORD] |
|
24 | ctypes.windll.kernel32.OpenProcess.argtypes = [_DWORD, _BOOL, _DWORD] | |
25 | ctypes.windll.kernel32.OpenProcess.restype = _HANDLE |
|
25 | ctypes.windll.kernel32.OpenProcess.restype = _HANDLE | |
26 |
|
26 | |||
27 | ctypes.windll.kernel32.TerminateProcess.argtypes = [_HANDLE, _UINT] |
|
27 | ctypes.windll.kernel32.TerminateProcess.argtypes = [_HANDLE, _UINT] | |
28 | ctypes.windll.kernel32.TerminateProcess.restype = _BOOL |
|
28 | ctypes.windll.kernel32.TerminateProcess.restype = _BOOL | |
29 |
|
29 | |||
30 | ctypes.windll.kernel32.WaitForSingleObject.argtypes = [_HANDLE, _DWORD] |
|
30 | ctypes.windll.kernel32.WaitForSingleObject.argtypes = [_HANDLE, _DWORD] | |
31 | ctypes.windll.kernel32.WaitForSingleObject.restype = _DWORD |
|
31 | ctypes.windll.kernel32.WaitForSingleObject.restype = _DWORD | |
32 |
|
32 | |||
33 | def _check(ret, expectederr=None): |
|
33 | def _check(ret, expectederr=None): | |
34 | if ret == 0: |
|
34 | if ret == 0: | |
35 | winerrno = ctypes.GetLastError() |
|
35 | winerrno = ctypes.GetLastError() | |
36 | if winerrno == expectederr: |
|
36 | if winerrno == expectederr: | |
37 | return True |
|
37 | return True | |
38 | raise ctypes.WinError(winerrno) |
|
38 | raise ctypes.WinError(winerrno) | |
39 |
|
39 | |||
40 | def kill(pid, logfn, tryhard=True): |
|
40 | def kill(pid, logfn, tryhard=True): | |
41 | logfn('# Killing daemon process %d' % pid) |
|
41 | logfn('# Killing daemon process %d' % pid) | |
42 | PROCESS_TERMINATE = 1 |
|
42 | PROCESS_TERMINATE = 1 | |
43 | PROCESS_QUERY_INFORMATION = 0x400 |
|
43 | PROCESS_QUERY_INFORMATION = 0x400 | |
44 | SYNCHRONIZE = 0x00100000 |
|
44 | SYNCHRONIZE = 0x00100000 | |
45 | WAIT_OBJECT_0 = 0 |
|
45 | WAIT_OBJECT_0 = 0 | |
46 | WAIT_TIMEOUT = 258 |
|
46 | WAIT_TIMEOUT = 258 | |
47 | WAIT_FAILED = _DWORD(0xFFFFFFFF).value |
|
47 | WAIT_FAILED = _DWORD(0xFFFFFFFF).value | |
48 | handle = ctypes.windll.kernel32.OpenProcess( |
|
48 | handle = ctypes.windll.kernel32.OpenProcess( | |
49 | PROCESS_TERMINATE|SYNCHRONIZE|PROCESS_QUERY_INFORMATION, |
|
49 | PROCESS_TERMINATE|SYNCHRONIZE|PROCESS_QUERY_INFORMATION, | |
50 | False, pid) |
|
50 | False, pid) | |
51 | if handle is None: |
|
51 | if handle is None: | |
52 | _check(0, 87) # err 87 when process not found |
|
52 | _check(0, 87) # err 87 when process not found | |
53 | return # process not found, already finished |
|
53 | return # process not found, already finished | |
54 | try: |
|
54 | try: | |
55 | r = ctypes.windll.kernel32.WaitForSingleObject(handle, 100) |
|
55 | r = ctypes.windll.kernel32.WaitForSingleObject(handle, 100) | |
56 | if r == WAIT_OBJECT_0: |
|
56 | if r == WAIT_OBJECT_0: | |
57 | pass # terminated, but process handle still available |
|
57 | pass # terminated, but process handle still available | |
58 | elif r == WAIT_TIMEOUT: |
|
58 | elif r == WAIT_TIMEOUT: | |
59 | _check(ctypes.windll.kernel32.TerminateProcess(handle, -1)) |
|
59 | _check(ctypes.windll.kernel32.TerminateProcess(handle, -1)) | |
60 | elif r == WAIT_FAILED: |
|
60 | elif r == WAIT_FAILED: | |
61 | _check(0) # err stored in GetLastError() |
|
61 | _check(0) # err stored in GetLastError() | |
62 |
|
62 | |||
63 | # TODO?: forcefully kill when timeout |
|
63 | # TODO?: forcefully kill when timeout | |
64 | # and ?shorter waiting time? when tryhard==True |
|
64 | # and ?shorter waiting time? when tryhard==True | |
65 | r = ctypes.windll.kernel32.WaitForSingleObject(handle, 100) |
|
65 | r = ctypes.windll.kernel32.WaitForSingleObject(handle, 100) | |
66 | # timeout = 100 ms |
|
66 | # timeout = 100 ms | |
67 | if r == WAIT_OBJECT_0: |
|
67 | if r == WAIT_OBJECT_0: | |
68 | pass # process is terminated |
|
68 | pass # process is terminated | |
69 | elif r == WAIT_TIMEOUT: |
|
69 | elif r == WAIT_TIMEOUT: | |
70 | logfn('# Daemon process %d is stuck') |
|
70 | logfn('# Daemon process %d is stuck') | |
71 | elif r == WAIT_FAILED: |
|
71 | elif r == WAIT_FAILED: | |
72 | _check(0) # err stored in GetLastError() |
|
72 | _check(0) # err stored in GetLastError() | |
73 | except: #re-raises |
|
73 | except: #re-raises | |
74 | ctypes.windll.kernel32.CloseHandle(handle) # no _check, keep error |
|
74 | ctypes.windll.kernel32.CloseHandle(handle) # no _check, keep error | |
75 | raise |
|
75 | raise | |
76 | _check(ctypes.windll.kernel32.CloseHandle(handle)) |
|
76 | _check(ctypes.windll.kernel32.CloseHandle(handle)) | |
77 |
|
77 | |||
78 | else: |
|
78 | else: | |
79 | def kill(pid, logfn, tryhard=True): |
|
79 | def kill(pid, logfn, tryhard=True): | |
80 | try: |
|
80 | try: | |
81 | os.kill(pid, 0) |
|
81 | os.kill(pid, 0) | |
82 | logfn('# Killing daemon process %d' % pid) |
|
82 | logfn('# Killing daemon process %d' % pid) | |
83 | os.kill(pid, signal.SIGTERM) |
|
83 | os.kill(pid, signal.SIGTERM) | |
84 | if tryhard: |
|
84 | if tryhard: | |
85 | for i in range(10): |
|
85 | for i in range(10): | |
86 | time.sleep(0.05) |
|
86 | time.sleep(0.05) | |
87 | os.kill(pid, 0) |
|
87 | os.kill(pid, 0) | |
88 | else: |
|
88 | else: | |
89 | time.sleep(0.1) |
|
89 | time.sleep(0.1) | |
90 | os.kill(pid, 0) |
|
90 | os.kill(pid, 0) | |
91 | logfn('# Daemon process %d is stuck - really killing it' % pid) |
|
91 | logfn('# Daemon process %d is stuck - really killing it' % pid) | |
92 | os.kill(pid, signal.SIGKILL) |
|
92 | os.kill(pid, signal.SIGKILL) | |
93 | except OSError as err: |
|
93 | except OSError as err: | |
94 | if err.errno != errno.ESRCH: |
|
94 | if err.errno != errno.ESRCH: | |
95 | raise |
|
95 | raise | |
96 |
|
96 | |||
97 | def killdaemons(pidfile, tryhard=True, remove=False, logfn=None): |
|
97 | def killdaemons(pidfile, tryhard=True, remove=False, logfn=None): | |
98 | if not logfn: |
|
98 | if not logfn: | |
99 | logfn = lambda s: s |
|
99 | logfn = lambda s: s | |
100 | # Kill off any leftover daemon processes |
|
100 | # Kill off any leftover daemon processes | |
101 | try: |
|
101 | try: | |
102 | pids = [] |
|
102 | pids = [] | |
103 | with open(pidfile) as fp: |
|
103 | with open(pidfile) as fp: | |
104 | for line in fp: |
|
104 | for line in fp: | |
105 | try: |
|
105 | try: | |
106 | pid = int(line) |
|
106 | pid = int(line) | |
107 | if pid <= 0: |
|
107 | if pid <= 0: | |
108 | raise ValueError |
|
108 | raise ValueError | |
109 | except ValueError: |
|
109 | except ValueError: | |
110 | logfn('# Not killing daemon process %s - invalid pid' |
|
110 | logfn('# Not killing daemon process %s - invalid pid' | |
111 | % line.rstrip()) |
|
111 | % line.rstrip()) | |
112 | continue |
|
112 | continue | |
113 | pids.append(pid) |
|
113 | pids.append(pid) | |
114 | for pid in pids: |
|
114 | for pid in pids: | |
115 | kill(pid, logfn, tryhard) |
|
115 | kill(pid, logfn, tryhard) | |
116 | if remove: |
|
116 | if remove: | |
117 | os.unlink(pidfile) |
|
117 | os.unlink(pidfile) | |
118 | except IOError: |
|
118 | except IOError: | |
119 | pass |
|
119 | pass | |
120 |
|
120 | |||
121 | if __name__ == '__main__': |
|
121 | if __name__ == '__main__': | |
122 | if len(sys.argv) > 1: |
|
122 | if len(sys.argv) > 1: | |
123 | path, = sys.argv[1:] |
|
123 | path, = sys.argv[1:] | |
124 | else: |
|
124 | else: | |
125 | path = os.environ["DAEMON_PIDS"] |
|
125 | path = os.environ["DAEMON_PIDS"] | |
126 |
|
126 | |||
127 | killdaemons(path) |
|
127 | killdaemons(path, remove=True) |
@@ -1,942 +1,941 b'' | |||||
1 | #require no-reposimplestore |
|
1 | #require no-reposimplestore | |
2 | #testcases git-server hg-server |
|
2 | #testcases git-server hg-server | |
3 |
|
3 | |||
4 | #if git-server |
|
4 | #if git-server | |
5 | #require lfs-test-server |
|
5 | #require lfs-test-server | |
6 | #else |
|
6 | #else | |
7 | #require serve |
|
7 | #require serve | |
8 | #endif |
|
8 | #endif | |
9 |
|
9 | |||
10 | #if git-server |
|
10 | #if git-server | |
11 | $ LFS_LISTEN="tcp://:$HGPORT" |
|
11 | $ LFS_LISTEN="tcp://:$HGPORT" | |
12 | $ LFS_HOST="localhost:$HGPORT" |
|
12 | $ LFS_HOST="localhost:$HGPORT" | |
13 | $ LFS_PUBLIC=1 |
|
13 | $ LFS_PUBLIC=1 | |
14 | $ export LFS_LISTEN LFS_HOST LFS_PUBLIC |
|
14 | $ export LFS_LISTEN LFS_HOST LFS_PUBLIC | |
15 | #else |
|
15 | #else | |
16 | $ LFS_HOST="localhost:$HGPORT/.git/info/lfs" |
|
16 | $ LFS_HOST="localhost:$HGPORT/.git/info/lfs" | |
17 | #endif |
|
17 | #endif | |
18 |
|
18 | |||
19 | #if no-windows git-server |
|
19 | #if no-windows git-server | |
20 | $ lfs-test-server &> lfs-server.log & |
|
20 | $ lfs-test-server &> lfs-server.log & | |
21 | $ echo $! >> $DAEMON_PIDS |
|
21 | $ echo $! >> $DAEMON_PIDS | |
22 | #endif |
|
22 | #endif | |
23 |
|
23 | |||
24 | #if windows git-server |
|
24 | #if windows git-server | |
25 | $ cat >> $TESTTMP/spawn.py <<EOF |
|
25 | $ cat >> $TESTTMP/spawn.py <<EOF | |
26 | > import os |
|
26 | > import os | |
27 | > import subprocess |
|
27 | > import subprocess | |
28 | > import sys |
|
28 | > import sys | |
29 | > |
|
29 | > | |
30 | > for path in os.environ["PATH"].split(os.pathsep): |
|
30 | > for path in os.environ["PATH"].split(os.pathsep): | |
31 | > exe = os.path.join(path, 'lfs-test-server.exe') |
|
31 | > exe = os.path.join(path, 'lfs-test-server.exe') | |
32 | > if os.path.exists(exe): |
|
32 | > if os.path.exists(exe): | |
33 | > with open('lfs-server.log', 'wb') as out: |
|
33 | > with open('lfs-server.log', 'wb') as out: | |
34 | > p = subprocess.Popen(exe, stdout=out, stderr=out) |
|
34 | > p = subprocess.Popen(exe, stdout=out, stderr=out) | |
35 | > sys.stdout.write('%s\n' % p.pid) |
|
35 | > sys.stdout.write('%s\n' % p.pid) | |
36 | > sys.exit(0) |
|
36 | > sys.exit(0) | |
37 | > sys.exit(1) |
|
37 | > sys.exit(1) | |
38 | > EOF |
|
38 | > EOF | |
39 | $ $PYTHON $TESTTMP/spawn.py >> $DAEMON_PIDS |
|
39 | $ $PYTHON $TESTTMP/spawn.py >> $DAEMON_PIDS | |
40 | #endif |
|
40 | #endif | |
41 |
|
41 | |||
42 | $ cat >> $HGRCPATH <<EOF |
|
42 | $ cat >> $HGRCPATH <<EOF | |
43 | > [extensions] |
|
43 | > [extensions] | |
44 | > lfs= |
|
44 | > lfs= | |
45 | > [lfs] |
|
45 | > [lfs] | |
46 | > url=http://foo:bar@$LFS_HOST |
|
46 | > url=http://foo:bar@$LFS_HOST | |
47 | > track=all() |
|
47 | > track=all() | |
48 | > [web] |
|
48 | > [web] | |
49 | > push_ssl = False |
|
49 | > push_ssl = False | |
50 | > allow-push = * |
|
50 | > allow-push = * | |
51 | > EOF |
|
51 | > EOF | |
52 |
|
52 | |||
53 | Use a separate usercache, otherwise the server sees what the client commits, and |
|
53 | Use a separate usercache, otherwise the server sees what the client commits, and | |
54 | never requests a transfer. |
|
54 | never requests a transfer. | |
55 |
|
55 | |||
56 | #if hg-server |
|
56 | #if hg-server | |
57 | $ hg init server |
|
57 | $ hg init server | |
58 | $ hg --config "lfs.usercache=$TESTTMP/servercache" -R server serve -d \ |
|
58 | $ hg --config "lfs.usercache=$TESTTMP/servercache" -R server serve -d \ | |
59 | > -p $HGPORT --pid-file=hg.pid -A $TESTTMP/access.log -E $TESTTMP/errors.log |
|
59 | > -p $HGPORT --pid-file=hg.pid -A $TESTTMP/access.log -E $TESTTMP/errors.log | |
60 | $ cat hg.pid >> $DAEMON_PIDS |
|
60 | $ cat hg.pid >> $DAEMON_PIDS | |
61 | #endif |
|
61 | #endif | |
62 |
|
62 | |||
63 | $ hg init repo1 |
|
63 | $ hg init repo1 | |
64 | $ cd repo1 |
|
64 | $ cd repo1 | |
65 | $ echo THIS-IS-LFS > a |
|
65 | $ echo THIS-IS-LFS > a | |
66 | $ hg commit -m a -A a |
|
66 | $ hg commit -m a -A a | |
67 |
|
67 | |||
68 | A push can be serviced directly from the usercache if it isn't in the local |
|
68 | A push can be serviced directly from the usercache if it isn't in the local | |
69 | store. |
|
69 | store. | |
70 |
|
70 | |||
71 | $ hg init ../repo2 |
|
71 | $ hg init ../repo2 | |
72 | $ mv .hg/store/lfs .hg/store/lfs_ |
|
72 | $ mv .hg/store/lfs .hg/store/lfs_ | |
73 | $ hg push ../repo2 --debug |
|
73 | $ hg push ../repo2 --debug | |
74 | http auth: user foo, password *** |
|
74 | http auth: user foo, password *** | |
75 | pushing to ../repo2 |
|
75 | pushing to ../repo2 | |
76 | http auth: user foo, password *** |
|
76 | http auth: user foo, password *** | |
77 | http auth: user foo, password *** |
|
77 | http auth: user foo, password *** | |
78 | query 1; heads |
|
78 | query 1; heads | |
79 | searching for changes |
|
79 | searching for changes | |
80 | 1 total queries in *s (glob) |
|
80 | 1 total queries in *s (glob) | |
81 | listing keys for "phases" |
|
81 | listing keys for "phases" | |
82 | checking for updated bookmarks |
|
82 | checking for updated bookmarks | |
83 | listing keys for "bookmarks" |
|
83 | listing keys for "bookmarks" | |
84 | lfs: computing set of blobs to upload |
|
84 | lfs: computing set of blobs to upload | |
85 | Status: 200 |
|
85 | Status: 200 | |
86 | Content-Length: 309 (git-server !) |
|
86 | Content-Length: 309 (git-server !) | |
87 | Content-Length: 350 (hg-server !) |
|
87 | Content-Length: 350 (hg-server !) | |
88 | Content-Type: application/vnd.git-lfs+json |
|
88 | Content-Type: application/vnd.git-lfs+json | |
89 | Date: $HTTP_DATE$ |
|
89 | Date: $HTTP_DATE$ | |
90 | Server: testing stub value (hg-server !) |
|
90 | Server: testing stub value (hg-server !) | |
91 | { |
|
91 | { | |
92 | "objects": [ |
|
92 | "objects": [ | |
93 | { |
|
93 | { | |
94 | "actions": { |
|
94 | "actions": { | |
95 | "upload": { |
|
95 | "upload": { | |
96 | "expires_at": "$ISO_8601_DATE_TIME$" |
|
96 | "expires_at": "$ISO_8601_DATE_TIME$" | |
97 | "header": { |
|
97 | "header": { | |
98 | "Accept": "application/vnd.git-lfs" |
|
98 | "Accept": "application/vnd.git-lfs" | |
99 | } |
|
99 | } | |
100 | "href": "http://localhost:$HGPORT/objects/31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b" (git-server !) |
|
100 | "href": "http://localhost:$HGPORT/objects/31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b" (git-server !) | |
101 | "href": "http://localhost:$HGPORT/.hg/lfs/objects/31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b" (hg-server !) |
|
101 | "href": "http://localhost:$HGPORT/.hg/lfs/objects/31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b" (hg-server !) | |
102 | } |
|
102 | } | |
103 | } |
|
103 | } | |
104 | "oid": "31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b" |
|
104 | "oid": "31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b" | |
105 | "size": 12 |
|
105 | "size": 12 | |
106 | } |
|
106 | } | |
107 | ] |
|
107 | ] | |
108 | "transfer": "basic" (hg-server !) |
|
108 | "transfer": "basic" (hg-server !) | |
109 | } |
|
109 | } | |
110 | lfs: uploading 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b (12 bytes) |
|
110 | lfs: uploading 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b (12 bytes) | |
111 | Status: 200 (git-server !) |
|
111 | Status: 200 (git-server !) | |
112 | Status: 201 (hg-server !) |
|
112 | Status: 201 (hg-server !) | |
113 | Content-Length: 0 |
|
113 | Content-Length: 0 | |
114 | Content-Type: text/plain; charset=utf-8 |
|
114 | Content-Type: text/plain; charset=utf-8 | |
115 | Date: $HTTP_DATE$ |
|
115 | Date: $HTTP_DATE$ | |
116 | Server: testing stub value (hg-server !) |
|
116 | Server: testing stub value (hg-server !) | |
117 | lfs: processed: 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b |
|
117 | lfs: processed: 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b | |
118 | lfs: uploaded 1 files (12 bytes) |
|
118 | lfs: uploaded 1 files (12 bytes) | |
119 | 1 changesets found |
|
119 | 1 changesets found | |
120 | list of changesets: |
|
120 | list of changesets: | |
121 | 99a7098854a3984a5c9eab0fc7a2906697b7cb5c |
|
121 | 99a7098854a3984a5c9eab0fc7a2906697b7cb5c | |
122 | bundle2-output-bundle: "HG20", 4 parts total |
|
122 | bundle2-output-bundle: "HG20", 4 parts total | |
123 | bundle2-output-part: "replycaps" * bytes payload (glob) |
|
123 | bundle2-output-part: "replycaps" * bytes payload (glob) | |
124 | bundle2-output-part: "check:heads" streamed payload |
|
124 | bundle2-output-part: "check:heads" streamed payload | |
125 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload |
|
125 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload | |
126 | bundle2-output-part: "phase-heads" 24 bytes payload |
|
126 | bundle2-output-part: "phase-heads" 24 bytes payload | |
127 | bundle2-input-bundle: with-transaction |
|
127 | bundle2-input-bundle: with-transaction | |
128 | bundle2-input-part: "replycaps" supported |
|
128 | bundle2-input-part: "replycaps" supported | |
129 | bundle2-input-part: total payload size * (glob) |
|
129 | bundle2-input-part: total payload size * (glob) | |
130 | bundle2-input-part: "check:heads" supported |
|
130 | bundle2-input-part: "check:heads" supported | |
131 | bundle2-input-part: total payload size 20 |
|
131 | bundle2-input-part: total payload size 20 | |
132 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported |
|
132 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported | |
133 | adding changesets |
|
133 | adding changesets | |
134 | add changeset 99a7098854a3 |
|
134 | add changeset 99a7098854a3 | |
135 | adding manifests |
|
135 | adding manifests | |
136 | adding file changes |
|
136 | adding file changes | |
137 | adding a revisions |
|
137 | adding a revisions | |
138 | added 1 changesets with 1 changes to 1 files |
|
138 | added 1 changesets with 1 changes to 1 files | |
139 | calling hook pretxnchangegroup.lfs: hgext.lfs.checkrequireslfs |
|
139 | calling hook pretxnchangegroup.lfs: hgext.lfs.checkrequireslfs | |
140 | bundle2-input-part: total payload size 617 |
|
140 | bundle2-input-part: total payload size 617 | |
141 | bundle2-input-part: "phase-heads" supported |
|
141 | bundle2-input-part: "phase-heads" supported | |
142 | bundle2-input-part: total payload size 24 |
|
142 | bundle2-input-part: total payload size 24 | |
143 | bundle2-input-bundle: 3 parts total |
|
143 | bundle2-input-bundle: 3 parts total | |
144 | updating the branch cache |
|
144 | updating the branch cache | |
145 | bundle2-output-bundle: "HG20", 1 parts total |
|
145 | bundle2-output-bundle: "HG20", 1 parts total | |
146 | bundle2-output-part: "reply:changegroup" (advisory) (params: 0 advisory) empty payload |
|
146 | bundle2-output-part: "reply:changegroup" (advisory) (params: 0 advisory) empty payload | |
147 | bundle2-input-bundle: no-transaction |
|
147 | bundle2-input-bundle: no-transaction | |
148 | bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported |
|
148 | bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported | |
149 | bundle2-input-bundle: 0 parts total |
|
149 | bundle2-input-bundle: 0 parts total | |
150 | listing keys for "phases" |
|
150 | listing keys for "phases" | |
151 | $ mv .hg/store/lfs_ .hg/store/lfs |
|
151 | $ mv .hg/store/lfs_ .hg/store/lfs | |
152 |
|
152 | |||
153 | Clear the cache to force a download |
|
153 | Clear the cache to force a download | |
154 | $ rm -rf `hg config lfs.usercache` |
|
154 | $ rm -rf `hg config lfs.usercache` | |
155 | $ cd ../repo2 |
|
155 | $ cd ../repo2 | |
156 | $ hg update tip --debug |
|
156 | $ hg update tip --debug | |
157 | http auth: user foo, password *** |
|
157 | http auth: user foo, password *** | |
158 | resolving manifests |
|
158 | resolving manifests | |
159 | branchmerge: False, force: False, partial: False |
|
159 | branchmerge: False, force: False, partial: False | |
160 | ancestor: 000000000000, local: 000000000000+, remote: 99a7098854a3 |
|
160 | ancestor: 000000000000, local: 000000000000+, remote: 99a7098854a3 | |
161 | http auth: user foo, password *** |
|
161 | http auth: user foo, password *** | |
162 | Status: 200 |
|
162 | Status: 200 | |
163 | Content-Length: 311 (git-server !) |
|
163 | Content-Length: 311 (git-server !) | |
164 | Content-Length: 352 (hg-server !) |
|
164 | Content-Length: 352 (hg-server !) | |
165 | Content-Type: application/vnd.git-lfs+json |
|
165 | Content-Type: application/vnd.git-lfs+json | |
166 | Date: $HTTP_DATE$ |
|
166 | Date: $HTTP_DATE$ | |
167 | Server: testing stub value (hg-server !) |
|
167 | Server: testing stub value (hg-server !) | |
168 | { |
|
168 | { | |
169 | "objects": [ |
|
169 | "objects": [ | |
170 | { |
|
170 | { | |
171 | "actions": { |
|
171 | "actions": { | |
172 | "download": { |
|
172 | "download": { | |
173 | "expires_at": "$ISO_8601_DATE_TIME$" |
|
173 | "expires_at": "$ISO_8601_DATE_TIME$" | |
174 | "header": { |
|
174 | "header": { | |
175 | "Accept": "application/vnd.git-lfs" |
|
175 | "Accept": "application/vnd.git-lfs" | |
176 | } |
|
176 | } | |
177 | "href": "http://localhost:$HGPORT/*/31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b" (glob) |
|
177 | "href": "http://localhost:$HGPORT/*/31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b" (glob) | |
178 | } |
|
178 | } | |
179 | } |
|
179 | } | |
180 | "oid": "31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b" |
|
180 | "oid": "31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b" | |
181 | "size": 12 |
|
181 | "size": 12 | |
182 | } |
|
182 | } | |
183 | ] |
|
183 | ] | |
184 | "transfer": "basic" (hg-server !) |
|
184 | "transfer": "basic" (hg-server !) | |
185 | } |
|
185 | } | |
186 | lfs: downloading 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b (12 bytes) |
|
186 | lfs: downloading 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b (12 bytes) | |
187 | Status: 200 |
|
187 | Status: 200 | |
188 | Content-Length: 12 |
|
188 | Content-Length: 12 | |
189 | Content-Type: text/plain; charset=utf-8 (git-server !) |
|
189 | Content-Type: text/plain; charset=utf-8 (git-server !) | |
190 | Content-Type: application/octet-stream (hg-server !) |
|
190 | Content-Type: application/octet-stream (hg-server !) | |
191 | Date: $HTTP_DATE$ |
|
191 | Date: $HTTP_DATE$ | |
192 | Server: testing stub value (hg-server !) |
|
192 | Server: testing stub value (hg-server !) | |
193 | lfs: adding 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b to the usercache |
|
193 | lfs: adding 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b to the usercache | |
194 | lfs: processed: 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b |
|
194 | lfs: processed: 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b | |
195 | lfs: downloaded 1 files (12 bytes) |
|
195 | lfs: downloaded 1 files (12 bytes) | |
196 | a: remote created -> g |
|
196 | a: remote created -> g | |
197 | getting a |
|
197 | getting a | |
198 | lfs: found 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b in the local lfs store |
|
198 | lfs: found 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b in the local lfs store | |
199 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
199 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
200 |
|
200 | |||
201 | When the server has some blobs already. `hg serve` doesn't offer to upload |
|
201 | When the server has some blobs already. `hg serve` doesn't offer to upload | |
202 | blobs that it already knows about. Note that lfs-test-server is simply |
|
202 | blobs that it already knows about. Note that lfs-test-server is simply | |
203 | toggling the action to 'download'. The Batch API spec says it should omit the |
|
203 | toggling the action to 'download'. The Batch API spec says it should omit the | |
204 | actions property completely. |
|
204 | actions property completely. | |
205 |
|
205 | |||
206 | $ hg mv a b |
|
206 | $ hg mv a b | |
207 | $ echo ANOTHER-LARGE-FILE > c |
|
207 | $ echo ANOTHER-LARGE-FILE > c | |
208 | $ echo ANOTHER-LARGE-FILE2 > d |
|
208 | $ echo ANOTHER-LARGE-FILE2 > d | |
209 | $ hg commit -m b-and-c -A b c d |
|
209 | $ hg commit -m b-and-c -A b c d | |
210 | $ hg push ../repo1 --debug |
|
210 | $ hg push ../repo1 --debug | |
211 | http auth: user foo, password *** |
|
211 | http auth: user foo, password *** | |
212 | pushing to ../repo1 |
|
212 | pushing to ../repo1 | |
213 | http auth: user foo, password *** |
|
213 | http auth: user foo, password *** | |
214 | http auth: user foo, password *** |
|
214 | http auth: user foo, password *** | |
215 | query 1; heads |
|
215 | query 1; heads | |
216 | searching for changes |
|
216 | searching for changes | |
217 | all remote heads known locally |
|
217 | all remote heads known locally | |
218 | listing keys for "phases" |
|
218 | listing keys for "phases" | |
219 | checking for updated bookmarks |
|
219 | checking for updated bookmarks | |
220 | listing keys for "bookmarks" |
|
220 | listing keys for "bookmarks" | |
221 | listing keys for "bookmarks" |
|
221 | listing keys for "bookmarks" | |
222 | lfs: computing set of blobs to upload |
|
222 | lfs: computing set of blobs to upload | |
223 | Status: 200 |
|
223 | Status: 200 | |
224 | Content-Length: 901 (git-server !) |
|
224 | Content-Length: 901 (git-server !) | |
225 | Content-Length: 755 (hg-server !) |
|
225 | Content-Length: 755 (hg-server !) | |
226 | Content-Type: application/vnd.git-lfs+json |
|
226 | Content-Type: application/vnd.git-lfs+json | |
227 | Date: $HTTP_DATE$ |
|
227 | Date: $HTTP_DATE$ | |
228 | Server: testing stub value (hg-server !) |
|
228 | Server: testing stub value (hg-server !) | |
229 | { |
|
229 | { | |
230 | "objects": [ |
|
230 | "objects": [ | |
231 | { |
|
231 | { | |
232 | "actions": { (git-server !) |
|
232 | "actions": { (git-server !) | |
233 | "download": { (git-server !) |
|
233 | "download": { (git-server !) | |
234 | "expires_at": "$ISO_8601_DATE_TIME$" (git-server !) |
|
234 | "expires_at": "$ISO_8601_DATE_TIME$" (git-server !) | |
235 | "header": { (git-server !) |
|
235 | "header": { (git-server !) | |
236 | "Accept": "application/vnd.git-lfs" (git-server !) |
|
236 | "Accept": "application/vnd.git-lfs" (git-server !) | |
237 | } (git-server !) |
|
237 | } (git-server !) | |
238 | "href": "http://localhost:$HGPORT/objects/31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b" (git-server !) |
|
238 | "href": "http://localhost:$HGPORT/objects/31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b" (git-server !) | |
239 | } (git-server !) |
|
239 | } (git-server !) | |
240 | } (git-server !) |
|
240 | } (git-server !) | |
241 | "oid": "31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b" |
|
241 | "oid": "31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b" | |
242 | "size": 12 |
|
242 | "size": 12 | |
243 | } |
|
243 | } | |
244 | { |
|
244 | { | |
245 | "actions": { |
|
245 | "actions": { | |
246 | "upload": { |
|
246 | "upload": { | |
247 | "expires_at": "$ISO_8601_DATE_TIME$" |
|
247 | "expires_at": "$ISO_8601_DATE_TIME$" | |
248 | "header": { |
|
248 | "header": { | |
249 | "Accept": "application/vnd.git-lfs" |
|
249 | "Accept": "application/vnd.git-lfs" | |
250 | } |
|
250 | } | |
251 | "href": "http://localhost:$HGPORT/*/37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19" (glob) |
|
251 | "href": "http://localhost:$HGPORT/*/37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19" (glob) | |
252 | } |
|
252 | } | |
253 | } |
|
253 | } | |
254 | "oid": "37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19" |
|
254 | "oid": "37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19" | |
255 | "size": 20 |
|
255 | "size": 20 | |
256 | } |
|
256 | } | |
257 | { |
|
257 | { | |
258 | "actions": { |
|
258 | "actions": { | |
259 | "upload": { |
|
259 | "upload": { | |
260 | "expires_at": "$ISO_8601_DATE_TIME$" |
|
260 | "expires_at": "$ISO_8601_DATE_TIME$" | |
261 | "header": { |
|
261 | "header": { | |
262 | "Accept": "application/vnd.git-lfs" |
|
262 | "Accept": "application/vnd.git-lfs" | |
263 | } |
|
263 | } | |
264 | "href": "http://localhost:$HGPORT/*/d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998" (glob) |
|
264 | "href": "http://localhost:$HGPORT/*/d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998" (glob) | |
265 | } |
|
265 | } | |
266 | } |
|
266 | } | |
267 | "oid": "d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998" |
|
267 | "oid": "d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998" | |
268 | "size": 19 |
|
268 | "size": 19 | |
269 | } |
|
269 | } | |
270 | ] |
|
270 | ] | |
271 | "transfer": "basic" (hg-server !) |
|
271 | "transfer": "basic" (hg-server !) | |
272 | } |
|
272 | } | |
273 | lfs: need to transfer 2 objects (39 bytes) |
|
273 | lfs: need to transfer 2 objects (39 bytes) | |
274 | lfs: uploading 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 (20 bytes) |
|
274 | lfs: uploading 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 (20 bytes) | |
275 | Status: 200 (git-server !) |
|
275 | Status: 200 (git-server !) | |
276 | Status: 201 (hg-server !) |
|
276 | Status: 201 (hg-server !) | |
277 | Content-Length: 0 |
|
277 | Content-Length: 0 | |
278 | Content-Type: text/plain; charset=utf-8 |
|
278 | Content-Type: text/plain; charset=utf-8 | |
279 | Date: $HTTP_DATE$ |
|
279 | Date: $HTTP_DATE$ | |
280 | Server: testing stub value (hg-server !) |
|
280 | Server: testing stub value (hg-server !) | |
281 | lfs: processed: 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 |
|
281 | lfs: processed: 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 | |
282 | lfs: uploading d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 (19 bytes) |
|
282 | lfs: uploading d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 (19 bytes) | |
283 | Status: 200 (git-server !) |
|
283 | Status: 200 (git-server !) | |
284 | Status: 201 (hg-server !) |
|
284 | Status: 201 (hg-server !) | |
285 | Content-Length: 0 |
|
285 | Content-Length: 0 | |
286 | Content-Type: text/plain; charset=utf-8 |
|
286 | Content-Type: text/plain; charset=utf-8 | |
287 | Date: $HTTP_DATE$ |
|
287 | Date: $HTTP_DATE$ | |
288 | Server: testing stub value (hg-server !) |
|
288 | Server: testing stub value (hg-server !) | |
289 | lfs: processed: d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 |
|
289 | lfs: processed: d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 | |
290 | lfs: uploaded 2 files (39 bytes) |
|
290 | lfs: uploaded 2 files (39 bytes) | |
291 | 1 changesets found |
|
291 | 1 changesets found | |
292 | list of changesets: |
|
292 | list of changesets: | |
293 | dfca2c9e2ef24996aa61ba2abd99277d884b3d63 |
|
293 | dfca2c9e2ef24996aa61ba2abd99277d884b3d63 | |
294 | bundle2-output-bundle: "HG20", 5 parts total |
|
294 | bundle2-output-bundle: "HG20", 5 parts total | |
295 | bundle2-output-part: "replycaps" * bytes payload (glob) |
|
295 | bundle2-output-part: "replycaps" * bytes payload (glob) | |
296 | bundle2-output-part: "check:phases" 24 bytes payload |
|
296 | bundle2-output-part: "check:phases" 24 bytes payload | |
297 | bundle2-output-part: "check:heads" streamed payload |
|
297 | bundle2-output-part: "check:heads" streamed payload | |
298 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload |
|
298 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload | |
299 | bundle2-output-part: "phase-heads" 24 bytes payload |
|
299 | bundle2-output-part: "phase-heads" 24 bytes payload | |
300 | bundle2-input-bundle: with-transaction |
|
300 | bundle2-input-bundle: with-transaction | |
301 | bundle2-input-part: "replycaps" supported |
|
301 | bundle2-input-part: "replycaps" supported | |
302 | bundle2-input-part: total payload size * (glob) |
|
302 | bundle2-input-part: total payload size * (glob) | |
303 | bundle2-input-part: "check:phases" supported |
|
303 | bundle2-input-part: "check:phases" supported | |
304 | bundle2-input-part: total payload size 24 |
|
304 | bundle2-input-part: total payload size 24 | |
305 | bundle2-input-part: "check:heads" supported |
|
305 | bundle2-input-part: "check:heads" supported | |
306 | bundle2-input-part: total payload size 20 |
|
306 | bundle2-input-part: total payload size 20 | |
307 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported |
|
307 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported | |
308 | adding changesets |
|
308 | adding changesets | |
309 | add changeset dfca2c9e2ef2 |
|
309 | add changeset dfca2c9e2ef2 | |
310 | adding manifests |
|
310 | adding manifests | |
311 | adding file changes |
|
311 | adding file changes | |
312 | adding b revisions |
|
312 | adding b revisions | |
313 | adding c revisions |
|
313 | adding c revisions | |
314 | adding d revisions |
|
314 | adding d revisions | |
315 | added 1 changesets with 3 changes to 3 files |
|
315 | added 1 changesets with 3 changes to 3 files | |
316 | bundle2-input-part: total payload size 1315 |
|
316 | bundle2-input-part: total payload size 1315 | |
317 | bundle2-input-part: "phase-heads" supported |
|
317 | bundle2-input-part: "phase-heads" supported | |
318 | bundle2-input-part: total payload size 24 |
|
318 | bundle2-input-part: total payload size 24 | |
319 | bundle2-input-bundle: 4 parts total |
|
319 | bundle2-input-bundle: 4 parts total | |
320 | updating the branch cache |
|
320 | updating the branch cache | |
321 | bundle2-output-bundle: "HG20", 1 parts total |
|
321 | bundle2-output-bundle: "HG20", 1 parts total | |
322 | bundle2-output-part: "reply:changegroup" (advisory) (params: 0 advisory) empty payload |
|
322 | bundle2-output-part: "reply:changegroup" (advisory) (params: 0 advisory) empty payload | |
323 | bundle2-input-bundle: no-transaction |
|
323 | bundle2-input-bundle: no-transaction | |
324 | bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported |
|
324 | bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported | |
325 | bundle2-input-bundle: 0 parts total |
|
325 | bundle2-input-bundle: 0 parts total | |
326 | listing keys for "phases" |
|
326 | listing keys for "phases" | |
327 |
|
327 | |||
328 | Clear the cache to force a download |
|
328 | Clear the cache to force a download | |
329 | $ rm -rf `hg config lfs.usercache` |
|
329 | $ rm -rf `hg config lfs.usercache` | |
330 | $ hg --repo ../repo1 update tip --debug |
|
330 | $ hg --repo ../repo1 update tip --debug | |
331 | http auth: user foo, password *** |
|
331 | http auth: user foo, password *** | |
332 | resolving manifests |
|
332 | resolving manifests | |
333 | branchmerge: False, force: False, partial: False |
|
333 | branchmerge: False, force: False, partial: False | |
334 | ancestor: 99a7098854a3, local: 99a7098854a3+, remote: dfca2c9e2ef2 |
|
334 | ancestor: 99a7098854a3, local: 99a7098854a3+, remote: dfca2c9e2ef2 | |
335 | http auth: user foo, password *** |
|
335 | http auth: user foo, password *** | |
336 | Status: 200 |
|
336 | Status: 200 | |
337 | Content-Length: 608 (git-server !) |
|
337 | Content-Length: 608 (git-server !) | |
338 | Content-Length: 670 (hg-server !) |
|
338 | Content-Length: 670 (hg-server !) | |
339 | Content-Type: application/vnd.git-lfs+json |
|
339 | Content-Type: application/vnd.git-lfs+json | |
340 | Date: $HTTP_DATE$ |
|
340 | Date: $HTTP_DATE$ | |
341 | Server: testing stub value (hg-server !) |
|
341 | Server: testing stub value (hg-server !) | |
342 | { |
|
342 | { | |
343 | "objects": [ |
|
343 | "objects": [ | |
344 | { |
|
344 | { | |
345 | "actions": { |
|
345 | "actions": { | |
346 | "download": { |
|
346 | "download": { | |
347 | "expires_at": "$ISO_8601_DATE_TIME$" |
|
347 | "expires_at": "$ISO_8601_DATE_TIME$" | |
348 | "header": { |
|
348 | "header": { | |
349 | "Accept": "application/vnd.git-lfs" |
|
349 | "Accept": "application/vnd.git-lfs" | |
350 | } |
|
350 | } | |
351 | "href": "http://localhost:$HGPORT/*/37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19" (glob) |
|
351 | "href": "http://localhost:$HGPORT/*/37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19" (glob) | |
352 | } |
|
352 | } | |
353 | } |
|
353 | } | |
354 | "oid": "37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19" |
|
354 | "oid": "37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19" | |
355 | "size": 20 |
|
355 | "size": 20 | |
356 | } |
|
356 | } | |
357 | { |
|
357 | { | |
358 | "actions": { |
|
358 | "actions": { | |
359 | "download": { |
|
359 | "download": { | |
360 | "expires_at": "$ISO_8601_DATE_TIME$" |
|
360 | "expires_at": "$ISO_8601_DATE_TIME$" | |
361 | "header": { |
|
361 | "header": { | |
362 | "Accept": "application/vnd.git-lfs" |
|
362 | "Accept": "application/vnd.git-lfs" | |
363 | } |
|
363 | } | |
364 | "href": "http://localhost:$HGPORT/*/d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998" (glob) |
|
364 | "href": "http://localhost:$HGPORT/*/d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998" (glob) | |
365 | } |
|
365 | } | |
366 | } |
|
366 | } | |
367 | "oid": "d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998" |
|
367 | "oid": "d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998" | |
368 | "size": 19 |
|
368 | "size": 19 | |
369 | } |
|
369 | } | |
370 | ] |
|
370 | ] | |
371 | "transfer": "basic" (hg-server !) |
|
371 | "transfer": "basic" (hg-server !) | |
372 | } |
|
372 | } | |
373 | lfs: need to transfer 2 objects (39 bytes) |
|
373 | lfs: need to transfer 2 objects (39 bytes) | |
374 | lfs: downloading 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 (20 bytes) |
|
374 | lfs: downloading 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 (20 bytes) | |
375 | Status: 200 |
|
375 | Status: 200 | |
376 | Content-Length: 20 |
|
376 | Content-Length: 20 | |
377 | Content-Type: text/plain; charset=utf-8 (git-server !) |
|
377 | Content-Type: text/plain; charset=utf-8 (git-server !) | |
378 | Content-Type: application/octet-stream (hg-server !) |
|
378 | Content-Type: application/octet-stream (hg-server !) | |
379 | Date: $HTTP_DATE$ |
|
379 | Date: $HTTP_DATE$ | |
380 | Server: testing stub value (hg-server !) |
|
380 | Server: testing stub value (hg-server !) | |
381 | lfs: adding 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 to the usercache |
|
381 | lfs: adding 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 to the usercache | |
382 | lfs: processed: 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 |
|
382 | lfs: processed: 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 | |
383 | lfs: downloading d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 (19 bytes) |
|
383 | lfs: downloading d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 (19 bytes) | |
384 | Status: 200 |
|
384 | Status: 200 | |
385 | Content-Length: 19 |
|
385 | Content-Length: 19 | |
386 | Content-Type: text/plain; charset=utf-8 (git-server !) |
|
386 | Content-Type: text/plain; charset=utf-8 (git-server !) | |
387 | Content-Type: application/octet-stream (hg-server !) |
|
387 | Content-Type: application/octet-stream (hg-server !) | |
388 | Date: $HTTP_DATE$ |
|
388 | Date: $HTTP_DATE$ | |
389 | Server: testing stub value (hg-server !) |
|
389 | Server: testing stub value (hg-server !) | |
390 | lfs: adding d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 to the usercache |
|
390 | lfs: adding d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 to the usercache | |
391 | lfs: processed: d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 |
|
391 | lfs: processed: d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 | |
392 | lfs: downloaded 2 files (39 bytes) |
|
392 | lfs: downloaded 2 files (39 bytes) | |
393 | b: remote created -> g |
|
393 | b: remote created -> g | |
394 | getting b |
|
394 | getting b | |
395 | lfs: found 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b in the local lfs store |
|
395 | lfs: found 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b in the local lfs store | |
396 | c: remote created -> g |
|
396 | c: remote created -> g | |
397 | getting c |
|
397 | getting c | |
398 | lfs: found d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 in the local lfs store |
|
398 | lfs: found d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 in the local lfs store | |
399 | d: remote created -> g |
|
399 | d: remote created -> g | |
400 | getting d |
|
400 | getting d | |
401 | lfs: found 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 in the local lfs store |
|
401 | lfs: found 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 in the local lfs store | |
402 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
402 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
403 |
|
403 | |||
404 | Test a corrupt file download, but clear the cache first to force a download. |
|
404 | Test a corrupt file download, but clear the cache first to force a download. | |
405 | `hg serve` indicates a corrupt file without transferring it, unlike |
|
405 | `hg serve` indicates a corrupt file without transferring it, unlike | |
406 | lfs-test-server. |
|
406 | lfs-test-server. | |
407 |
|
407 | |||
408 | $ rm -rf `hg config lfs.usercache` |
|
408 | $ rm -rf `hg config lfs.usercache` | |
409 | #if git-server |
|
409 | #if git-server | |
410 | $ cp $TESTTMP/lfs-content/d1/1e/1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 blob |
|
410 | $ cp $TESTTMP/lfs-content/d1/1e/1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 blob | |
411 | $ echo 'damage' > $TESTTMP/lfs-content/d1/1e/1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 |
|
411 | $ echo 'damage' > $TESTTMP/lfs-content/d1/1e/1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 | |
412 | #else |
|
412 | #else | |
413 | $ cp $TESTTMP/server/.hg/store/lfs/objects/d1/1e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 blob |
|
413 | $ cp $TESTTMP/server/.hg/store/lfs/objects/d1/1e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 blob | |
414 | $ echo 'damage' > $TESTTMP/server/.hg/store/lfs/objects/d1/1e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 |
|
414 | $ echo 'damage' > $TESTTMP/server/.hg/store/lfs/objects/d1/1e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 | |
415 | #endif |
|
415 | #endif | |
416 | $ rm ../repo1/.hg/store/lfs/objects/d1/1e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 |
|
416 | $ rm ../repo1/.hg/store/lfs/objects/d1/1e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 | |
417 | $ rm ../repo1/* |
|
417 | $ rm ../repo1/* | |
418 |
|
418 | |||
419 | TODO: give the proper error indication from `hg serve` |
|
419 | TODO: give the proper error indication from `hg serve` | |
420 |
|
420 | |||
421 | $ hg --repo ../repo1 update -C tip --debug |
|
421 | $ hg --repo ../repo1 update -C tip --debug | |
422 | http auth: user foo, password *** |
|
422 | http auth: user foo, password *** | |
423 | resolving manifests |
|
423 | resolving manifests | |
424 | branchmerge: False, force: True, partial: False |
|
424 | branchmerge: False, force: True, partial: False | |
425 | ancestor: dfca2c9e2ef2+, local: dfca2c9e2ef2+, remote: dfca2c9e2ef2 |
|
425 | ancestor: dfca2c9e2ef2+, local: dfca2c9e2ef2+, remote: dfca2c9e2ef2 | |
426 | http auth: user foo, password *** |
|
426 | http auth: user foo, password *** | |
427 | Status: 200 |
|
427 | Status: 200 | |
428 | Content-Length: 311 (git-server !) |
|
428 | Content-Length: 311 (git-server !) | |
429 | Content-Length: 183 (hg-server !) |
|
429 | Content-Length: 183 (hg-server !) | |
430 | Content-Type: application/vnd.git-lfs+json |
|
430 | Content-Type: application/vnd.git-lfs+json | |
431 | Date: $HTTP_DATE$ |
|
431 | Date: $HTTP_DATE$ | |
432 | Server: testing stub value (hg-server !) |
|
432 | Server: testing stub value (hg-server !) | |
433 | { |
|
433 | { | |
434 | "objects": [ |
|
434 | "objects": [ | |
435 | { |
|
435 | { | |
436 | "actions": { (git-server !) |
|
436 | "actions": { (git-server !) | |
437 | "download": { (git-server !) |
|
437 | "download": { (git-server !) | |
438 | "expires_at": "$ISO_8601_DATE_TIME$" (git-server !) |
|
438 | "expires_at": "$ISO_8601_DATE_TIME$" (git-server !) | |
439 | "header": { (git-server !) |
|
439 | "header": { (git-server !) | |
440 | "Accept": "application/vnd.git-lfs" (git-server !) |
|
440 | "Accept": "application/vnd.git-lfs" (git-server !) | |
441 | } (git-server !) |
|
441 | } (git-server !) | |
442 | "href": "http://localhost:$HGPORT/objects/d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998" (git-server !) |
|
442 | "href": "http://localhost:$HGPORT/objects/d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998" (git-server !) | |
443 | } (git-server !) |
|
443 | } (git-server !) | |
444 | "error": { (hg-server !) |
|
444 | "error": { (hg-server !) | |
445 | "code": 422 (hg-server !) |
|
445 | "code": 422 (hg-server !) | |
446 | "message": "The object is corrupt" (hg-server !) |
|
446 | "message": "The object is corrupt" (hg-server !) | |
447 | } |
|
447 | } | |
448 | "oid": "d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998" |
|
448 | "oid": "d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998" | |
449 | "size": 19 |
|
449 | "size": 19 | |
450 | } |
|
450 | } | |
451 | ] |
|
451 | ] | |
452 | "transfer": "basic" (hg-server !) |
|
452 | "transfer": "basic" (hg-server !) | |
453 | } |
|
453 | } | |
454 | lfs: downloading d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 (19 bytes) (git-server !) |
|
454 | lfs: downloading d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 (19 bytes) (git-server !) | |
455 | Status: 200 (git-server !) |
|
455 | Status: 200 (git-server !) | |
456 | Content-Length: 7 (git-server !) |
|
456 | Content-Length: 7 (git-server !) | |
457 | Content-Type: text/plain; charset=utf-8 (git-server !) |
|
457 | Content-Type: text/plain; charset=utf-8 (git-server !) | |
458 | Date: $HTTP_DATE$ (git-server !) |
|
458 | Date: $HTTP_DATE$ (git-server !) | |
459 | abort: corrupt remote lfs object: d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 (git-server !) |
|
459 | abort: corrupt remote lfs object: d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 (git-server !) | |
460 | abort: LFS server error for "c": Validation error! (hg-server !) |
|
460 | abort: LFS server error for "c": Validation error! (hg-server !) | |
461 | [255] |
|
461 | [255] | |
462 |
|
462 | |||
463 | The corrupted blob is not added to the usercache or local store |
|
463 | The corrupted blob is not added to the usercache or local store | |
464 |
|
464 | |||
465 | $ test -f ../repo1/.hg/store/lfs/objects/d1/1e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 |
|
465 | $ test -f ../repo1/.hg/store/lfs/objects/d1/1e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 | |
466 | [1] |
|
466 | [1] | |
467 | $ test -f `hg config lfs.usercache`/d1/1e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 |
|
467 | $ test -f `hg config lfs.usercache`/d1/1e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 | |
468 | [1] |
|
468 | [1] | |
469 | #if git-server |
|
469 | #if git-server | |
470 | $ cp blob $TESTTMP/lfs-content/d1/1e/1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 |
|
470 | $ cp blob $TESTTMP/lfs-content/d1/1e/1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 | |
471 | #else |
|
471 | #else | |
472 | $ cp blob $TESTTMP/server/.hg/store/lfs/objects/d1/1e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 |
|
472 | $ cp blob $TESTTMP/server/.hg/store/lfs/objects/d1/1e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 | |
473 | #endif |
|
473 | #endif | |
474 |
|
474 | |||
475 | Test a corrupted file upload |
|
475 | Test a corrupted file upload | |
476 |
|
476 | |||
477 | $ echo 'another lfs blob' > b |
|
477 | $ echo 'another lfs blob' > b | |
478 | $ hg ci -m 'another blob' |
|
478 | $ hg ci -m 'another blob' | |
479 | $ echo 'damage' > .hg/store/lfs/objects/e6/59058e26b07b39d2a9c7145b3f99b41f797b6621c8076600e9cb7ee88291f0 |
|
479 | $ echo 'damage' > .hg/store/lfs/objects/e6/59058e26b07b39d2a9c7145b3f99b41f797b6621c8076600e9cb7ee88291f0 | |
480 | $ hg push --debug ../repo1 |
|
480 | $ hg push --debug ../repo1 | |
481 | http auth: user foo, password *** |
|
481 | http auth: user foo, password *** | |
482 | pushing to ../repo1 |
|
482 | pushing to ../repo1 | |
483 | http auth: user foo, password *** |
|
483 | http auth: user foo, password *** | |
484 | http auth: user foo, password *** |
|
484 | http auth: user foo, password *** | |
485 | query 1; heads |
|
485 | query 1; heads | |
486 | searching for changes |
|
486 | searching for changes | |
487 | all remote heads known locally |
|
487 | all remote heads known locally | |
488 | listing keys for "phases" |
|
488 | listing keys for "phases" | |
489 | checking for updated bookmarks |
|
489 | checking for updated bookmarks | |
490 | listing keys for "bookmarks" |
|
490 | listing keys for "bookmarks" | |
491 | listing keys for "bookmarks" |
|
491 | listing keys for "bookmarks" | |
492 | lfs: computing set of blobs to upload |
|
492 | lfs: computing set of blobs to upload | |
493 | Status: 200 |
|
493 | Status: 200 | |
494 | Content-Length: 309 (git-server !) |
|
494 | Content-Length: 309 (git-server !) | |
495 | Content-Length: 350 (hg-server !) |
|
495 | Content-Length: 350 (hg-server !) | |
496 | Content-Type: application/vnd.git-lfs+json |
|
496 | Content-Type: application/vnd.git-lfs+json | |
497 | Date: $HTTP_DATE$ |
|
497 | Date: $HTTP_DATE$ | |
498 | Server: testing stub value (hg-server !) |
|
498 | Server: testing stub value (hg-server !) | |
499 | { |
|
499 | { | |
500 | "objects": [ |
|
500 | "objects": [ | |
501 | { |
|
501 | { | |
502 | "actions": { |
|
502 | "actions": { | |
503 | "upload": { |
|
503 | "upload": { | |
504 | "expires_at": "$ISO_8601_DATE_TIME$" |
|
504 | "expires_at": "$ISO_8601_DATE_TIME$" | |
505 | "header": { |
|
505 | "header": { | |
506 | "Accept": "application/vnd.git-lfs" |
|
506 | "Accept": "application/vnd.git-lfs" | |
507 | } |
|
507 | } | |
508 | "href": "http://localhost:$HGPORT/*/e659058e26b07b39d2a9c7145b3f99b41f797b6621c8076600e9cb7ee88291f0" (glob) |
|
508 | "href": "http://localhost:$HGPORT/*/e659058e26b07b39d2a9c7145b3f99b41f797b6621c8076600e9cb7ee88291f0" (glob) | |
509 | } |
|
509 | } | |
510 | } |
|
510 | } | |
511 | "oid": "e659058e26b07b39d2a9c7145b3f99b41f797b6621c8076600e9cb7ee88291f0" |
|
511 | "oid": "e659058e26b07b39d2a9c7145b3f99b41f797b6621c8076600e9cb7ee88291f0" | |
512 | "size": 17 |
|
512 | "size": 17 | |
513 | } |
|
513 | } | |
514 | ] |
|
514 | ] | |
515 | "transfer": "basic" (hg-server !) |
|
515 | "transfer": "basic" (hg-server !) | |
516 | } |
|
516 | } | |
517 | lfs: uploading e659058e26b07b39d2a9c7145b3f99b41f797b6621c8076600e9cb7ee88291f0 (17 bytes) |
|
517 | lfs: uploading e659058e26b07b39d2a9c7145b3f99b41f797b6621c8076600e9cb7ee88291f0 (17 bytes) | |
518 | abort: detected corrupt lfs object: e659058e26b07b39d2a9c7145b3f99b41f797b6621c8076600e9cb7ee88291f0 |
|
518 | abort: detected corrupt lfs object: e659058e26b07b39d2a9c7145b3f99b41f797b6621c8076600e9cb7ee88291f0 | |
519 | (run hg verify) |
|
519 | (run hg verify) | |
520 | [255] |
|
520 | [255] | |
521 |
|
521 | |||
522 | Archive will prefetch blobs in a group |
|
522 | Archive will prefetch blobs in a group | |
523 |
|
523 | |||
524 | $ rm -rf .hg/store/lfs `hg config lfs.usercache` |
|
524 | $ rm -rf .hg/store/lfs `hg config lfs.usercache` | |
525 | $ hg archive --debug -r 1 ../archive |
|
525 | $ hg archive --debug -r 1 ../archive | |
526 | http auth: user foo, password *** |
|
526 | http auth: user foo, password *** | |
527 | http auth: user foo, password *** |
|
527 | http auth: user foo, password *** | |
528 | Status: 200 |
|
528 | Status: 200 | |
529 | Content-Length: 905 (git-server !) |
|
529 | Content-Length: 905 (git-server !) | |
530 | Content-Length: 988 (hg-server !) |
|
530 | Content-Length: 988 (hg-server !) | |
531 | Content-Type: application/vnd.git-lfs+json |
|
531 | Content-Type: application/vnd.git-lfs+json | |
532 | Date: $HTTP_DATE$ |
|
532 | Date: $HTTP_DATE$ | |
533 | Server: testing stub value (hg-server !) |
|
533 | Server: testing stub value (hg-server !) | |
534 | { |
|
534 | { | |
535 | "objects": [ |
|
535 | "objects": [ | |
536 | { |
|
536 | { | |
537 | "actions": { |
|
537 | "actions": { | |
538 | "download": { |
|
538 | "download": { | |
539 | "expires_at": "$ISO_8601_DATE_TIME$" |
|
539 | "expires_at": "$ISO_8601_DATE_TIME$" | |
540 | "header": { |
|
540 | "header": { | |
541 | "Accept": "application/vnd.git-lfs" |
|
541 | "Accept": "application/vnd.git-lfs" | |
542 | } |
|
542 | } | |
543 | "href": "http://localhost:$HGPORT/*/31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b" (glob) |
|
543 | "href": "http://localhost:$HGPORT/*/31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b" (glob) | |
544 | } |
|
544 | } | |
545 | } |
|
545 | } | |
546 | "oid": "31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b" |
|
546 | "oid": "31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b" | |
547 | "size": 12 |
|
547 | "size": 12 | |
548 | } |
|
548 | } | |
549 | { |
|
549 | { | |
550 | "actions": { |
|
550 | "actions": { | |
551 | "download": { |
|
551 | "download": { | |
552 | "expires_at": "$ISO_8601_DATE_TIME$" |
|
552 | "expires_at": "$ISO_8601_DATE_TIME$" | |
553 | "header": { |
|
553 | "header": { | |
554 | "Accept": "application/vnd.git-lfs" |
|
554 | "Accept": "application/vnd.git-lfs" | |
555 | } |
|
555 | } | |
556 | "href": "http://localhost:$HGPORT/*/37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19" (glob) |
|
556 | "href": "http://localhost:$HGPORT/*/37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19" (glob) | |
557 | } |
|
557 | } | |
558 | } |
|
558 | } | |
559 | "oid": "37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19" |
|
559 | "oid": "37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19" | |
560 | "size": 20 |
|
560 | "size": 20 | |
561 | } |
|
561 | } | |
562 | { |
|
562 | { | |
563 | "actions": { |
|
563 | "actions": { | |
564 | "download": { |
|
564 | "download": { | |
565 | "expires_at": "$ISO_8601_DATE_TIME$" |
|
565 | "expires_at": "$ISO_8601_DATE_TIME$" | |
566 | "header": { |
|
566 | "header": { | |
567 | "Accept": "application/vnd.git-lfs" |
|
567 | "Accept": "application/vnd.git-lfs" | |
568 | } |
|
568 | } | |
569 | "href": "http://localhost:$HGPORT/*/d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998" (glob) |
|
569 | "href": "http://localhost:$HGPORT/*/d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998" (glob) | |
570 | } |
|
570 | } | |
571 | } |
|
571 | } | |
572 | "oid": "d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998" |
|
572 | "oid": "d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998" | |
573 | "size": 19 |
|
573 | "size": 19 | |
574 | } |
|
574 | } | |
575 | ] |
|
575 | ] | |
576 | "transfer": "basic" (hg-server !) |
|
576 | "transfer": "basic" (hg-server !) | |
577 | } |
|
577 | } | |
578 | lfs: need to transfer 3 objects (51 bytes) |
|
578 | lfs: need to transfer 3 objects (51 bytes) | |
579 | lfs: downloading 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b (12 bytes) |
|
579 | lfs: downloading 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b (12 bytes) | |
580 | Status: 200 |
|
580 | Status: 200 | |
581 | Content-Length: 12 |
|
581 | Content-Length: 12 | |
582 | Content-Type: text/plain; charset=utf-8 (git-server !) |
|
582 | Content-Type: text/plain; charset=utf-8 (git-server !) | |
583 | Content-Type: application/octet-stream (hg-server !) |
|
583 | Content-Type: application/octet-stream (hg-server !) | |
584 | Date: $HTTP_DATE$ |
|
584 | Date: $HTTP_DATE$ | |
585 | Server: testing stub value (hg-server !) |
|
585 | Server: testing stub value (hg-server !) | |
586 | lfs: adding 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b to the usercache |
|
586 | lfs: adding 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b to the usercache | |
587 | lfs: processed: 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b |
|
587 | lfs: processed: 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b | |
588 | lfs: downloading 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 (20 bytes) |
|
588 | lfs: downloading 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 (20 bytes) | |
589 | Status: 200 |
|
589 | Status: 200 | |
590 | Content-Length: 20 |
|
590 | Content-Length: 20 | |
591 | Content-Type: text/plain; charset=utf-8 (git-server !) |
|
591 | Content-Type: text/plain; charset=utf-8 (git-server !) | |
592 | Content-Type: application/octet-stream (hg-server !) |
|
592 | Content-Type: application/octet-stream (hg-server !) | |
593 | Date: $HTTP_DATE$ |
|
593 | Date: $HTTP_DATE$ | |
594 | Server: testing stub value (hg-server !) |
|
594 | Server: testing stub value (hg-server !) | |
595 | lfs: adding 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 to the usercache |
|
595 | lfs: adding 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 to the usercache | |
596 | lfs: processed: 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 |
|
596 | lfs: processed: 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 | |
597 | lfs: downloading d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 (19 bytes) |
|
597 | lfs: downloading d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 (19 bytes) | |
598 | Status: 200 |
|
598 | Status: 200 | |
599 | Content-Length: 19 |
|
599 | Content-Length: 19 | |
600 | Content-Type: text/plain; charset=utf-8 (git-server !) |
|
600 | Content-Type: text/plain; charset=utf-8 (git-server !) | |
601 | Content-Type: application/octet-stream (hg-server !) |
|
601 | Content-Type: application/octet-stream (hg-server !) | |
602 | Date: $HTTP_DATE$ |
|
602 | Date: $HTTP_DATE$ | |
603 | Server: testing stub value (hg-server !) |
|
603 | Server: testing stub value (hg-server !) | |
604 | lfs: adding d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 to the usercache |
|
604 | lfs: adding d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 to the usercache | |
605 | lfs: processed: d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 |
|
605 | lfs: processed: d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 | |
606 | lfs: downloaded 3 files (51 bytes) |
|
606 | lfs: downloaded 3 files (51 bytes) | |
607 | lfs: found 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b in the local lfs store |
|
607 | lfs: found 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b in the local lfs store | |
608 | lfs: found 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b in the local lfs store |
|
608 | lfs: found 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b in the local lfs store | |
609 | lfs: found d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 in the local lfs store |
|
609 | lfs: found d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 in the local lfs store | |
610 | lfs: found 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 in the local lfs store |
|
610 | lfs: found 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 in the local lfs store | |
611 | $ find ../archive | sort |
|
611 | $ find ../archive | sort | |
612 | ../archive |
|
612 | ../archive | |
613 | ../archive/.hg_archival.txt |
|
613 | ../archive/.hg_archival.txt | |
614 | ../archive/a |
|
614 | ../archive/a | |
615 | ../archive/b |
|
615 | ../archive/b | |
616 | ../archive/c |
|
616 | ../archive/c | |
617 | ../archive/d |
|
617 | ../archive/d | |
618 |
|
618 | |||
619 | Cat will prefetch blobs in a group |
|
619 | Cat will prefetch blobs in a group | |
620 |
|
620 | |||
621 | $ rm -rf .hg/store/lfs `hg config lfs.usercache` |
|
621 | $ rm -rf .hg/store/lfs `hg config lfs.usercache` | |
622 | $ hg cat --debug -r 1 a b c nonexistent |
|
622 | $ hg cat --debug -r 1 a b c nonexistent | |
623 | http auth: user foo, password *** |
|
623 | http auth: user foo, password *** | |
624 | http auth: user foo, password *** |
|
624 | http auth: user foo, password *** | |
625 | Status: 200 |
|
625 | Status: 200 | |
626 | Content-Length: 608 (git-server !) |
|
626 | Content-Length: 608 (git-server !) | |
627 | Content-Length: 670 (hg-server !) |
|
627 | Content-Length: 670 (hg-server !) | |
628 | Content-Type: application/vnd.git-lfs+json |
|
628 | Content-Type: application/vnd.git-lfs+json | |
629 | Date: $HTTP_DATE$ |
|
629 | Date: $HTTP_DATE$ | |
630 | Server: testing stub value (hg-server !) |
|
630 | Server: testing stub value (hg-server !) | |
631 | { |
|
631 | { | |
632 | "objects": [ |
|
632 | "objects": [ | |
633 | { |
|
633 | { | |
634 | "actions": { |
|
634 | "actions": { | |
635 | "download": { |
|
635 | "download": { | |
636 | "expires_at": "$ISO_8601_DATE_TIME$" |
|
636 | "expires_at": "$ISO_8601_DATE_TIME$" | |
637 | "header": { |
|
637 | "header": { | |
638 | "Accept": "application/vnd.git-lfs" |
|
638 | "Accept": "application/vnd.git-lfs" | |
639 | } |
|
639 | } | |
640 | "href": "http://localhost:$HGPORT/*/31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b" (glob) |
|
640 | "href": "http://localhost:$HGPORT/*/31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b" (glob) | |
641 | } |
|
641 | } | |
642 | } |
|
642 | } | |
643 | "oid": "31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b" |
|
643 | "oid": "31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b" | |
644 | "size": 12 |
|
644 | "size": 12 | |
645 | } |
|
645 | } | |
646 | { |
|
646 | { | |
647 | "actions": { |
|
647 | "actions": { | |
648 | "download": { |
|
648 | "download": { | |
649 | "expires_at": "$ISO_8601_DATE_TIME$" |
|
649 | "expires_at": "$ISO_8601_DATE_TIME$" | |
650 | "header": { |
|
650 | "header": { | |
651 | "Accept": "application/vnd.git-lfs" |
|
651 | "Accept": "application/vnd.git-lfs" | |
652 | } |
|
652 | } | |
653 | "href": "http://localhost:$HGPORT/*/d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998" (glob) |
|
653 | "href": "http://localhost:$HGPORT/*/d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998" (glob) | |
654 | } |
|
654 | } | |
655 | } |
|
655 | } | |
656 | "oid": "d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998" |
|
656 | "oid": "d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998" | |
657 | "size": 19 |
|
657 | "size": 19 | |
658 | } |
|
658 | } | |
659 | ] |
|
659 | ] | |
660 | "transfer": "basic" (hg-server !) |
|
660 | "transfer": "basic" (hg-server !) | |
661 | } |
|
661 | } | |
662 | lfs: need to transfer 2 objects (31 bytes) |
|
662 | lfs: need to transfer 2 objects (31 bytes) | |
663 | lfs: downloading 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b (12 bytes) |
|
663 | lfs: downloading 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b (12 bytes) | |
664 | Status: 200 |
|
664 | Status: 200 | |
665 | Content-Length: 12 |
|
665 | Content-Length: 12 | |
666 | Content-Type: text/plain; charset=utf-8 (git-server !) |
|
666 | Content-Type: text/plain; charset=utf-8 (git-server !) | |
667 | Content-Type: application/octet-stream (hg-server !) |
|
667 | Content-Type: application/octet-stream (hg-server !) | |
668 | Date: $HTTP_DATE$ |
|
668 | Date: $HTTP_DATE$ | |
669 | Server: testing stub value (hg-server !) |
|
669 | Server: testing stub value (hg-server !) | |
670 | lfs: adding 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b to the usercache |
|
670 | lfs: adding 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b to the usercache | |
671 | lfs: processed: 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b |
|
671 | lfs: processed: 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b | |
672 | lfs: downloading d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 (19 bytes) |
|
672 | lfs: downloading d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 (19 bytes) | |
673 | Status: 200 |
|
673 | Status: 200 | |
674 | Content-Length: 19 |
|
674 | Content-Length: 19 | |
675 | Content-Type: text/plain; charset=utf-8 (git-server !) |
|
675 | Content-Type: text/plain; charset=utf-8 (git-server !) | |
676 | Content-Type: application/octet-stream (hg-server !) |
|
676 | Content-Type: application/octet-stream (hg-server !) | |
677 | Date: $HTTP_DATE$ |
|
677 | Date: $HTTP_DATE$ | |
678 | Server: testing stub value (hg-server !) |
|
678 | Server: testing stub value (hg-server !) | |
679 | lfs: adding d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 to the usercache |
|
679 | lfs: adding d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 to the usercache | |
680 | lfs: processed: d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 |
|
680 | lfs: processed: d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 | |
681 | lfs: downloaded 2 files (31 bytes) |
|
681 | lfs: downloaded 2 files (31 bytes) | |
682 | lfs: found 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b in the local lfs store |
|
682 | lfs: found 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b in the local lfs store | |
683 | THIS-IS-LFS |
|
683 | THIS-IS-LFS | |
684 | lfs: found 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b in the local lfs store |
|
684 | lfs: found 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b in the local lfs store | |
685 | THIS-IS-LFS |
|
685 | THIS-IS-LFS | |
686 | lfs: found d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 in the local lfs store |
|
686 | lfs: found d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 in the local lfs store | |
687 | ANOTHER-LARGE-FILE |
|
687 | ANOTHER-LARGE-FILE | |
688 | nonexistent: no such file in rev dfca2c9e2ef2 |
|
688 | nonexistent: no such file in rev dfca2c9e2ef2 | |
689 |
|
689 | |||
690 | Revert will prefetch blobs in a group |
|
690 | Revert will prefetch blobs in a group | |
691 |
|
691 | |||
692 | $ rm -rf .hg/store/lfs |
|
692 | $ rm -rf .hg/store/lfs | |
693 | $ rm -rf `hg config lfs.usercache` |
|
693 | $ rm -rf `hg config lfs.usercache` | |
694 | $ rm * |
|
694 | $ rm * | |
695 | $ hg revert --all -r 1 --debug |
|
695 | $ hg revert --all -r 1 --debug | |
696 | http auth: user foo, password *** |
|
696 | http auth: user foo, password *** | |
697 | adding a |
|
697 | adding a | |
698 | reverting b |
|
698 | reverting b | |
699 | reverting c |
|
699 | reverting c | |
700 | reverting d |
|
700 | reverting d | |
701 | http auth: user foo, password *** |
|
701 | http auth: user foo, password *** | |
702 | Status: 200 |
|
702 | Status: 200 | |
703 | Content-Length: 905 (git-server !) |
|
703 | Content-Length: 905 (git-server !) | |
704 | Content-Length: 988 (hg-server !) |
|
704 | Content-Length: 988 (hg-server !) | |
705 | Content-Type: application/vnd.git-lfs+json |
|
705 | Content-Type: application/vnd.git-lfs+json | |
706 | Date: $HTTP_DATE$ |
|
706 | Date: $HTTP_DATE$ | |
707 | Server: testing stub value (hg-server !) |
|
707 | Server: testing stub value (hg-server !) | |
708 | { |
|
708 | { | |
709 | "objects": [ |
|
709 | "objects": [ | |
710 | { |
|
710 | { | |
711 | "actions": { |
|
711 | "actions": { | |
712 | "download": { |
|
712 | "download": { | |
713 | "expires_at": "$ISO_8601_DATE_TIME$" |
|
713 | "expires_at": "$ISO_8601_DATE_TIME$" | |
714 | "header": { |
|
714 | "header": { | |
715 | "Accept": "application/vnd.git-lfs" |
|
715 | "Accept": "application/vnd.git-lfs" | |
716 | } |
|
716 | } | |
717 | "href": "http://localhost:$HGPORT/*/31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b" (glob) |
|
717 | "href": "http://localhost:$HGPORT/*/31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b" (glob) | |
718 | } |
|
718 | } | |
719 | } |
|
719 | } | |
720 | "oid": "31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b" |
|
720 | "oid": "31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b" | |
721 | "size": 12 |
|
721 | "size": 12 | |
722 | } |
|
722 | } | |
723 | { |
|
723 | { | |
724 | "actions": { |
|
724 | "actions": { | |
725 | "download": { |
|
725 | "download": { | |
726 | "expires_at": "$ISO_8601_DATE_TIME$" |
|
726 | "expires_at": "$ISO_8601_DATE_TIME$" | |
727 | "header": { |
|
727 | "header": { | |
728 | "Accept": "application/vnd.git-lfs" |
|
728 | "Accept": "application/vnd.git-lfs" | |
729 | } |
|
729 | } | |
730 | "href": "http://localhost:$HGPORT/*/37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19" (glob) |
|
730 | "href": "http://localhost:$HGPORT/*/37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19" (glob) | |
731 | } |
|
731 | } | |
732 | } |
|
732 | } | |
733 | "oid": "37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19" |
|
733 | "oid": "37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19" | |
734 | "size": 20 |
|
734 | "size": 20 | |
735 | } |
|
735 | } | |
736 | { |
|
736 | { | |
737 | "actions": { |
|
737 | "actions": { | |
738 | "download": { |
|
738 | "download": { | |
739 | "expires_at": "$ISO_8601_DATE_TIME$" |
|
739 | "expires_at": "$ISO_8601_DATE_TIME$" | |
740 | "header": { |
|
740 | "header": { | |
741 | "Accept": "application/vnd.git-lfs" |
|
741 | "Accept": "application/vnd.git-lfs" | |
742 | } |
|
742 | } | |
743 | "href": "http://localhost:$HGPORT/*/d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998" (glob) |
|
743 | "href": "http://localhost:$HGPORT/*/d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998" (glob) | |
744 | } |
|
744 | } | |
745 | } |
|
745 | } | |
746 | "oid": "d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998" |
|
746 | "oid": "d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998" | |
747 | "size": 19 |
|
747 | "size": 19 | |
748 | } |
|
748 | } | |
749 | ] |
|
749 | ] | |
750 | "transfer": "basic" (hg-server !) |
|
750 | "transfer": "basic" (hg-server !) | |
751 | } |
|
751 | } | |
752 | lfs: need to transfer 3 objects (51 bytes) |
|
752 | lfs: need to transfer 3 objects (51 bytes) | |
753 | lfs: downloading 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b (12 bytes) |
|
753 | lfs: downloading 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b (12 bytes) | |
754 | Status: 200 |
|
754 | Status: 200 | |
755 | Content-Length: 12 |
|
755 | Content-Length: 12 | |
756 | Content-Type: text/plain; charset=utf-8 (git-server !) |
|
756 | Content-Type: text/plain; charset=utf-8 (git-server !) | |
757 | Content-Type: application/octet-stream (hg-server !) |
|
757 | Content-Type: application/octet-stream (hg-server !) | |
758 | Date: $HTTP_DATE$ |
|
758 | Date: $HTTP_DATE$ | |
759 | Server: testing stub value (hg-server !) |
|
759 | Server: testing stub value (hg-server !) | |
760 | lfs: adding 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b to the usercache |
|
760 | lfs: adding 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b to the usercache | |
761 | lfs: processed: 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b |
|
761 | lfs: processed: 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b | |
762 | lfs: downloading 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 (20 bytes) |
|
762 | lfs: downloading 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 (20 bytes) | |
763 | Status: 200 |
|
763 | Status: 200 | |
764 | Content-Length: 20 |
|
764 | Content-Length: 20 | |
765 | Content-Type: text/plain; charset=utf-8 (git-server !) |
|
765 | Content-Type: text/plain; charset=utf-8 (git-server !) | |
766 | Content-Type: application/octet-stream (hg-server !) |
|
766 | Content-Type: application/octet-stream (hg-server !) | |
767 | Date: $HTTP_DATE$ |
|
767 | Date: $HTTP_DATE$ | |
768 | Server: testing stub value (hg-server !) |
|
768 | Server: testing stub value (hg-server !) | |
769 | lfs: adding 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 to the usercache |
|
769 | lfs: adding 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 to the usercache | |
770 | lfs: processed: 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 |
|
770 | lfs: processed: 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 | |
771 | lfs: downloading d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 (19 bytes) |
|
771 | lfs: downloading d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 (19 bytes) | |
772 | Status: 200 |
|
772 | Status: 200 | |
773 | Content-Length: 19 |
|
773 | Content-Length: 19 | |
774 | Content-Type: text/plain; charset=utf-8 (git-server !) |
|
774 | Content-Type: text/plain; charset=utf-8 (git-server !) | |
775 | Content-Type: application/octet-stream (hg-server !) |
|
775 | Content-Type: application/octet-stream (hg-server !) | |
776 | Date: $HTTP_DATE$ |
|
776 | Date: $HTTP_DATE$ | |
777 | Server: testing stub value (hg-server !) |
|
777 | Server: testing stub value (hg-server !) | |
778 | lfs: adding d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 to the usercache |
|
778 | lfs: adding d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 to the usercache | |
779 | lfs: processed: d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 |
|
779 | lfs: processed: d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 | |
780 | lfs: downloaded 3 files (51 bytes) |
|
780 | lfs: downloaded 3 files (51 bytes) | |
781 | lfs: found 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b in the local lfs store |
|
781 | lfs: found 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b in the local lfs store | |
782 | lfs: found d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 in the local lfs store |
|
782 | lfs: found d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 in the local lfs store | |
783 | lfs: found 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 in the local lfs store |
|
783 | lfs: found 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 in the local lfs store | |
784 | lfs: found 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b in the local lfs store |
|
784 | lfs: found 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b in the local lfs store | |
785 |
|
785 | |||
786 | Check error message when the remote missed a blob: |
|
786 | Check error message when the remote missed a blob: | |
787 |
|
787 | |||
788 | $ echo FFFFF > b |
|
788 | $ echo FFFFF > b | |
789 | $ hg commit -m b -A b |
|
789 | $ hg commit -m b -A b | |
790 | $ echo FFFFF >> b |
|
790 | $ echo FFFFF >> b | |
791 | $ hg commit -m b b |
|
791 | $ hg commit -m b b | |
792 | $ rm -rf .hg/store/lfs |
|
792 | $ rm -rf .hg/store/lfs | |
793 | $ rm -rf `hg config lfs.usercache` |
|
793 | $ rm -rf `hg config lfs.usercache` | |
794 | $ hg update -C '.^' --debug |
|
794 | $ hg update -C '.^' --debug | |
795 | http auth: user foo, password *** |
|
795 | http auth: user foo, password *** | |
796 | resolving manifests |
|
796 | resolving manifests | |
797 | branchmerge: False, force: True, partial: False |
|
797 | branchmerge: False, force: True, partial: False | |
798 | ancestor: 62fdbaf221c6+, local: 62fdbaf221c6+, remote: ef0564edf47e |
|
798 | ancestor: 62fdbaf221c6+, local: 62fdbaf221c6+, remote: ef0564edf47e | |
799 | http auth: user foo, password *** |
|
799 | http auth: user foo, password *** | |
800 | Status: 200 |
|
800 | Status: 200 | |
801 | Content-Length: 308 (git-server !) |
|
801 | Content-Length: 308 (git-server !) | |
802 | Content-Length: 186 (hg-server !) |
|
802 | Content-Length: 186 (hg-server !) | |
803 | Content-Type: application/vnd.git-lfs+json |
|
803 | Content-Type: application/vnd.git-lfs+json | |
804 | Date: $HTTP_DATE$ |
|
804 | Date: $HTTP_DATE$ | |
805 | Server: testing stub value (hg-server !) |
|
805 | Server: testing stub value (hg-server !) | |
806 | { |
|
806 | { | |
807 | "objects": [ |
|
807 | "objects": [ | |
808 | { |
|
808 | { | |
809 | "actions": { (git-server !) |
|
809 | "actions": { (git-server !) | |
810 | "upload": { (git-server !) |
|
810 | "upload": { (git-server !) | |
811 | "expires_at": "$ISO_8601_DATE_TIME$" (git-server !) |
|
811 | "expires_at": "$ISO_8601_DATE_TIME$" (git-server !) | |
812 | "header": { (git-server !) |
|
812 | "header": { (git-server !) | |
813 | "Accept": "application/vnd.git-lfs" (git-server !) |
|
813 | "Accept": "application/vnd.git-lfs" (git-server !) | |
814 | } (git-server !) |
|
814 | } (git-server !) | |
815 | "href": "http://localhost:$HGPORT/objects/8e6ea5f6c066b44a0efa43bcce86aea73f17e6e23f0663df0251e7524e140a13" (git-server !) |
|
815 | "href": "http://localhost:$HGPORT/objects/8e6ea5f6c066b44a0efa43bcce86aea73f17e6e23f0663df0251e7524e140a13" (git-server !) | |
816 | } (git-server !) |
|
816 | } (git-server !) | |
817 | "error": { (hg-server !) |
|
817 | "error": { (hg-server !) | |
818 | "code": 404 (hg-server !) |
|
818 | "code": 404 (hg-server !) | |
819 | "message": "The object does not exist" (hg-server !) |
|
819 | "message": "The object does not exist" (hg-server !) | |
820 | } |
|
820 | } | |
821 | "oid": "8e6ea5f6c066b44a0efa43bcce86aea73f17e6e23f0663df0251e7524e140a13" |
|
821 | "oid": "8e6ea5f6c066b44a0efa43bcce86aea73f17e6e23f0663df0251e7524e140a13" | |
822 | "size": 6 |
|
822 | "size": 6 | |
823 | } |
|
823 | } | |
824 | ] |
|
824 | ] | |
825 | "transfer": "basic" (hg-server !) |
|
825 | "transfer": "basic" (hg-server !) | |
826 | } |
|
826 | } | |
827 | abort: LFS server error for "b": The object does not exist! |
|
827 | abort: LFS server error for "b": The object does not exist! | |
828 | [255] |
|
828 | [255] | |
829 |
|
829 | |||
830 | Check error message when object does not exist: |
|
830 | Check error message when object does not exist: | |
831 |
|
831 | |||
832 | $ cd $TESTTMP |
|
832 | $ cd $TESTTMP | |
833 | $ hg init test && cd test |
|
833 | $ hg init test && cd test | |
834 | $ echo "[extensions]" >> .hg/hgrc |
|
834 | $ echo "[extensions]" >> .hg/hgrc | |
835 | $ echo "lfs=" >> .hg/hgrc |
|
835 | $ echo "lfs=" >> .hg/hgrc | |
836 | $ echo "[lfs]" >> .hg/hgrc |
|
836 | $ echo "[lfs]" >> .hg/hgrc | |
837 | $ echo "threshold=1" >> .hg/hgrc |
|
837 | $ echo "threshold=1" >> .hg/hgrc | |
838 | $ echo a > a |
|
838 | $ echo a > a | |
839 | $ hg add a |
|
839 | $ hg add a | |
840 | $ hg commit -m 'test' |
|
840 | $ hg commit -m 'test' | |
841 | $ echo aaaaa > a |
|
841 | $ echo aaaaa > a | |
842 | $ hg commit -m 'largefile' |
|
842 | $ hg commit -m 'largefile' | |
843 | $ hg debugdata a 1 # verify this is no the file content but includes "oid", the LFS "pointer". |
|
843 | $ hg debugdata a 1 # verify this is no the file content but includes "oid", the LFS "pointer". | |
844 | version https://git-lfs.github.com/spec/v1 |
|
844 | version https://git-lfs.github.com/spec/v1 | |
845 | oid sha256:bdc26931acfb734b142a8d675f205becf27560dc461f501822de13274fe6fc8a |
|
845 | oid sha256:bdc26931acfb734b142a8d675f205becf27560dc461f501822de13274fe6fc8a | |
846 | size 6 |
|
846 | size 6 | |
847 | x-is-binary 0 |
|
847 | x-is-binary 0 | |
848 | $ cd .. |
|
848 | $ cd .. | |
849 | $ rm -rf `hg config lfs.usercache` |
|
849 | $ rm -rf `hg config lfs.usercache` | |
850 |
|
850 | |||
851 | (Restart the server in a different location so it no longer has the content) |
|
851 | (Restart the server in a different location so it no longer has the content) | |
852 |
|
852 | |||
853 | $ $PYTHON $RUNTESTDIR/killdaemons.py $DAEMON_PIDS |
|
853 | $ $PYTHON $RUNTESTDIR/killdaemons.py $DAEMON_PIDS | |
854 |
|
854 | |||
855 | #if hg-server |
|
855 | #if hg-server | |
856 | $ cat $TESTTMP/access.log $TESTTMP/errors.log |
|
856 | $ cat $TESTTMP/access.log $TESTTMP/errors.log | |
857 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) |
|
857 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) | |
858 | $LOCALIP - - [$LOGDATE$] "PUT /.hg/lfs/objects/31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b HTTP/1.1" 201 - (glob) |
|
858 | $LOCALIP - - [$LOGDATE$] "PUT /.hg/lfs/objects/31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b HTTP/1.1" 201 - (glob) | |
859 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) |
|
859 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) | |
860 | $LOCALIP - - [$LOGDATE$] "GET /.hg/lfs/objects/31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b HTTP/1.1" 200 - (glob) |
|
860 | $LOCALIP - - [$LOGDATE$] "GET /.hg/lfs/objects/31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b HTTP/1.1" 200 - (glob) | |
861 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) |
|
861 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) | |
862 | $LOCALIP - - [$LOGDATE$] "PUT /.hg/lfs/objects/37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 HTTP/1.1" 201 - (glob) |
|
862 | $LOCALIP - - [$LOGDATE$] "PUT /.hg/lfs/objects/37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 HTTP/1.1" 201 - (glob) | |
863 | $LOCALIP - - [$LOGDATE$] "PUT /.hg/lfs/objects/d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 HTTP/1.1" 201 - (glob) |
|
863 | $LOCALIP - - [$LOGDATE$] "PUT /.hg/lfs/objects/d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 HTTP/1.1" 201 - (glob) | |
864 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) |
|
864 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) | |
865 | $LOCALIP - - [$LOGDATE$] "GET /.hg/lfs/objects/37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 HTTP/1.1" 200 - (glob) |
|
865 | $LOCALIP - - [$LOGDATE$] "GET /.hg/lfs/objects/37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 HTTP/1.1" 200 - (glob) | |
866 | $LOCALIP - - [$LOGDATE$] "GET /.hg/lfs/objects/d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 HTTP/1.1" 200 - (glob) |
|
866 | $LOCALIP - - [$LOGDATE$] "GET /.hg/lfs/objects/d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 HTTP/1.1" 200 - (glob) | |
867 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) |
|
867 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) | |
868 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) |
|
868 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) | |
869 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) |
|
869 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) | |
870 | $LOCALIP - - [$LOGDATE$] "GET /.hg/lfs/objects/31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b HTTP/1.1" 200 - (glob) |
|
870 | $LOCALIP - - [$LOGDATE$] "GET /.hg/lfs/objects/31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b HTTP/1.1" 200 - (glob) | |
871 | $LOCALIP - - [$LOGDATE$] "GET /.hg/lfs/objects/37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 HTTP/1.1" 200 - (glob) |
|
871 | $LOCALIP - - [$LOGDATE$] "GET /.hg/lfs/objects/37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 HTTP/1.1" 200 - (glob) | |
872 | $LOCALIP - - [$LOGDATE$] "GET /.hg/lfs/objects/d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 HTTP/1.1" 200 - (glob) |
|
872 | $LOCALIP - - [$LOGDATE$] "GET /.hg/lfs/objects/d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 HTTP/1.1" 200 - (glob) | |
873 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) |
|
873 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) | |
874 | $LOCALIP - - [$LOGDATE$] "GET /.hg/lfs/objects/31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b HTTP/1.1" 200 - (glob) |
|
874 | $LOCALIP - - [$LOGDATE$] "GET /.hg/lfs/objects/31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b HTTP/1.1" 200 - (glob) | |
875 | $LOCALIP - - [$LOGDATE$] "GET /.hg/lfs/objects/d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 HTTP/1.1" 200 - (glob) |
|
875 | $LOCALIP - - [$LOGDATE$] "GET /.hg/lfs/objects/d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 HTTP/1.1" 200 - (glob) | |
876 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) |
|
876 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) | |
877 | $LOCALIP - - [$LOGDATE$] "GET /.hg/lfs/objects/31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b HTTP/1.1" 200 - (glob) |
|
877 | $LOCALIP - - [$LOGDATE$] "GET /.hg/lfs/objects/31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b HTTP/1.1" 200 - (glob) | |
878 | $LOCALIP - - [$LOGDATE$] "GET /.hg/lfs/objects/37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 HTTP/1.1" 200 - (glob) |
|
878 | $LOCALIP - - [$LOGDATE$] "GET /.hg/lfs/objects/37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 HTTP/1.1" 200 - (glob) | |
879 | $LOCALIP - - [$LOGDATE$] "GET /.hg/lfs/objects/d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 HTTP/1.1" 200 - (glob) |
|
879 | $LOCALIP - - [$LOGDATE$] "GET /.hg/lfs/objects/d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 HTTP/1.1" 200 - (glob) | |
880 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) |
|
880 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) | |
881 | #endif |
|
881 | #endif | |
882 |
|
882 | |||
883 | $ rm $DAEMON_PIDS |
|
|||
884 | $ mkdir $TESTTMP/lfs-server2 |
|
883 | $ mkdir $TESTTMP/lfs-server2 | |
885 | $ cd $TESTTMP/lfs-server2 |
|
884 | $ cd $TESTTMP/lfs-server2 | |
886 | #if no-windows git-server |
|
885 | #if no-windows git-server | |
887 | $ lfs-test-server &> lfs-server.log & |
|
886 | $ lfs-test-server &> lfs-server.log & | |
888 | $ echo $! >> $DAEMON_PIDS |
|
887 | $ echo $! >> $DAEMON_PIDS | |
889 | #endif |
|
888 | #endif | |
890 |
|
889 | |||
891 | #if windows git-server |
|
890 | #if windows git-server | |
892 | $ $PYTHON $TESTTMP/spawn.py >> $DAEMON_PIDS |
|
891 | $ $PYTHON $TESTTMP/spawn.py >> $DAEMON_PIDS | |
893 | #endif |
|
892 | #endif | |
894 |
|
893 | |||
895 | #if hg-server |
|
894 | #if hg-server | |
896 | $ hg init server2 |
|
895 | $ hg init server2 | |
897 | $ hg --config "lfs.usercache=$TESTTMP/servercache2" -R server2 serve -d \ |
|
896 | $ hg --config "lfs.usercache=$TESTTMP/servercache2" -R server2 serve -d \ | |
898 | > -p $HGPORT --pid-file=hg.pid -A $TESTTMP/access.log -E $TESTTMP/errors.log |
|
897 | > -p $HGPORT --pid-file=hg.pid -A $TESTTMP/access.log -E $TESTTMP/errors.log | |
899 | $ cat hg.pid >> $DAEMON_PIDS |
|
898 | $ cat hg.pid >> $DAEMON_PIDS | |
900 | #endif |
|
899 | #endif | |
901 |
|
900 | |||
902 | $ cd $TESTTMP |
|
901 | $ cd $TESTTMP | |
903 | $ hg --debug clone test test2 |
|
902 | $ hg --debug clone test test2 | |
904 | http auth: user foo, password *** |
|
903 | http auth: user foo, password *** | |
905 | linked 6 files |
|
904 | linked 6 files | |
906 | http auth: user foo, password *** |
|
905 | http auth: user foo, password *** | |
907 | updating to branch default |
|
906 | updating to branch default | |
908 | resolving manifests |
|
907 | resolving manifests | |
909 | branchmerge: False, force: False, partial: False |
|
908 | branchmerge: False, force: False, partial: False | |
910 | ancestor: 000000000000, local: 000000000000+, remote: d2a338f184a8 |
|
909 | ancestor: 000000000000, local: 000000000000+, remote: d2a338f184a8 | |
911 | http auth: user foo, password *** |
|
910 | http auth: user foo, password *** | |
912 | Status: 200 |
|
911 | Status: 200 | |
913 | Content-Length: 308 (git-server !) |
|
912 | Content-Length: 308 (git-server !) | |
914 | Content-Length: 186 (hg-server !) |
|
913 | Content-Length: 186 (hg-server !) | |
915 | Content-Type: application/vnd.git-lfs+json |
|
914 | Content-Type: application/vnd.git-lfs+json | |
916 | Date: $HTTP_DATE$ |
|
915 | Date: $HTTP_DATE$ | |
917 | Server: testing stub value (hg-server !) |
|
916 | Server: testing stub value (hg-server !) | |
918 | { |
|
917 | { | |
919 | "objects": [ |
|
918 | "objects": [ | |
920 | { |
|
919 | { | |
921 | "actions": { (git-server !) |
|
920 | "actions": { (git-server !) | |
922 | "upload": { (git-server !) |
|
921 | "upload": { (git-server !) | |
923 | "expires_at": "$ISO_8601_DATE_TIME$" (git-server !) |
|
922 | "expires_at": "$ISO_8601_DATE_TIME$" (git-server !) | |
924 | "header": { (git-server !) |
|
923 | "header": { (git-server !) | |
925 | "Accept": "application/vnd.git-lfs" (git-server !) |
|
924 | "Accept": "application/vnd.git-lfs" (git-server !) | |
926 | } (git-server !) |
|
925 | } (git-server !) | |
927 | "href": "http://localhost:$HGPORT/objects/bdc26931acfb734b142a8d675f205becf27560dc461f501822de13274fe6fc8a" (git-server !) |
|
926 | "href": "http://localhost:$HGPORT/objects/bdc26931acfb734b142a8d675f205becf27560dc461f501822de13274fe6fc8a" (git-server !) | |
928 | } (git-server !) |
|
927 | } (git-server !) | |
929 | "error": { (hg-server !) |
|
928 | "error": { (hg-server !) | |
930 | "code": 404 (hg-server !) |
|
929 | "code": 404 (hg-server !) | |
931 | "message": "The object does not exist" (hg-server !) |
|
930 | "message": "The object does not exist" (hg-server !) | |
932 | } |
|
931 | } | |
933 | "oid": "bdc26931acfb734b142a8d675f205becf27560dc461f501822de13274fe6fc8a" |
|
932 | "oid": "bdc26931acfb734b142a8d675f205becf27560dc461f501822de13274fe6fc8a" | |
934 | "size": 6 |
|
933 | "size": 6 | |
935 | } |
|
934 | } | |
936 | ] |
|
935 | ] | |
937 | "transfer": "basic" (hg-server !) |
|
936 | "transfer": "basic" (hg-server !) | |
938 | } |
|
937 | } | |
939 | abort: LFS server error for "a": The object does not exist! |
|
938 | abort: LFS server error for "a": The object does not exist! | |
940 | [255] |
|
939 | [255] | |
941 |
|
940 | |||
942 | $ $PYTHON $RUNTESTDIR/killdaemons.py $DAEMON_PIDS |
|
941 | $ $PYTHON $RUNTESTDIR/killdaemons.py $DAEMON_PIDS |
@@ -1,1618 +1,1618 b'' | |||||
1 | $ cat >> $HGRCPATH << EOF |
|
1 | $ cat >> $HGRCPATH << EOF | |
2 | > [phases] |
|
2 | > [phases] | |
3 | > # public changeset are not obsolete |
|
3 | > # public changeset are not obsolete | |
4 | > publish=false |
|
4 | > publish=false | |
5 | > [ui] |
|
5 | > [ui] | |
6 | > logtemplate="{rev}:{node|short} ({phase}{if(obsolete, ' *{obsolete}*')}{if(instabilities, ' {instabilities}')}) [{tags} {bookmarks}] {desc|firstline}{if(obsfate, " [{join(obsfate, "; ")}]")}\n" |
|
6 | > logtemplate="{rev}:{node|short} ({phase}{if(obsolete, ' *{obsolete}*')}{if(instabilities, ' {instabilities}')}) [{tags} {bookmarks}] {desc|firstline}{if(obsfate, " [{join(obsfate, "; ")}]")}\n" | |
7 | > EOF |
|
7 | > EOF | |
8 | $ mkcommit() { |
|
8 | $ mkcommit() { | |
9 | > echo "$1" > "$1" |
|
9 | > echo "$1" > "$1" | |
10 | > hg add "$1" |
|
10 | > hg add "$1" | |
11 | > hg ci -m "add $1" |
|
11 | > hg ci -m "add $1" | |
12 | > } |
|
12 | > } | |
13 | $ getid() { |
|
13 | $ getid() { | |
14 | > hg log -T "{node}\n" --hidden -r "desc('$1')" |
|
14 | > hg log -T "{node}\n" --hidden -r "desc('$1')" | |
15 | > } |
|
15 | > } | |
16 |
|
16 | |||
17 | $ cat > debugkeys.py <<EOF |
|
17 | $ cat > debugkeys.py <<EOF | |
18 | > def reposetup(ui, repo): |
|
18 | > def reposetup(ui, repo): | |
19 | > class debugkeysrepo(repo.__class__): |
|
19 | > class debugkeysrepo(repo.__class__): | |
20 | > def listkeys(self, namespace): |
|
20 | > def listkeys(self, namespace): | |
21 | > ui.write(b'listkeys %s\n' % (namespace,)) |
|
21 | > ui.write(b'listkeys %s\n' % (namespace,)) | |
22 | > return super(debugkeysrepo, self).listkeys(namespace) |
|
22 | > return super(debugkeysrepo, self).listkeys(namespace) | |
23 | > |
|
23 | > | |
24 | > if repo.local(): |
|
24 | > if repo.local(): | |
25 | > repo.__class__ = debugkeysrepo |
|
25 | > repo.__class__ = debugkeysrepo | |
26 | > EOF |
|
26 | > EOF | |
27 |
|
27 | |||
28 | $ hg init tmpa |
|
28 | $ hg init tmpa | |
29 | $ cd tmpa |
|
29 | $ cd tmpa | |
30 | $ mkcommit kill_me |
|
30 | $ mkcommit kill_me | |
31 |
|
31 | |||
32 | Checking that the feature is properly disabled |
|
32 | Checking that the feature is properly disabled | |
33 |
|
33 | |||
34 | $ hg debugobsolete -d '0 0' `getid kill_me` -u babar |
|
34 | $ hg debugobsolete -d '0 0' `getid kill_me` -u babar | |
35 | abort: creating obsolete markers is not enabled on this repo |
|
35 | abort: creating obsolete markers is not enabled on this repo | |
36 | [255] |
|
36 | [255] | |
37 |
|
37 | |||
38 | Enabling it |
|
38 | Enabling it | |
39 |
|
39 | |||
40 | $ cat >> $HGRCPATH << EOF |
|
40 | $ cat >> $HGRCPATH << EOF | |
41 | > [experimental] |
|
41 | > [experimental] | |
42 | > evolution=exchange |
|
42 | > evolution=exchange | |
43 | > evolution.createmarkers=True |
|
43 | > evolution.createmarkers=True | |
44 | > EOF |
|
44 | > EOF | |
45 |
|
45 | |||
46 | Killing a single changeset without replacement |
|
46 | Killing a single changeset without replacement | |
47 |
|
47 | |||
48 | $ hg debugobsolete 0 |
|
48 | $ hg debugobsolete 0 | |
49 | abort: changeset references must be full hexadecimal node identifiers |
|
49 | abort: changeset references must be full hexadecimal node identifiers | |
50 | [255] |
|
50 | [255] | |
51 | $ hg debugobsolete '00' |
|
51 | $ hg debugobsolete '00' | |
52 | abort: changeset references must be full hexadecimal node identifiers |
|
52 | abort: changeset references must be full hexadecimal node identifiers | |
53 | [255] |
|
53 | [255] | |
54 | $ hg debugobsolete -d '0 0' `getid kill_me` -u babar |
|
54 | $ hg debugobsolete -d '0 0' `getid kill_me` -u babar | |
55 | obsoleted 1 changesets |
|
55 | obsoleted 1 changesets | |
56 | $ hg debugobsolete |
|
56 | $ hg debugobsolete | |
57 | 97b7c2d76b1845ed3eb988cd612611e72406cef0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'babar'} |
|
57 | 97b7c2d76b1845ed3eb988cd612611e72406cef0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'babar'} | |
58 |
|
58 | |||
59 | (test that mercurial is not confused) |
|
59 | (test that mercurial is not confused) | |
60 |
|
60 | |||
61 | $ hg up null --quiet # having 0 as parent prevents it to be hidden |
|
61 | $ hg up null --quiet # having 0 as parent prevents it to be hidden | |
62 | $ hg tip |
|
62 | $ hg tip | |
63 | -1:000000000000 (public) [tip ] |
|
63 | -1:000000000000 (public) [tip ] | |
64 | $ hg up --hidden tip --quiet |
|
64 | $ hg up --hidden tip --quiet | |
65 | updating to a hidden changeset 97b7c2d76b18 |
|
65 | updating to a hidden changeset 97b7c2d76b18 | |
66 | (hidden revision '97b7c2d76b18' is pruned) |
|
66 | (hidden revision '97b7c2d76b18' is pruned) | |
67 |
|
67 | |||
68 | Killing a single changeset with itself should fail |
|
68 | Killing a single changeset with itself should fail | |
69 | (simple local safeguard) |
|
69 | (simple local safeguard) | |
70 |
|
70 | |||
71 | $ hg debugobsolete `getid kill_me` `getid kill_me` |
|
71 | $ hg debugobsolete `getid kill_me` `getid kill_me` | |
72 | abort: bad obsmarker input: in-marker cycle with 97b7c2d76b1845ed3eb988cd612611e72406cef0 |
|
72 | abort: bad obsmarker input: in-marker cycle with 97b7c2d76b1845ed3eb988cd612611e72406cef0 | |
73 | [255] |
|
73 | [255] | |
74 |
|
74 | |||
75 | $ cd .. |
|
75 | $ cd .. | |
76 |
|
76 | |||
77 | Killing a single changeset with replacement |
|
77 | Killing a single changeset with replacement | |
78 | (and testing the format option) |
|
78 | (and testing the format option) | |
79 |
|
79 | |||
80 | $ hg init tmpb |
|
80 | $ hg init tmpb | |
81 | $ cd tmpb |
|
81 | $ cd tmpb | |
82 | $ mkcommit a |
|
82 | $ mkcommit a | |
83 | $ mkcommit b |
|
83 | $ mkcommit b | |
84 | $ mkcommit original_c |
|
84 | $ mkcommit original_c | |
85 | $ hg up "desc('b')" |
|
85 | $ hg up "desc('b')" | |
86 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
86 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
87 | $ mkcommit new_c |
|
87 | $ mkcommit new_c | |
88 | created new head |
|
88 | created new head | |
89 | $ hg log -r 'hidden()' --template '{rev}:{node|short} {desc}\n' --hidden |
|
89 | $ hg log -r 'hidden()' --template '{rev}:{node|short} {desc}\n' --hidden | |
90 | $ hg debugobsolete --config format.obsstore-version=0 --flag 12 `getid original_c` `getid new_c` -d '121 120' |
|
90 | $ hg debugobsolete --config format.obsstore-version=0 --flag 12 `getid original_c` `getid new_c` -d '121 120' | |
91 | obsoleted 1 changesets |
|
91 | obsoleted 1 changesets | |
92 | $ hg log -r 'hidden()' --template '{rev}:{node|short} {desc}\n' --hidden |
|
92 | $ hg log -r 'hidden()' --template '{rev}:{node|short} {desc}\n' --hidden | |
93 | 2:245bde4270cd add original_c |
|
93 | 2:245bde4270cd add original_c | |
94 | $ hg debugrevlog -cd |
|
94 | $ hg debugrevlog -cd | |
95 | # rev p1rev p2rev start end deltastart base p1 p2 rawsize totalsize compression heads chainlen |
|
95 | # rev p1rev p2rev start end deltastart base p1 p2 rawsize totalsize compression heads chainlen | |
96 | 0 -1 -1 0 59 0 0 0 0 58 58 0 1 0 |
|
96 | 0 -1 -1 0 59 0 0 0 0 58 58 0 1 0 | |
97 | 1 0 -1 59 118 59 59 0 0 58 116 0 1 0 |
|
97 | 1 0 -1 59 118 59 59 0 0 58 116 0 1 0 | |
98 | 2 1 -1 118 193 118 118 59 0 76 192 0 1 0 |
|
98 | 2 1 -1 118 193 118 118 59 0 76 192 0 1 0 | |
99 | 3 1 -1 193 260 193 193 59 0 66 258 0 2 0 |
|
99 | 3 1 -1 193 260 193 193 59 0 66 258 0 2 0 | |
100 | $ hg debugobsolete |
|
100 | $ hg debugobsolete | |
101 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
101 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} | |
102 |
|
102 | |||
103 | (check for version number of the obsstore) |
|
103 | (check for version number of the obsstore) | |
104 |
|
104 | |||
105 | $ dd bs=1 count=1 if=.hg/store/obsstore 2>/dev/null |
|
105 | $ dd bs=1 count=1 if=.hg/store/obsstore 2>/dev/null | |
106 | \x00 (no-eol) (esc) |
|
106 | \x00 (no-eol) (esc) | |
107 |
|
107 | |||
108 | do it again (it read the obsstore before adding new changeset) |
|
108 | do it again (it read the obsstore before adding new changeset) | |
109 |
|
109 | |||
110 | $ hg up '.^' |
|
110 | $ hg up '.^' | |
111 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
111 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
112 | $ mkcommit new_2_c |
|
112 | $ mkcommit new_2_c | |
113 | created new head |
|
113 | created new head | |
114 | $ hg debugobsolete -d '1337 0' `getid new_c` `getid new_2_c` |
|
114 | $ hg debugobsolete -d '1337 0' `getid new_c` `getid new_2_c` | |
115 | obsoleted 1 changesets |
|
115 | obsoleted 1 changesets | |
116 | $ hg debugobsolete |
|
116 | $ hg debugobsolete | |
117 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
117 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} | |
118 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
118 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} | |
119 |
|
119 | |||
120 | Register two markers with a missing node |
|
120 | Register two markers with a missing node | |
121 |
|
121 | |||
122 | $ hg up '.^' |
|
122 | $ hg up '.^' | |
123 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
123 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
124 | $ mkcommit new_3_c |
|
124 | $ mkcommit new_3_c | |
125 | created new head |
|
125 | created new head | |
126 | $ hg debugobsolete -d '1338 0' `getid new_2_c` 1337133713371337133713371337133713371337 |
|
126 | $ hg debugobsolete -d '1338 0' `getid new_2_c` 1337133713371337133713371337133713371337 | |
127 | obsoleted 1 changesets |
|
127 | obsoleted 1 changesets | |
128 | $ hg debugobsolete -d '1339 0' 1337133713371337133713371337133713371337 `getid new_3_c` |
|
128 | $ hg debugobsolete -d '1339 0' 1337133713371337133713371337133713371337 `getid new_3_c` | |
129 | $ hg debugobsolete |
|
129 | $ hg debugobsolete | |
130 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
130 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} | |
131 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
131 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} | |
132 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
132 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} | |
133 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
133 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} | |
134 |
|
134 | |||
135 | Test the --index option of debugobsolete command |
|
135 | Test the --index option of debugobsolete command | |
136 | $ hg debugobsolete --index |
|
136 | $ hg debugobsolete --index | |
137 | 0 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
137 | 0 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} | |
138 | 1 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
138 | 1 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} | |
139 | 2 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
139 | 2 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} | |
140 | 3 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
140 | 3 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} | |
141 |
|
141 | |||
142 | Refuse pathological nullid successors |
|
142 | Refuse pathological nullid successors | |
143 | $ hg debugobsolete -d '9001 0' 1337133713371337133713371337133713371337 0000000000000000000000000000000000000000 |
|
143 | $ hg debugobsolete -d '9001 0' 1337133713371337133713371337133713371337 0000000000000000000000000000000000000000 | |
144 | transaction abort! |
|
144 | transaction abort! | |
145 | rollback completed |
|
145 | rollback completed | |
146 | abort: bad obsolescence marker detected: invalid successors nullid |
|
146 | abort: bad obsolescence marker detected: invalid successors nullid | |
147 | [255] |
|
147 | [255] | |
148 |
|
148 | |||
149 | Check that graphlog detect that a changeset is obsolete: |
|
149 | Check that graphlog detect that a changeset is obsolete: | |
150 |
|
150 | |||
151 | $ hg log -G |
|
151 | $ hg log -G | |
152 | @ 5:5601fb93a350 (draft) [tip ] add new_3_c |
|
152 | @ 5:5601fb93a350 (draft) [tip ] add new_3_c | |
153 | | |
|
153 | | | |
154 | o 1:7c3bad9141dc (draft) [ ] add b |
|
154 | o 1:7c3bad9141dc (draft) [ ] add b | |
155 | | |
|
155 | | | |
156 | o 0:1f0dee641bb7 (draft) [ ] add a |
|
156 | o 0:1f0dee641bb7 (draft) [ ] add a | |
157 |
|
157 | |||
158 |
|
158 | |||
159 | check that heads does not report them |
|
159 | check that heads does not report them | |
160 |
|
160 | |||
161 | $ hg heads |
|
161 | $ hg heads | |
162 | 5:5601fb93a350 (draft) [tip ] add new_3_c |
|
162 | 5:5601fb93a350 (draft) [tip ] add new_3_c | |
163 | $ hg heads --hidden |
|
163 | $ hg heads --hidden | |
164 | 5:5601fb93a350 (draft) [tip ] add new_3_c |
|
164 | 5:5601fb93a350 (draft) [tip ] add new_3_c | |
165 | 4:ca819180edb9 (draft *obsolete*) [ ] add new_2_c [rewritten as 5:5601fb93a350] |
|
165 | 4:ca819180edb9 (draft *obsolete*) [ ] add new_2_c [rewritten as 5:5601fb93a350] | |
166 | 3:cdbce2fbb163 (draft *obsolete*) [ ] add new_c [rewritten as 4:ca819180edb9] |
|
166 | 3:cdbce2fbb163 (draft *obsolete*) [ ] add new_c [rewritten as 4:ca819180edb9] | |
167 | 2:245bde4270cd (draft *obsolete*) [ ] add original_c [rewritten as 3:cdbce2fbb163] |
|
167 | 2:245bde4270cd (draft *obsolete*) [ ] add original_c [rewritten as 3:cdbce2fbb163] | |
168 |
|
168 | |||
169 |
|
169 | |||
170 | check that summary does not report them |
|
170 | check that summary does not report them | |
171 |
|
171 | |||
172 | $ hg init ../sink |
|
172 | $ hg init ../sink | |
173 | $ echo '[paths]' >> .hg/hgrc |
|
173 | $ echo '[paths]' >> .hg/hgrc | |
174 | $ echo 'default=../sink' >> .hg/hgrc |
|
174 | $ echo 'default=../sink' >> .hg/hgrc | |
175 | $ hg summary --remote |
|
175 | $ hg summary --remote | |
176 | parent: 5:5601fb93a350 tip |
|
176 | parent: 5:5601fb93a350 tip | |
177 | add new_3_c |
|
177 | add new_3_c | |
178 | branch: default |
|
178 | branch: default | |
179 | commit: (clean) |
|
179 | commit: (clean) | |
180 | update: (current) |
|
180 | update: (current) | |
181 | phases: 3 draft |
|
181 | phases: 3 draft | |
182 | remote: 3 outgoing |
|
182 | remote: 3 outgoing | |
183 |
|
183 | |||
184 | $ hg summary --remote --hidden |
|
184 | $ hg summary --remote --hidden | |
185 | parent: 5:5601fb93a350 tip |
|
185 | parent: 5:5601fb93a350 tip | |
186 | add new_3_c |
|
186 | add new_3_c | |
187 | branch: default |
|
187 | branch: default | |
188 | commit: (clean) |
|
188 | commit: (clean) | |
189 | update: 3 new changesets, 4 branch heads (merge) |
|
189 | update: 3 new changesets, 4 branch heads (merge) | |
190 | phases: 6 draft |
|
190 | phases: 6 draft | |
191 | remote: 3 outgoing |
|
191 | remote: 3 outgoing | |
192 |
|
192 | |||
193 | check that various commands work well with filtering |
|
193 | check that various commands work well with filtering | |
194 |
|
194 | |||
195 | $ hg tip |
|
195 | $ hg tip | |
196 | 5:5601fb93a350 (draft) [tip ] add new_3_c |
|
196 | 5:5601fb93a350 (draft) [tip ] add new_3_c | |
197 | $ hg log -r 6 |
|
197 | $ hg log -r 6 | |
198 | abort: unknown revision '6'! |
|
198 | abort: unknown revision '6'! | |
199 | [255] |
|
199 | [255] | |
200 | $ hg log -r 4 |
|
200 | $ hg log -r 4 | |
201 | abort: hidden revision '4' was rewritten as: 5601fb93a350! |
|
201 | abort: hidden revision '4' was rewritten as: 5601fb93a350! | |
202 | (use --hidden to access hidden revisions) |
|
202 | (use --hidden to access hidden revisions) | |
203 | [255] |
|
203 | [255] | |
204 | $ hg debugrevspec 'rev(6)' |
|
204 | $ hg debugrevspec 'rev(6)' | |
205 | $ hg debugrevspec 'rev(4)' |
|
205 | $ hg debugrevspec 'rev(4)' | |
206 | $ hg debugrevspec 'null' |
|
206 | $ hg debugrevspec 'null' | |
207 | -1 |
|
207 | -1 | |
208 |
|
208 | |||
209 | Check that public changeset are not accounted as obsolete: |
|
209 | Check that public changeset are not accounted as obsolete: | |
210 |
|
210 | |||
211 | $ hg --hidden phase --public 2 |
|
211 | $ hg --hidden phase --public 2 | |
212 | 1 new phase-divergent changesets |
|
212 | 1 new phase-divergent changesets | |
213 | $ hg log -G |
|
213 | $ hg log -G | |
214 | @ 5:5601fb93a350 (draft phase-divergent) [tip ] add new_3_c |
|
214 | @ 5:5601fb93a350 (draft phase-divergent) [tip ] add new_3_c | |
215 | | |
|
215 | | | |
216 | | o 2:245bde4270cd (public) [ ] add original_c |
|
216 | | o 2:245bde4270cd (public) [ ] add original_c | |
217 | |/ |
|
217 | |/ | |
218 | o 1:7c3bad9141dc (public) [ ] add b |
|
218 | o 1:7c3bad9141dc (public) [ ] add b | |
219 | | |
|
219 | | | |
220 | o 0:1f0dee641bb7 (public) [ ] add a |
|
220 | o 0:1f0dee641bb7 (public) [ ] add a | |
221 |
|
221 | |||
222 |
|
222 | |||
223 | And that bumped changeset are detected |
|
223 | And that bumped changeset are detected | |
224 | -------------------------------------- |
|
224 | -------------------------------------- | |
225 |
|
225 | |||
226 | If we didn't filtered obsolete changesets out, 3 and 4 would show up too. Also |
|
226 | If we didn't filtered obsolete changesets out, 3 and 4 would show up too. Also | |
227 | note that the bumped changeset (5:5601fb93a350) is not a direct successor of |
|
227 | note that the bumped changeset (5:5601fb93a350) is not a direct successor of | |
228 | the public changeset |
|
228 | the public changeset | |
229 |
|
229 | |||
230 | $ hg log --hidden -r 'phasedivergent()' |
|
230 | $ hg log --hidden -r 'phasedivergent()' | |
231 | 5:5601fb93a350 (draft phase-divergent) [tip ] add new_3_c |
|
231 | 5:5601fb93a350 (draft phase-divergent) [tip ] add new_3_c | |
232 |
|
232 | |||
233 | And that we can't push bumped changeset |
|
233 | And that we can't push bumped changeset | |
234 |
|
234 | |||
235 | $ hg push ../tmpa -r 0 --force #(make repo related) |
|
235 | $ hg push ../tmpa -r 0 --force #(make repo related) | |
236 | pushing to ../tmpa |
|
236 | pushing to ../tmpa | |
237 | searching for changes |
|
237 | searching for changes | |
238 | warning: repository is unrelated |
|
238 | warning: repository is unrelated | |
239 | adding changesets |
|
239 | adding changesets | |
240 | adding manifests |
|
240 | adding manifests | |
241 | adding file changes |
|
241 | adding file changes | |
242 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
242 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
243 | $ hg push ../tmpa |
|
243 | $ hg push ../tmpa | |
244 | pushing to ../tmpa |
|
244 | pushing to ../tmpa | |
245 | searching for changes |
|
245 | searching for changes | |
246 | abort: push includes phase-divergent changeset: 5601fb93a350! |
|
246 | abort: push includes phase-divergent changeset: 5601fb93a350! | |
247 | [255] |
|
247 | [255] | |
248 |
|
248 | |||
249 | Fixing "bumped" situation |
|
249 | Fixing "bumped" situation | |
250 | We need to create a clone of 5 and add a special marker with a flag |
|
250 | We need to create a clone of 5 and add a special marker with a flag | |
251 |
|
251 | |||
252 | $ hg summary |
|
252 | $ hg summary | |
253 | parent: 5:5601fb93a350 tip (phase-divergent) |
|
253 | parent: 5:5601fb93a350 tip (phase-divergent) | |
254 | add new_3_c |
|
254 | add new_3_c | |
255 | branch: default |
|
255 | branch: default | |
256 | commit: (clean) |
|
256 | commit: (clean) | |
257 | update: 1 new changesets, 2 branch heads (merge) |
|
257 | update: 1 new changesets, 2 branch heads (merge) | |
258 | phases: 1 draft |
|
258 | phases: 1 draft | |
259 | phase-divergent: 1 changesets |
|
259 | phase-divergent: 1 changesets | |
260 | $ hg up '5^' |
|
260 | $ hg up '5^' | |
261 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
261 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
262 | $ hg revert -ar 5 |
|
262 | $ hg revert -ar 5 | |
263 | adding new_3_c |
|
263 | adding new_3_c | |
264 | $ hg ci -m 'add n3w_3_c' |
|
264 | $ hg ci -m 'add n3w_3_c' | |
265 | created new head |
|
265 | created new head | |
266 | $ hg debugobsolete -d '1338 0' --flags 1 `getid new_3_c` `getid n3w_3_c` |
|
266 | $ hg debugobsolete -d '1338 0' --flags 1 `getid new_3_c` `getid n3w_3_c` | |
267 | obsoleted 1 changesets |
|
267 | obsoleted 1 changesets | |
268 | $ hg log -r 'phasedivergent()' |
|
268 | $ hg log -r 'phasedivergent()' | |
269 | $ hg log -G |
|
269 | $ hg log -G | |
270 | @ 6:6f9641995072 (draft) [tip ] add n3w_3_c |
|
270 | @ 6:6f9641995072 (draft) [tip ] add n3w_3_c | |
271 | | |
|
271 | | | |
272 | | o 2:245bde4270cd (public) [ ] add original_c |
|
272 | | o 2:245bde4270cd (public) [ ] add original_c | |
273 | |/ |
|
273 | |/ | |
274 | o 1:7c3bad9141dc (public) [ ] add b |
|
274 | o 1:7c3bad9141dc (public) [ ] add b | |
275 | | |
|
275 | | | |
276 | o 0:1f0dee641bb7 (public) [ ] add a |
|
276 | o 0:1f0dee641bb7 (public) [ ] add a | |
277 |
|
277 | |||
278 |
|
278 | |||
279 | Basic exclusive testing |
|
279 | Basic exclusive testing | |
280 |
|
280 | |||
281 | $ hg log -G --hidden |
|
281 | $ hg log -G --hidden | |
282 | @ 6:6f9641995072 (draft) [tip ] add n3w_3_c |
|
282 | @ 6:6f9641995072 (draft) [tip ] add n3w_3_c | |
283 | | |
|
283 | | | |
284 | | x 5:5601fb93a350 (draft *obsolete*) [ ] add new_3_c [rewritten as 6:6f9641995072] |
|
284 | | x 5:5601fb93a350 (draft *obsolete*) [ ] add new_3_c [rewritten as 6:6f9641995072] | |
285 | |/ |
|
285 | |/ | |
286 | | x 4:ca819180edb9 (draft *obsolete*) [ ] add new_2_c [rewritten as 5:5601fb93a350] |
|
286 | | x 4:ca819180edb9 (draft *obsolete*) [ ] add new_2_c [rewritten as 5:5601fb93a350] | |
287 | |/ |
|
287 | |/ | |
288 | | x 3:cdbce2fbb163 (draft *obsolete*) [ ] add new_c [rewritten as 4:ca819180edb9] |
|
288 | | x 3:cdbce2fbb163 (draft *obsolete*) [ ] add new_c [rewritten as 4:ca819180edb9] | |
289 | |/ |
|
289 | |/ | |
290 | | o 2:245bde4270cd (public) [ ] add original_c |
|
290 | | o 2:245bde4270cd (public) [ ] add original_c | |
291 | |/ |
|
291 | |/ | |
292 | o 1:7c3bad9141dc (public) [ ] add b |
|
292 | o 1:7c3bad9141dc (public) [ ] add b | |
293 | | |
|
293 | | | |
294 | o 0:1f0dee641bb7 (public) [ ] add a |
|
294 | o 0:1f0dee641bb7 (public) [ ] add a | |
295 |
|
295 | |||
296 | $ hg debugobsolete --rev 6f9641995072 |
|
296 | $ hg debugobsolete --rev 6f9641995072 | |
297 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
297 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} | |
298 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
298 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} | |
299 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
299 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} | |
300 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
300 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} | |
301 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
301 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} | |
302 | $ hg debugobsolete --rev 6f9641995072 --exclusive |
|
302 | $ hg debugobsolete --rev 6f9641995072 --exclusive | |
303 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
303 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} | |
304 | $ hg debugobsolete --rev 5601fb93a350 --hidden |
|
304 | $ hg debugobsolete --rev 5601fb93a350 --hidden | |
305 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
305 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} | |
306 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
306 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} | |
307 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
307 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} | |
308 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
308 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} | |
309 | $ hg debugobsolete --rev 5601fb93a350 --hidden --exclusive |
|
309 | $ hg debugobsolete --rev 5601fb93a350 --hidden --exclusive | |
310 | $ hg debugobsolete --rev 5601fb93a350+6f9641995072 --hidden --exclusive |
|
310 | $ hg debugobsolete --rev 5601fb93a350+6f9641995072 --hidden --exclusive | |
311 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
311 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} | |
312 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
312 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} | |
313 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
313 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} | |
314 |
|
314 | |||
315 | $ cd .. |
|
315 | $ cd .. | |
316 |
|
316 | |||
317 | Revision 0 is hidden |
|
317 | Revision 0 is hidden | |
318 | -------------------- |
|
318 | -------------------- | |
319 |
|
319 | |||
320 | $ hg init rev0hidden |
|
320 | $ hg init rev0hidden | |
321 | $ cd rev0hidden |
|
321 | $ cd rev0hidden | |
322 |
|
322 | |||
323 | $ mkcommit kill0 |
|
323 | $ mkcommit kill0 | |
324 | $ hg up -q null |
|
324 | $ hg up -q null | |
325 | $ hg debugobsolete `getid kill0` |
|
325 | $ hg debugobsolete `getid kill0` | |
326 | obsoleted 1 changesets |
|
326 | obsoleted 1 changesets | |
327 | $ mkcommit a |
|
327 | $ mkcommit a | |
328 | $ mkcommit b |
|
328 | $ mkcommit b | |
329 |
|
329 | |||
330 | Should pick the first visible revision as "repo" node |
|
330 | Should pick the first visible revision as "repo" node | |
331 |
|
331 | |||
332 | $ hg archive ../archive-null |
|
332 | $ hg archive ../archive-null | |
333 | $ cat ../archive-null/.hg_archival.txt |
|
333 | $ cat ../archive-null/.hg_archival.txt | |
334 | repo: 1f0dee641bb7258c56bd60e93edfa2405381c41e |
|
334 | repo: 1f0dee641bb7258c56bd60e93edfa2405381c41e | |
335 | node: 7c3bad9141dcb46ff89abf5f61856facd56e476c |
|
335 | node: 7c3bad9141dcb46ff89abf5f61856facd56e476c | |
336 | branch: default |
|
336 | branch: default | |
337 | latesttag: null |
|
337 | latesttag: null | |
338 | latesttagdistance: 2 |
|
338 | latesttagdistance: 2 | |
339 | changessincelatesttag: 2 |
|
339 | changessincelatesttag: 2 | |
340 |
|
340 | |||
341 |
|
341 | |||
342 | $ cd .. |
|
342 | $ cd .. | |
343 |
|
343 | |||
344 | Can disable transaction summary report |
|
344 | Can disable transaction summary report | |
345 |
|
345 | |||
346 | $ hg init transaction-summary |
|
346 | $ hg init transaction-summary | |
347 | $ cd transaction-summary |
|
347 | $ cd transaction-summary | |
348 | $ mkcommit a |
|
348 | $ mkcommit a | |
349 | $ mkcommit b |
|
349 | $ mkcommit b | |
350 | $ hg up -q null |
|
350 | $ hg up -q null | |
351 | $ hg --config experimental.evolution.report-instabilities=false debugobsolete `getid a` |
|
351 | $ hg --config experimental.evolution.report-instabilities=false debugobsolete `getid a` | |
352 | obsoleted 1 changesets |
|
352 | obsoleted 1 changesets | |
353 | $ cd .. |
|
353 | $ cd .. | |
354 |
|
354 | |||
355 | Exchange Test |
|
355 | Exchange Test | |
356 | ============================ |
|
356 | ============================ | |
357 |
|
357 | |||
358 | Destination repo does not have any data |
|
358 | Destination repo does not have any data | |
359 | --------------------------------------- |
|
359 | --------------------------------------- | |
360 |
|
360 | |||
361 | Simple incoming test |
|
361 | Simple incoming test | |
362 |
|
362 | |||
363 | $ hg init tmpc |
|
363 | $ hg init tmpc | |
364 | $ cd tmpc |
|
364 | $ cd tmpc | |
365 | $ hg incoming ../tmpb |
|
365 | $ hg incoming ../tmpb | |
366 | comparing with ../tmpb |
|
366 | comparing with ../tmpb | |
367 | 0:1f0dee641bb7 (public) [ ] add a |
|
367 | 0:1f0dee641bb7 (public) [ ] add a | |
368 | 1:7c3bad9141dc (public) [ ] add b |
|
368 | 1:7c3bad9141dc (public) [ ] add b | |
369 | 2:245bde4270cd (public) [ ] add original_c |
|
369 | 2:245bde4270cd (public) [ ] add original_c | |
370 | 6:6f9641995072 (draft) [tip ] add n3w_3_c |
|
370 | 6:6f9641995072 (draft) [tip ] add n3w_3_c | |
371 |
|
371 | |||
372 | Try to pull markers |
|
372 | Try to pull markers | |
373 | (extinct changeset are excluded but marker are pushed) |
|
373 | (extinct changeset are excluded but marker are pushed) | |
374 |
|
374 | |||
375 | $ hg pull ../tmpb |
|
375 | $ hg pull ../tmpb | |
376 | pulling from ../tmpb |
|
376 | pulling from ../tmpb | |
377 | requesting all changes |
|
377 | requesting all changes | |
378 | adding changesets |
|
378 | adding changesets | |
379 | adding manifests |
|
379 | adding manifests | |
380 | adding file changes |
|
380 | adding file changes | |
381 | added 4 changesets with 4 changes to 4 files (+1 heads) |
|
381 | added 4 changesets with 4 changes to 4 files (+1 heads) | |
382 | 5 new obsolescence markers |
|
382 | 5 new obsolescence markers | |
383 | new changesets 1f0dee641bb7:6f9641995072 |
|
383 | new changesets 1f0dee641bb7:6f9641995072 | |
384 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
384 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
385 | $ hg debugobsolete |
|
385 | $ hg debugobsolete | |
386 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
386 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} | |
387 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
387 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} | |
388 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
388 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} | |
389 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
389 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} | |
390 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
390 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} | |
391 |
|
391 | |||
392 | Rollback//Transaction support |
|
392 | Rollback//Transaction support | |
393 |
|
393 | |||
394 | $ hg debugobsolete -d '1340 0' aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb |
|
394 | $ hg debugobsolete -d '1340 0' aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb | |
395 | $ hg debugobsolete |
|
395 | $ hg debugobsolete | |
396 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
396 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} | |
397 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
397 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} | |
398 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
398 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} | |
399 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
399 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} | |
400 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
400 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} | |
401 | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 0 (Thu Jan 01 00:22:20 1970 +0000) {'user': 'test'} |
|
401 | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 0 (Thu Jan 01 00:22:20 1970 +0000) {'user': 'test'} | |
402 | $ hg rollback -n |
|
402 | $ hg rollback -n | |
403 | repository tip rolled back to revision 3 (undo debugobsolete) |
|
403 | repository tip rolled back to revision 3 (undo debugobsolete) | |
404 | $ hg rollback |
|
404 | $ hg rollback | |
405 | repository tip rolled back to revision 3 (undo debugobsolete) |
|
405 | repository tip rolled back to revision 3 (undo debugobsolete) | |
406 | $ hg debugobsolete |
|
406 | $ hg debugobsolete | |
407 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
407 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} | |
408 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
408 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} | |
409 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
409 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} | |
410 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
410 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} | |
411 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
411 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} | |
412 |
|
412 | |||
413 | $ cd .. |
|
413 | $ cd .. | |
414 |
|
414 | |||
415 | Try to push markers |
|
415 | Try to push markers | |
416 |
|
416 | |||
417 | $ hg init tmpd |
|
417 | $ hg init tmpd | |
418 | $ hg -R tmpb push tmpd |
|
418 | $ hg -R tmpb push tmpd | |
419 | pushing to tmpd |
|
419 | pushing to tmpd | |
420 | searching for changes |
|
420 | searching for changes | |
421 | adding changesets |
|
421 | adding changesets | |
422 | adding manifests |
|
422 | adding manifests | |
423 | adding file changes |
|
423 | adding file changes | |
424 | added 4 changesets with 4 changes to 4 files (+1 heads) |
|
424 | added 4 changesets with 4 changes to 4 files (+1 heads) | |
425 | 5 new obsolescence markers |
|
425 | 5 new obsolescence markers | |
426 | $ hg -R tmpd debugobsolete | sort |
|
426 | $ hg -R tmpd debugobsolete | sort | |
427 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
427 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} | |
428 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
428 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} | |
429 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
429 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} | |
430 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
430 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} | |
431 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
431 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} | |
432 |
|
432 | |||
433 | Check obsolete keys are exchanged only if source has an obsolete store |
|
433 | Check obsolete keys are exchanged only if source has an obsolete store | |
434 |
|
434 | |||
435 | $ hg init empty |
|
435 | $ hg init empty | |
436 | $ hg --config extensions.debugkeys=debugkeys.py -R empty push tmpd |
|
436 | $ hg --config extensions.debugkeys=debugkeys.py -R empty push tmpd | |
437 | pushing to tmpd |
|
437 | pushing to tmpd | |
438 | listkeys phases |
|
438 | listkeys phases | |
439 | listkeys bookmarks |
|
439 | listkeys bookmarks | |
440 | no changes found |
|
440 | no changes found | |
441 | listkeys phases |
|
441 | listkeys phases | |
442 | [1] |
|
442 | [1] | |
443 |
|
443 | |||
444 | clone support |
|
444 | clone support | |
445 | (markers are copied and extinct changesets are included to allow hardlinks) |
|
445 | (markers are copied and extinct changesets are included to allow hardlinks) | |
446 |
|
446 | |||
447 | $ hg clone tmpb clone-dest |
|
447 | $ hg clone tmpb clone-dest | |
448 | updating to branch default |
|
448 | updating to branch default | |
449 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
449 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
450 | $ hg -R clone-dest log -G --hidden |
|
450 | $ hg -R clone-dest log -G --hidden | |
451 | @ 6:6f9641995072 (draft) [tip ] add n3w_3_c |
|
451 | @ 6:6f9641995072 (draft) [tip ] add n3w_3_c | |
452 | | |
|
452 | | | |
453 | | x 5:5601fb93a350 (draft *obsolete*) [ ] add new_3_c [rewritten as 6:6f9641995072] |
|
453 | | x 5:5601fb93a350 (draft *obsolete*) [ ] add new_3_c [rewritten as 6:6f9641995072] | |
454 | |/ |
|
454 | |/ | |
455 | | x 4:ca819180edb9 (draft *obsolete*) [ ] add new_2_c [rewritten as 5:5601fb93a350] |
|
455 | | x 4:ca819180edb9 (draft *obsolete*) [ ] add new_2_c [rewritten as 5:5601fb93a350] | |
456 | |/ |
|
456 | |/ | |
457 | | x 3:cdbce2fbb163 (draft *obsolete*) [ ] add new_c [rewritten as 4:ca819180edb9] |
|
457 | | x 3:cdbce2fbb163 (draft *obsolete*) [ ] add new_c [rewritten as 4:ca819180edb9] | |
458 | |/ |
|
458 | |/ | |
459 | | o 2:245bde4270cd (public) [ ] add original_c |
|
459 | | o 2:245bde4270cd (public) [ ] add original_c | |
460 | |/ |
|
460 | |/ | |
461 | o 1:7c3bad9141dc (public) [ ] add b |
|
461 | o 1:7c3bad9141dc (public) [ ] add b | |
462 | | |
|
462 | | | |
463 | o 0:1f0dee641bb7 (public) [ ] add a |
|
463 | o 0:1f0dee641bb7 (public) [ ] add a | |
464 |
|
464 | |||
465 | $ hg -R clone-dest debugobsolete |
|
465 | $ hg -R clone-dest debugobsolete | |
466 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
466 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} | |
467 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
467 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} | |
468 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
468 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} | |
469 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
469 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} | |
470 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
470 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} | |
471 |
|
471 | |||
472 |
|
472 | |||
473 | Destination repo have existing data |
|
473 | Destination repo have existing data | |
474 | --------------------------------------- |
|
474 | --------------------------------------- | |
475 |
|
475 | |||
476 | On pull |
|
476 | On pull | |
477 |
|
477 | |||
478 | $ hg init tmpe |
|
478 | $ hg init tmpe | |
479 | $ cd tmpe |
|
479 | $ cd tmpe | |
480 | $ hg debugobsolete -d '1339 0' 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 |
|
480 | $ hg debugobsolete -d '1339 0' 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 | |
481 | $ hg pull ../tmpb |
|
481 | $ hg pull ../tmpb | |
482 | pulling from ../tmpb |
|
482 | pulling from ../tmpb | |
483 | requesting all changes |
|
483 | requesting all changes | |
484 | adding changesets |
|
484 | adding changesets | |
485 | adding manifests |
|
485 | adding manifests | |
486 | adding file changes |
|
486 | adding file changes | |
487 | added 4 changesets with 4 changes to 4 files (+1 heads) |
|
487 | added 4 changesets with 4 changes to 4 files (+1 heads) | |
488 | 5 new obsolescence markers |
|
488 | 5 new obsolescence markers | |
489 | new changesets 1f0dee641bb7:6f9641995072 |
|
489 | new changesets 1f0dee641bb7:6f9641995072 | |
490 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
490 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
491 | $ hg debugobsolete |
|
491 | $ hg debugobsolete | |
492 | 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
492 | 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} | |
493 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
493 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} | |
494 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
494 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} | |
495 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
495 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} | |
496 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
496 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} | |
497 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
497 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} | |
498 |
|
498 | |||
499 |
|
499 | |||
500 | On push |
|
500 | On push | |
501 |
|
501 | |||
502 | $ hg push ../tmpc |
|
502 | $ hg push ../tmpc | |
503 | pushing to ../tmpc |
|
503 | pushing to ../tmpc | |
504 | searching for changes |
|
504 | searching for changes | |
505 | no changes found |
|
505 | no changes found | |
506 | 1 new obsolescence markers |
|
506 | 1 new obsolescence markers | |
507 | [1] |
|
507 | [1] | |
508 | $ hg -R ../tmpc debugobsolete |
|
508 | $ hg -R ../tmpc debugobsolete | |
509 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
509 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} | |
510 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
510 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} | |
511 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
511 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} | |
512 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
512 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} | |
513 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
513 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} | |
514 | 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
514 | 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} | |
515 |
|
515 | |||
516 | detect outgoing obsolete and unstable |
|
516 | detect outgoing obsolete and unstable | |
517 | --------------------------------------- |
|
517 | --------------------------------------- | |
518 |
|
518 | |||
519 |
|
519 | |||
520 | $ hg log -G |
|
520 | $ hg log -G | |
521 | o 3:6f9641995072 (draft) [tip ] add n3w_3_c |
|
521 | o 3:6f9641995072 (draft) [tip ] add n3w_3_c | |
522 | | |
|
522 | | | |
523 | | o 2:245bde4270cd (public) [ ] add original_c |
|
523 | | o 2:245bde4270cd (public) [ ] add original_c | |
524 | |/ |
|
524 | |/ | |
525 | o 1:7c3bad9141dc (public) [ ] add b |
|
525 | o 1:7c3bad9141dc (public) [ ] add b | |
526 | | |
|
526 | | | |
527 | o 0:1f0dee641bb7 (public) [ ] add a |
|
527 | o 0:1f0dee641bb7 (public) [ ] add a | |
528 |
|
528 | |||
529 | $ hg up 'desc("n3w_3_c")' |
|
529 | $ hg up 'desc("n3w_3_c")' | |
530 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
530 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
531 | $ mkcommit original_d |
|
531 | $ mkcommit original_d | |
532 | $ mkcommit original_e |
|
532 | $ mkcommit original_e | |
533 | $ hg debugobsolete --record-parents `getid original_d` -d '0 0' |
|
533 | $ hg debugobsolete --record-parents `getid original_d` -d '0 0' | |
534 | obsoleted 1 changesets |
|
534 | obsoleted 1 changesets | |
535 | 1 new orphan changesets |
|
535 | 1 new orphan changesets | |
536 | $ hg debugobsolete | grep `getid original_d` |
|
536 | $ hg debugobsolete | grep `getid original_d` | |
537 | 94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
537 | 94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
538 | $ hg log -r 'obsolete()' |
|
538 | $ hg log -r 'obsolete()' | |
539 | 4:94b33453f93b (draft *obsolete*) [ ] add original_d [pruned] |
|
539 | 4:94b33453f93b (draft *obsolete*) [ ] add original_d [pruned] | |
540 | $ hg summary |
|
540 | $ hg summary | |
541 | parent: 5:cda648ca50f5 tip (orphan) |
|
541 | parent: 5:cda648ca50f5 tip (orphan) | |
542 | add original_e |
|
542 | add original_e | |
543 | branch: default |
|
543 | branch: default | |
544 | commit: (clean) |
|
544 | commit: (clean) | |
545 | update: 1 new changesets, 2 branch heads (merge) |
|
545 | update: 1 new changesets, 2 branch heads (merge) | |
546 | phases: 3 draft |
|
546 | phases: 3 draft | |
547 | orphan: 1 changesets |
|
547 | orphan: 1 changesets | |
548 | $ hg log -G -r '::orphan()' |
|
548 | $ hg log -G -r '::orphan()' | |
549 | @ 5:cda648ca50f5 (draft orphan) [tip ] add original_e |
|
549 | @ 5:cda648ca50f5 (draft orphan) [tip ] add original_e | |
550 | | |
|
550 | | | |
551 | x 4:94b33453f93b (draft *obsolete*) [ ] add original_d [pruned] |
|
551 | x 4:94b33453f93b (draft *obsolete*) [ ] add original_d [pruned] | |
552 | | |
|
552 | | | |
553 | o 3:6f9641995072 (draft) [ ] add n3w_3_c |
|
553 | o 3:6f9641995072 (draft) [ ] add n3w_3_c | |
554 | | |
|
554 | | | |
555 | o 1:7c3bad9141dc (public) [ ] add b |
|
555 | o 1:7c3bad9141dc (public) [ ] add b | |
556 | | |
|
556 | | | |
557 | o 0:1f0dee641bb7 (public) [ ] add a |
|
557 | o 0:1f0dee641bb7 (public) [ ] add a | |
558 |
|
558 | |||
559 |
|
559 | |||
560 | refuse to push obsolete changeset |
|
560 | refuse to push obsolete changeset | |
561 |
|
561 | |||
562 | $ hg push ../tmpc/ -r 'desc("original_d")' |
|
562 | $ hg push ../tmpc/ -r 'desc("original_d")' | |
563 | pushing to ../tmpc/ |
|
563 | pushing to ../tmpc/ | |
564 | searching for changes |
|
564 | searching for changes | |
565 | abort: push includes obsolete changeset: 94b33453f93b! |
|
565 | abort: push includes obsolete changeset: 94b33453f93b! | |
566 | [255] |
|
566 | [255] | |
567 |
|
567 | |||
568 | refuse to push unstable changeset |
|
568 | refuse to push unstable changeset | |
569 |
|
569 | |||
570 | $ hg push ../tmpc/ |
|
570 | $ hg push ../tmpc/ | |
571 | pushing to ../tmpc/ |
|
571 | pushing to ../tmpc/ | |
572 | searching for changes |
|
572 | searching for changes | |
573 | abort: push includes orphan changeset: cda648ca50f5! |
|
573 | abort: push includes orphan changeset: cda648ca50f5! | |
574 | [255] |
|
574 | [255] | |
575 |
|
575 | |||
576 | Test that extinct changeset are properly detected |
|
576 | Test that extinct changeset are properly detected | |
577 |
|
577 | |||
578 | $ hg log -r 'extinct()' |
|
578 | $ hg log -r 'extinct()' | |
579 |
|
579 | |||
580 | Don't try to push extinct changeset |
|
580 | Don't try to push extinct changeset | |
581 |
|
581 | |||
582 | $ hg init ../tmpf |
|
582 | $ hg init ../tmpf | |
583 | $ hg out ../tmpf |
|
583 | $ hg out ../tmpf | |
584 | comparing with ../tmpf |
|
584 | comparing with ../tmpf | |
585 | searching for changes |
|
585 | searching for changes | |
586 | 0:1f0dee641bb7 (public) [ ] add a |
|
586 | 0:1f0dee641bb7 (public) [ ] add a | |
587 | 1:7c3bad9141dc (public) [ ] add b |
|
587 | 1:7c3bad9141dc (public) [ ] add b | |
588 | 2:245bde4270cd (public) [ ] add original_c |
|
588 | 2:245bde4270cd (public) [ ] add original_c | |
589 | 3:6f9641995072 (draft) [ ] add n3w_3_c |
|
589 | 3:6f9641995072 (draft) [ ] add n3w_3_c | |
590 | 4:94b33453f93b (draft *obsolete*) [ ] add original_d [pruned] |
|
590 | 4:94b33453f93b (draft *obsolete*) [ ] add original_d [pruned] | |
591 | 5:cda648ca50f5 (draft orphan) [tip ] add original_e |
|
591 | 5:cda648ca50f5 (draft orphan) [tip ] add original_e | |
592 | $ hg push ../tmpf -f # -f because be push unstable too |
|
592 | $ hg push ../tmpf -f # -f because be push unstable too | |
593 | pushing to ../tmpf |
|
593 | pushing to ../tmpf | |
594 | searching for changes |
|
594 | searching for changes | |
595 | adding changesets |
|
595 | adding changesets | |
596 | adding manifests |
|
596 | adding manifests | |
597 | adding file changes |
|
597 | adding file changes | |
598 | added 6 changesets with 6 changes to 6 files (+1 heads) |
|
598 | added 6 changesets with 6 changes to 6 files (+1 heads) | |
599 | 7 new obsolescence markers |
|
599 | 7 new obsolescence markers | |
600 | 1 new orphan changesets |
|
600 | 1 new orphan changesets | |
601 |
|
601 | |||
602 | no warning displayed |
|
602 | no warning displayed | |
603 |
|
603 | |||
604 | $ hg push ../tmpf |
|
604 | $ hg push ../tmpf | |
605 | pushing to ../tmpf |
|
605 | pushing to ../tmpf | |
606 | searching for changes |
|
606 | searching for changes | |
607 | no changes found |
|
607 | no changes found | |
608 | [1] |
|
608 | [1] | |
609 |
|
609 | |||
610 | Do not warn about new head when the new head is a successors of a remote one |
|
610 | Do not warn about new head when the new head is a successors of a remote one | |
611 |
|
611 | |||
612 | $ hg log -G |
|
612 | $ hg log -G | |
613 | @ 5:cda648ca50f5 (draft orphan) [tip ] add original_e |
|
613 | @ 5:cda648ca50f5 (draft orphan) [tip ] add original_e | |
614 | | |
|
614 | | | |
615 | x 4:94b33453f93b (draft *obsolete*) [ ] add original_d [pruned] |
|
615 | x 4:94b33453f93b (draft *obsolete*) [ ] add original_d [pruned] | |
616 | | |
|
616 | | | |
617 | o 3:6f9641995072 (draft) [ ] add n3w_3_c |
|
617 | o 3:6f9641995072 (draft) [ ] add n3w_3_c | |
618 | | |
|
618 | | | |
619 | | o 2:245bde4270cd (public) [ ] add original_c |
|
619 | | o 2:245bde4270cd (public) [ ] add original_c | |
620 | |/ |
|
620 | |/ | |
621 | o 1:7c3bad9141dc (public) [ ] add b |
|
621 | o 1:7c3bad9141dc (public) [ ] add b | |
622 | | |
|
622 | | | |
623 | o 0:1f0dee641bb7 (public) [ ] add a |
|
623 | o 0:1f0dee641bb7 (public) [ ] add a | |
624 |
|
624 | |||
625 | $ hg up -q 'desc(n3w_3_c)' |
|
625 | $ hg up -q 'desc(n3w_3_c)' | |
626 | $ mkcommit obsolete_e |
|
626 | $ mkcommit obsolete_e | |
627 | created new head |
|
627 | created new head | |
628 | $ hg debugobsolete `getid 'original_e'` `getid 'obsolete_e'` \ |
|
628 | $ hg debugobsolete `getid 'original_e'` `getid 'obsolete_e'` \ | |
629 | > -u 'test <test@example.net>' |
|
629 | > -u 'test <test@example.net>' | |
630 | obsoleted 1 changesets |
|
630 | obsoleted 1 changesets | |
631 | $ hg outgoing ../tmpf # parasite hg outgoing testin |
|
631 | $ hg outgoing ../tmpf # parasite hg outgoing testin | |
632 | comparing with ../tmpf |
|
632 | comparing with ../tmpf | |
633 | searching for changes |
|
633 | searching for changes | |
634 | 6:3de5eca88c00 (draft) [tip ] add obsolete_e |
|
634 | 6:3de5eca88c00 (draft) [tip ] add obsolete_e | |
635 | $ hg push ../tmpf |
|
635 | $ hg push ../tmpf | |
636 | pushing to ../tmpf |
|
636 | pushing to ../tmpf | |
637 | searching for changes |
|
637 | searching for changes | |
638 | adding changesets |
|
638 | adding changesets | |
639 | adding manifests |
|
639 | adding manifests | |
640 | adding file changes |
|
640 | adding file changes | |
641 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
641 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
642 | 1 new obsolescence markers |
|
642 | 1 new obsolescence markers | |
643 | obsoleted 1 changesets |
|
643 | obsoleted 1 changesets | |
644 |
|
644 | |||
645 | test relevance computation |
|
645 | test relevance computation | |
646 | --------------------------------------- |
|
646 | --------------------------------------- | |
647 |
|
647 | |||
648 | Checking simple case of "marker relevance". |
|
648 | Checking simple case of "marker relevance". | |
649 |
|
649 | |||
650 |
|
650 | |||
651 | Reminder of the repo situation |
|
651 | Reminder of the repo situation | |
652 |
|
652 | |||
653 | $ hg log --hidden --graph |
|
653 | $ hg log --hidden --graph | |
654 | @ 6:3de5eca88c00 (draft) [tip ] add obsolete_e |
|
654 | @ 6:3de5eca88c00 (draft) [tip ] add obsolete_e | |
655 | | |
|
655 | | | |
656 | | x 5:cda648ca50f5 (draft *obsolete*) [ ] add original_e [rewritten as 6:3de5eca88c00 by test <test@example.net>] |
|
656 | | x 5:cda648ca50f5 (draft *obsolete*) [ ] add original_e [rewritten as 6:3de5eca88c00 by test <test@example.net>] | |
657 | | | |
|
657 | | | | |
658 | | x 4:94b33453f93b (draft *obsolete*) [ ] add original_d [pruned] |
|
658 | | x 4:94b33453f93b (draft *obsolete*) [ ] add original_d [pruned] | |
659 | |/ |
|
659 | |/ | |
660 | o 3:6f9641995072 (draft) [ ] add n3w_3_c |
|
660 | o 3:6f9641995072 (draft) [ ] add n3w_3_c | |
661 | | |
|
661 | | | |
662 | | o 2:245bde4270cd (public) [ ] add original_c |
|
662 | | o 2:245bde4270cd (public) [ ] add original_c | |
663 | |/ |
|
663 | |/ | |
664 | o 1:7c3bad9141dc (public) [ ] add b |
|
664 | o 1:7c3bad9141dc (public) [ ] add b | |
665 | | |
|
665 | | | |
666 | o 0:1f0dee641bb7 (public) [ ] add a |
|
666 | o 0:1f0dee641bb7 (public) [ ] add a | |
667 |
|
667 | |||
668 |
|
668 | |||
669 | List of all markers |
|
669 | List of all markers | |
670 |
|
670 | |||
671 | $ hg debugobsolete |
|
671 | $ hg debugobsolete | |
672 | 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
672 | 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} | |
673 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
673 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} | |
674 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
674 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} | |
675 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
675 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} | |
676 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
676 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} | |
677 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
677 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} | |
678 | 94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
678 | 94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
679 | cda648ca50f50482b7055c0b0c4c117bba6733d9 3de5eca88c00aa039da7399a220f4a5221faa585 0 (*) {'user': 'test <test@example.net>'} (glob) |
|
679 | cda648ca50f50482b7055c0b0c4c117bba6733d9 3de5eca88c00aa039da7399a220f4a5221faa585 0 (*) {'user': 'test <test@example.net>'} (glob) | |
680 |
|
680 | |||
681 | List of changesets with no chain |
|
681 | List of changesets with no chain | |
682 |
|
682 | |||
683 | $ hg debugobsolete --hidden --rev ::2 |
|
683 | $ hg debugobsolete --hidden --rev ::2 | |
684 |
|
684 | |||
685 | List of changesets that are included on marker chain |
|
685 | List of changesets that are included on marker chain | |
686 |
|
686 | |||
687 | $ hg debugobsolete --hidden --rev 6 |
|
687 | $ hg debugobsolete --hidden --rev 6 | |
688 | cda648ca50f50482b7055c0b0c4c117bba6733d9 3de5eca88c00aa039da7399a220f4a5221faa585 0 (*) {'user': 'test <test@example.net>'} (glob) |
|
688 | cda648ca50f50482b7055c0b0c4c117bba6733d9 3de5eca88c00aa039da7399a220f4a5221faa585 0 (*) {'user': 'test <test@example.net>'} (glob) | |
689 |
|
689 | |||
690 | List of changesets with a longer chain, (including a pruned children) |
|
690 | List of changesets with a longer chain, (including a pruned children) | |
691 |
|
691 | |||
692 | $ hg debugobsolete --hidden --rev 3 |
|
692 | $ hg debugobsolete --hidden --rev 3 | |
693 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
693 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} | |
694 | 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
694 | 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} | |
695 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
695 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} | |
696 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
696 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} | |
697 | 94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
697 | 94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
698 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
698 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} | |
699 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
699 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} | |
700 |
|
700 | |||
701 | List of both |
|
701 | List of both | |
702 |
|
702 | |||
703 | $ hg debugobsolete --hidden --rev 3::6 |
|
703 | $ hg debugobsolete --hidden --rev 3::6 | |
704 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
704 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} | |
705 | 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
705 | 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} | |
706 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
706 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} | |
707 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
707 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} | |
708 | 94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
708 | 94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
709 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
709 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} | |
710 | cda648ca50f50482b7055c0b0c4c117bba6733d9 3de5eca88c00aa039da7399a220f4a5221faa585 0 (*) {'user': 'test <test@example.net>'} (glob) |
|
710 | cda648ca50f50482b7055c0b0c4c117bba6733d9 3de5eca88c00aa039da7399a220f4a5221faa585 0 (*) {'user': 'test <test@example.net>'} (glob) | |
711 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
711 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} | |
712 |
|
712 | |||
713 | List of all markers in JSON |
|
713 | List of all markers in JSON | |
714 |
|
714 | |||
715 | $ hg debugobsolete -Tjson |
|
715 | $ hg debugobsolete -Tjson | |
716 | [ |
|
716 | [ | |
717 | { |
|
717 | { | |
718 | "date": [1339, 0], |
|
718 | "date": [1339, 0], | |
719 | "flag": 0, |
|
719 | "flag": 0, | |
720 | "metadata": {"user": "test"}, |
|
720 | "metadata": {"user": "test"}, | |
721 | "prednode": "1339133913391339133913391339133913391339", |
|
721 | "prednode": "1339133913391339133913391339133913391339", | |
722 | "succnodes": ["ca819180edb99ed25ceafb3e9584ac287e240b00"] |
|
722 | "succnodes": ["ca819180edb99ed25ceafb3e9584ac287e240b00"] | |
723 | }, |
|
723 | }, | |
724 | { |
|
724 | { | |
725 | "date": [1339, 0], |
|
725 | "date": [1339, 0], | |
726 | "flag": 0, |
|
726 | "flag": 0, | |
727 | "metadata": {"user": "test"}, |
|
727 | "metadata": {"user": "test"}, | |
728 | "prednode": "1337133713371337133713371337133713371337", |
|
728 | "prednode": "1337133713371337133713371337133713371337", | |
729 | "succnodes": ["5601fb93a350734d935195fee37f4054c529ff39"] |
|
729 | "succnodes": ["5601fb93a350734d935195fee37f4054c529ff39"] | |
730 | }, |
|
730 | }, | |
731 | { |
|
731 | { | |
732 | "date": [121, 120], |
|
732 | "date": [121, 120], | |
733 | "flag": 12, |
|
733 | "flag": 12, | |
734 | "metadata": {"user": "test"}, |
|
734 | "metadata": {"user": "test"}, | |
735 | "prednode": "245bde4270cd1072a27757984f9cda8ba26f08ca", |
|
735 | "prednode": "245bde4270cd1072a27757984f9cda8ba26f08ca", | |
736 | "succnodes": ["cdbce2fbb16313928851e97e0d85413f3f7eb77f"] |
|
736 | "succnodes": ["cdbce2fbb16313928851e97e0d85413f3f7eb77f"] | |
737 | }, |
|
737 | }, | |
738 | { |
|
738 | { | |
739 | "date": [1338, 0], |
|
739 | "date": [1338, 0], | |
740 | "flag": 1, |
|
740 | "flag": 1, | |
741 | "metadata": {"user": "test"}, |
|
741 | "metadata": {"user": "test"}, | |
742 | "prednode": "5601fb93a350734d935195fee37f4054c529ff39", |
|
742 | "prednode": "5601fb93a350734d935195fee37f4054c529ff39", | |
743 | "succnodes": ["6f96419950729f3671185b847352890f074f7557"] |
|
743 | "succnodes": ["6f96419950729f3671185b847352890f074f7557"] | |
744 | }, |
|
744 | }, | |
745 | { |
|
745 | { | |
746 | "date": [1338, 0], |
|
746 | "date": [1338, 0], | |
747 | "flag": 0, |
|
747 | "flag": 0, | |
748 | "metadata": {"user": "test"}, |
|
748 | "metadata": {"user": "test"}, | |
749 | "prednode": "ca819180edb99ed25ceafb3e9584ac287e240b00", |
|
749 | "prednode": "ca819180edb99ed25ceafb3e9584ac287e240b00", | |
750 | "succnodes": ["1337133713371337133713371337133713371337"] |
|
750 | "succnodes": ["1337133713371337133713371337133713371337"] | |
751 | }, |
|
751 | }, | |
752 | { |
|
752 | { | |
753 | "date": [1337, 0], |
|
753 | "date": [1337, 0], | |
754 | "flag": 0, |
|
754 | "flag": 0, | |
755 | "metadata": {"user": "test"}, |
|
755 | "metadata": {"user": "test"}, | |
756 | "prednode": "cdbce2fbb16313928851e97e0d85413f3f7eb77f", |
|
756 | "prednode": "cdbce2fbb16313928851e97e0d85413f3f7eb77f", | |
757 | "succnodes": ["ca819180edb99ed25ceafb3e9584ac287e240b00"] |
|
757 | "succnodes": ["ca819180edb99ed25ceafb3e9584ac287e240b00"] | |
758 | }, |
|
758 | }, | |
759 | { |
|
759 | { | |
760 | "date": [0, 0], |
|
760 | "date": [0, 0], | |
761 | "flag": 0, |
|
761 | "flag": 0, | |
762 | "metadata": {"user": "test"}, |
|
762 | "metadata": {"user": "test"}, | |
763 | "parentnodes": ["6f96419950729f3671185b847352890f074f7557"], |
|
763 | "parentnodes": ["6f96419950729f3671185b847352890f074f7557"], | |
764 | "prednode": "94b33453f93bdb8d457ef9b770851a618bf413e1", |
|
764 | "prednode": "94b33453f93bdb8d457ef9b770851a618bf413e1", | |
765 | "succnodes": [] |
|
765 | "succnodes": [] | |
766 | }, |
|
766 | }, | |
767 | { |
|
767 | { | |
768 | "date": *, (glob) |
|
768 | "date": *, (glob) | |
769 | "flag": 0, |
|
769 | "flag": 0, | |
770 | "metadata": {"user": "test <test@example.net>"}, |
|
770 | "metadata": {"user": "test <test@example.net>"}, | |
771 | "prednode": "cda648ca50f50482b7055c0b0c4c117bba6733d9", |
|
771 | "prednode": "cda648ca50f50482b7055c0b0c4c117bba6733d9", | |
772 | "succnodes": ["3de5eca88c00aa039da7399a220f4a5221faa585"] |
|
772 | "succnodes": ["3de5eca88c00aa039da7399a220f4a5221faa585"] | |
773 | } |
|
773 | } | |
774 | ] |
|
774 | ] | |
775 |
|
775 | |||
776 | Template keywords |
|
776 | Template keywords | |
777 |
|
777 | |||
778 | $ hg debugobsolete -r6 -T '{succnodes % "{node|short}"} {date|shortdate}\n' |
|
778 | $ hg debugobsolete -r6 -T '{succnodes % "{node|short}"} {date|shortdate}\n' | |
779 | 3de5eca88c00 ????-??-?? (glob) |
|
779 | 3de5eca88c00 ????-??-?? (glob) | |
780 | $ hg debugobsolete -r6 -T '{join(metadata % "{key}={value}", " ")}\n' |
|
780 | $ hg debugobsolete -r6 -T '{join(metadata % "{key}={value}", " ")}\n' | |
781 | user=test <test@example.net> |
|
781 | user=test <test@example.net> | |
782 | $ hg debugobsolete -r6 -T '{metadata}\n{metadata}\n' |
|
782 | $ hg debugobsolete -r6 -T '{metadata}\n{metadata}\n' | |
783 | 'user': 'test <test@example.net>' |
|
783 | 'user': 'test <test@example.net>' | |
784 | 'user': 'test <test@example.net>' |
|
784 | 'user': 'test <test@example.net>' | |
785 | $ hg debugobsolete -r6 -T '{succnodes}\n{succnodes}\n' |
|
785 | $ hg debugobsolete -r6 -T '{succnodes}\n{succnodes}\n' | |
786 | 3de5eca88c00aa039da7399a220f4a5221faa585 |
|
786 | 3de5eca88c00aa039da7399a220f4a5221faa585 | |
787 | 3de5eca88c00aa039da7399a220f4a5221faa585 |
|
787 | 3de5eca88c00aa039da7399a220f4a5221faa585 | |
788 | $ hg debugobsolete -r6 -T '{flag} {get(metadata, "user")}\n' |
|
788 | $ hg debugobsolete -r6 -T '{flag} {get(metadata, "user")}\n' | |
789 | 0 test <test@example.net> |
|
789 | 0 test <test@example.net> | |
790 |
|
790 | |||
791 | Test the debug output for exchange |
|
791 | Test the debug output for exchange | |
792 | ---------------------------------- |
|
792 | ---------------------------------- | |
793 |
|
793 | |||
794 | $ hg pull ../tmpb --config 'experimental.obsmarkers-exchange-debug=True' # bundle2 |
|
794 | $ hg pull ../tmpb --config 'experimental.obsmarkers-exchange-debug=True' # bundle2 | |
795 | pulling from ../tmpb |
|
795 | pulling from ../tmpb | |
796 | searching for changes |
|
796 | searching for changes | |
797 | no changes found |
|
797 | no changes found | |
798 | obsmarker-exchange: 346 bytes received |
|
798 | obsmarker-exchange: 346 bytes received | |
799 |
|
799 | |||
800 | check hgweb does not explode |
|
800 | check hgweb does not explode | |
801 | ==================================== |
|
801 | ==================================== | |
802 |
|
802 | |||
803 | $ hg unbundle $TESTDIR/bundles/hgweb+obs.hg |
|
803 | $ hg unbundle $TESTDIR/bundles/hgweb+obs.hg | |
804 | adding changesets |
|
804 | adding changesets | |
805 | adding manifests |
|
805 | adding manifests | |
806 | adding file changes |
|
806 | adding file changes | |
807 | added 62 changesets with 63 changes to 9 files (+60 heads) |
|
807 | added 62 changesets with 63 changes to 9 files (+60 heads) | |
808 | new changesets 50c51b361e60:c15e9edfca13 |
|
808 | new changesets 50c51b361e60:c15e9edfca13 | |
809 | (run 'hg heads .' to see heads, 'hg merge' to merge) |
|
809 | (run 'hg heads .' to see heads, 'hg merge' to merge) | |
810 | $ for node in `hg log -r 'desc(babar_)' --template '{node}\n'`; |
|
810 | $ for node in `hg log -r 'desc(babar_)' --template '{node}\n'`; | |
811 | > do |
|
811 | > do | |
812 | > hg debugobsolete $node |
|
812 | > hg debugobsolete $node | |
813 | > done |
|
813 | > done | |
814 | obsoleted 1 changesets |
|
814 | obsoleted 1 changesets | |
815 | obsoleted 1 changesets |
|
815 | obsoleted 1 changesets | |
816 | obsoleted 1 changesets |
|
816 | obsoleted 1 changesets | |
817 | obsoleted 1 changesets |
|
817 | obsoleted 1 changesets | |
818 | obsoleted 1 changesets |
|
818 | obsoleted 1 changesets | |
819 | obsoleted 1 changesets |
|
819 | obsoleted 1 changesets | |
820 | obsoleted 1 changesets |
|
820 | obsoleted 1 changesets | |
821 | obsoleted 1 changesets |
|
821 | obsoleted 1 changesets | |
822 | obsoleted 1 changesets |
|
822 | obsoleted 1 changesets | |
823 | obsoleted 1 changesets |
|
823 | obsoleted 1 changesets | |
824 | obsoleted 1 changesets |
|
824 | obsoleted 1 changesets | |
825 | obsoleted 1 changesets |
|
825 | obsoleted 1 changesets | |
826 | obsoleted 1 changesets |
|
826 | obsoleted 1 changesets | |
827 | obsoleted 1 changesets |
|
827 | obsoleted 1 changesets | |
828 | obsoleted 1 changesets |
|
828 | obsoleted 1 changesets | |
829 | obsoleted 1 changesets |
|
829 | obsoleted 1 changesets | |
830 | obsoleted 1 changesets |
|
830 | obsoleted 1 changesets | |
831 | obsoleted 1 changesets |
|
831 | obsoleted 1 changesets | |
832 | obsoleted 1 changesets |
|
832 | obsoleted 1 changesets | |
833 | obsoleted 1 changesets |
|
833 | obsoleted 1 changesets | |
834 | obsoleted 1 changesets |
|
834 | obsoleted 1 changesets | |
835 | obsoleted 1 changesets |
|
835 | obsoleted 1 changesets | |
836 | obsoleted 1 changesets |
|
836 | obsoleted 1 changesets | |
837 | obsoleted 1 changesets |
|
837 | obsoleted 1 changesets | |
838 | obsoleted 1 changesets |
|
838 | obsoleted 1 changesets | |
839 | obsoleted 1 changesets |
|
839 | obsoleted 1 changesets | |
840 | obsoleted 1 changesets |
|
840 | obsoleted 1 changesets | |
841 | obsoleted 1 changesets |
|
841 | obsoleted 1 changesets | |
842 | obsoleted 1 changesets |
|
842 | obsoleted 1 changesets | |
843 | obsoleted 1 changesets |
|
843 | obsoleted 1 changesets | |
844 | obsoleted 1 changesets |
|
844 | obsoleted 1 changesets | |
845 | obsoleted 1 changesets |
|
845 | obsoleted 1 changesets | |
846 | obsoleted 1 changesets |
|
846 | obsoleted 1 changesets | |
847 | obsoleted 1 changesets |
|
847 | obsoleted 1 changesets | |
848 | obsoleted 1 changesets |
|
848 | obsoleted 1 changesets | |
849 | obsoleted 1 changesets |
|
849 | obsoleted 1 changesets | |
850 | obsoleted 1 changesets |
|
850 | obsoleted 1 changesets | |
851 | obsoleted 1 changesets |
|
851 | obsoleted 1 changesets | |
852 | obsoleted 1 changesets |
|
852 | obsoleted 1 changesets | |
853 | obsoleted 1 changesets |
|
853 | obsoleted 1 changesets | |
854 | obsoleted 1 changesets |
|
854 | obsoleted 1 changesets | |
855 | obsoleted 1 changesets |
|
855 | obsoleted 1 changesets | |
856 | obsoleted 1 changesets |
|
856 | obsoleted 1 changesets | |
857 | obsoleted 1 changesets |
|
857 | obsoleted 1 changesets | |
858 | obsoleted 1 changesets |
|
858 | obsoleted 1 changesets | |
859 | obsoleted 1 changesets |
|
859 | obsoleted 1 changesets | |
860 | obsoleted 1 changesets |
|
860 | obsoleted 1 changesets | |
861 | obsoleted 1 changesets |
|
861 | obsoleted 1 changesets | |
862 | obsoleted 1 changesets |
|
862 | obsoleted 1 changesets | |
863 | obsoleted 1 changesets |
|
863 | obsoleted 1 changesets | |
864 | obsoleted 1 changesets |
|
864 | obsoleted 1 changesets | |
865 | obsoleted 1 changesets |
|
865 | obsoleted 1 changesets | |
866 | obsoleted 1 changesets |
|
866 | obsoleted 1 changesets | |
867 | obsoleted 1 changesets |
|
867 | obsoleted 1 changesets | |
868 | obsoleted 1 changesets |
|
868 | obsoleted 1 changesets | |
869 | obsoleted 1 changesets |
|
869 | obsoleted 1 changesets | |
870 | obsoleted 1 changesets |
|
870 | obsoleted 1 changesets | |
871 | obsoleted 1 changesets |
|
871 | obsoleted 1 changesets | |
872 | obsoleted 1 changesets |
|
872 | obsoleted 1 changesets | |
873 | obsoleted 1 changesets |
|
873 | obsoleted 1 changesets | |
874 | $ hg up tip |
|
874 | $ hg up tip | |
875 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
875 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
876 |
|
876 | |||
877 | #if serve |
|
877 | #if serve | |
878 |
|
878 | |||
879 | $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log |
|
879 | $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log | |
880 | $ cat hg.pid >> $DAEMON_PIDS |
|
880 | $ cat hg.pid >> $DAEMON_PIDS | |
881 |
|
881 | |||
882 | check changelog view |
|
882 | check changelog view | |
883 |
|
883 | |||
884 | $ get-with-headers.py --headeronly localhost:$HGPORT 'shortlog/' |
|
884 | $ get-with-headers.py --headeronly localhost:$HGPORT 'shortlog/' | |
885 | 200 Script output follows |
|
885 | 200 Script output follows | |
886 |
|
886 | |||
887 | check graph view |
|
887 | check graph view | |
888 |
|
888 | |||
889 | $ get-with-headers.py --headeronly localhost:$HGPORT 'graph' |
|
889 | $ get-with-headers.py --headeronly localhost:$HGPORT 'graph' | |
890 | 200 Script output follows |
|
890 | 200 Script output follows | |
891 |
|
891 | |||
892 | check filelog view |
|
892 | check filelog view | |
893 |
|
893 | |||
894 | $ get-with-headers.py --headeronly localhost:$HGPORT 'log/'`hg log -r . -T "{node}"`/'babar' |
|
894 | $ get-with-headers.py --headeronly localhost:$HGPORT 'log/'`hg log -r . -T "{node}"`/'babar' | |
895 | 200 Script output follows |
|
895 | 200 Script output follows | |
896 |
|
896 | |||
897 | check filelog view for hidden commits (obsolete ones are hidden here) |
|
897 | check filelog view for hidden commits (obsolete ones are hidden here) | |
898 |
|
898 | |||
899 | $ get-with-headers.py localhost:$HGPORT 'log/'`hg log -r . -T "{node}"`/'babar' | grep obsolete |
|
899 | $ get-with-headers.py localhost:$HGPORT 'log/'`hg log -r . -T "{node}"`/'babar' | grep obsolete | |
900 | [1] |
|
900 | [1] | |
901 |
|
901 | |||
902 | $ get-with-headers.py --headeronly localhost:$HGPORT 'rev/68' |
|
902 | $ get-with-headers.py --headeronly localhost:$HGPORT 'rev/68' | |
903 | 200 Script output follows |
|
903 | 200 Script output follows | |
904 | $ get-with-headers.py --headeronly localhost:$HGPORT 'rev/67' |
|
904 | $ get-with-headers.py --headeronly localhost:$HGPORT 'rev/67' | |
905 | 404 Not Found |
|
905 | 404 Not Found | |
906 | [1] |
|
906 | [1] | |
907 |
|
907 | |||
908 | check that web.view config option: |
|
908 | check that web.view config option: | |
909 |
|
909 | |||
910 | $ killdaemons.py hg.pid |
|
910 | $ killdaemons.py hg.pid | |
911 | $ cat >> .hg/hgrc << EOF |
|
911 | $ cat >> .hg/hgrc << EOF | |
912 | > [web] |
|
912 | > [web] | |
913 | > view=all |
|
913 | > view=all | |
914 | > EOF |
|
914 | > EOF | |
915 | $ wait |
|
915 | $ wait | |
916 | $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log |
|
916 | $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log | |
917 | $ get-with-headers.py --headeronly localhost:$HGPORT 'rev/67' |
|
917 | $ get-with-headers.py --headeronly localhost:$HGPORT 'rev/67' | |
918 | 200 Script output follows |
|
918 | 200 Script output follows | |
919 | $ killdaemons.py hg.pid |
|
919 | $ killdaemons.py hg.pid | |
920 |
|
920 | |||
921 | Checking _enable=False warning if obsolete marker exists |
|
921 | Checking _enable=False warning if obsolete marker exists | |
922 |
|
922 | |||
923 | $ echo '[experimental]' >> $HGRCPATH |
|
923 | $ echo '[experimental]' >> $HGRCPATH | |
924 | $ echo "evolution=" >> $HGRCPATH |
|
924 | $ echo "evolution=" >> $HGRCPATH | |
925 | $ hg log -r tip |
|
925 | $ hg log -r tip | |
926 | 68:c15e9edfca13 (draft) [tip ] add celestine |
|
926 | 68:c15e9edfca13 (draft) [tip ] add celestine | |
927 |
|
927 | |||
928 | reenable for later test |
|
928 | reenable for later test | |
929 |
|
929 | |||
930 | $ echo '[experimental]' >> $HGRCPATH |
|
930 | $ echo '[experimental]' >> $HGRCPATH | |
931 | $ echo "evolution.exchange=True" >> $HGRCPATH |
|
931 | $ echo "evolution.exchange=True" >> $HGRCPATH | |
932 | $ echo "evolution.createmarkers=True" >> $HGRCPATH |
|
932 | $ echo "evolution.createmarkers=True" >> $HGRCPATH | |
933 |
|
933 | |||
934 |
$ rm |
|
934 | $ rm access.log errors.log | |
935 | #endif |
|
935 | #endif | |
936 |
|
936 | |||
937 | Several troubles on the same changeset (create an unstable and bumped changeset) |
|
937 | Several troubles on the same changeset (create an unstable and bumped changeset) | |
938 |
|
938 | |||
939 | $ hg debugobsolete `getid obsolete_e` |
|
939 | $ hg debugobsolete `getid obsolete_e` | |
940 | obsoleted 1 changesets |
|
940 | obsoleted 1 changesets | |
941 | 2 new orphan changesets |
|
941 | 2 new orphan changesets | |
942 | $ hg debugobsolete `getid original_c` `getid babar` |
|
942 | $ hg debugobsolete `getid original_c` `getid babar` | |
943 | 1 new phase-divergent changesets |
|
943 | 1 new phase-divergent changesets | |
944 | $ hg log --config ui.logtemplate= -r 'phasedivergent() and orphan()' |
|
944 | $ hg log --config ui.logtemplate= -r 'phasedivergent() and orphan()' | |
945 | changeset: 7:50c51b361e60 |
|
945 | changeset: 7:50c51b361e60 | |
946 | user: test |
|
946 | user: test | |
947 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
947 | date: Thu Jan 01 00:00:00 1970 +0000 | |
948 | instability: orphan, phase-divergent |
|
948 | instability: orphan, phase-divergent | |
949 | summary: add babar |
|
949 | summary: add babar | |
950 |
|
950 | |||
951 |
|
951 | |||
952 | test the "obsolete" templatekw |
|
952 | test the "obsolete" templatekw | |
953 |
|
953 | |||
954 | $ hg log -r 'obsolete()' |
|
954 | $ hg log -r 'obsolete()' | |
955 | 6:3de5eca88c00 (draft *obsolete*) [ ] add obsolete_e [pruned] |
|
955 | 6:3de5eca88c00 (draft *obsolete*) [ ] add obsolete_e [pruned] | |
956 |
|
956 | |||
957 | test the "troubles" templatekw |
|
957 | test the "troubles" templatekw | |
958 |
|
958 | |||
959 | $ hg log -r 'phasedivergent() and orphan()' |
|
959 | $ hg log -r 'phasedivergent() and orphan()' | |
960 | 7:50c51b361e60 (draft orphan phase-divergent) [ ] add babar |
|
960 | 7:50c51b361e60 (draft orphan phase-divergent) [ ] add babar | |
961 |
|
961 | |||
962 | test the default cmdline template |
|
962 | test the default cmdline template | |
963 |
|
963 | |||
964 | $ hg log -T default -r 'phasedivergent()' |
|
964 | $ hg log -T default -r 'phasedivergent()' | |
965 | changeset: 7:50c51b361e60 |
|
965 | changeset: 7:50c51b361e60 | |
966 | user: test |
|
966 | user: test | |
967 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
967 | date: Thu Jan 01 00:00:00 1970 +0000 | |
968 | instability: orphan, phase-divergent |
|
968 | instability: orphan, phase-divergent | |
969 | summary: add babar |
|
969 | summary: add babar | |
970 |
|
970 | |||
971 | $ hg log -T default -r 'obsolete()' |
|
971 | $ hg log -T default -r 'obsolete()' | |
972 | changeset: 6:3de5eca88c00 |
|
972 | changeset: 6:3de5eca88c00 | |
973 | parent: 3:6f9641995072 |
|
973 | parent: 3:6f9641995072 | |
974 | user: test |
|
974 | user: test | |
975 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
975 | date: Thu Jan 01 00:00:00 1970 +0000 | |
976 | obsolete: pruned |
|
976 | obsolete: pruned | |
977 | summary: add obsolete_e |
|
977 | summary: add obsolete_e | |
978 |
|
978 | |||
979 |
|
979 | |||
980 | test the obsolete labels |
|
980 | test the obsolete labels | |
981 |
|
981 | |||
982 | $ hg log --config ui.logtemplate= --color=debug -r 'phasedivergent()' |
|
982 | $ hg log --config ui.logtemplate= --color=debug -r 'phasedivergent()' | |
983 | [log.changeset changeset.draft changeset.unstable instability.orphan instability.phase-divergent|changeset: 7:50c51b361e60] |
|
983 | [log.changeset changeset.draft changeset.unstable instability.orphan instability.phase-divergent|changeset: 7:50c51b361e60] | |
984 | [log.user|user: test] |
|
984 | [log.user|user: test] | |
985 | [log.date|date: Thu Jan 01 00:00:00 1970 +0000] |
|
985 | [log.date|date: Thu Jan 01 00:00:00 1970 +0000] | |
986 | [log.instability|instability: orphan, phase-divergent] |
|
986 | [log.instability|instability: orphan, phase-divergent] | |
987 | [log.summary|summary: add babar] |
|
987 | [log.summary|summary: add babar] | |
988 |
|
988 | |||
989 |
|
989 | |||
990 | $ hg log -T default -r 'phasedivergent()' --color=debug |
|
990 | $ hg log -T default -r 'phasedivergent()' --color=debug | |
991 | [log.changeset changeset.draft changeset.unstable instability.orphan instability.phase-divergent|changeset: 7:50c51b361e60] |
|
991 | [log.changeset changeset.draft changeset.unstable instability.orphan instability.phase-divergent|changeset: 7:50c51b361e60] | |
992 | [log.user|user: test] |
|
992 | [log.user|user: test] | |
993 | [log.date|date: Thu Jan 01 00:00:00 1970 +0000] |
|
993 | [log.date|date: Thu Jan 01 00:00:00 1970 +0000] | |
994 | [log.instability|instability: orphan, phase-divergent] |
|
994 | [log.instability|instability: orphan, phase-divergent] | |
995 | [log.summary|summary: add babar] |
|
995 | [log.summary|summary: add babar] | |
996 |
|
996 | |||
997 |
|
997 | |||
998 | $ hg log --config ui.logtemplate= --color=debug -r "obsolete()" |
|
998 | $ hg log --config ui.logtemplate= --color=debug -r "obsolete()" | |
999 | [log.changeset changeset.draft changeset.obsolete|changeset: 6:3de5eca88c00] |
|
999 | [log.changeset changeset.draft changeset.obsolete|changeset: 6:3de5eca88c00] | |
1000 | [log.parent changeset.draft|parent: 3:6f9641995072] |
|
1000 | [log.parent changeset.draft|parent: 3:6f9641995072] | |
1001 | [log.user|user: test] |
|
1001 | [log.user|user: test] | |
1002 | [log.date|date: Thu Jan 01 00:00:00 1970 +0000] |
|
1002 | [log.date|date: Thu Jan 01 00:00:00 1970 +0000] | |
1003 | [log.obsfate|obsolete: pruned] |
|
1003 | [log.obsfate|obsolete: pruned] | |
1004 | [log.summary|summary: add obsolete_e] |
|
1004 | [log.summary|summary: add obsolete_e] | |
1005 |
|
1005 | |||
1006 |
|
1006 | |||
1007 | $ hg log -T default -r 'obsolete()' --color=debug |
|
1007 | $ hg log -T default -r 'obsolete()' --color=debug | |
1008 | [log.changeset changeset.draft changeset.obsolete|changeset: 6:3de5eca88c00] |
|
1008 | [log.changeset changeset.draft changeset.obsolete|changeset: 6:3de5eca88c00] | |
1009 | [log.parent changeset.draft|parent: 3:6f9641995072] |
|
1009 | [log.parent changeset.draft|parent: 3:6f9641995072] | |
1010 | [log.user|user: test] |
|
1010 | [log.user|user: test] | |
1011 | [log.date|date: Thu Jan 01 00:00:00 1970 +0000] |
|
1011 | [log.date|date: Thu Jan 01 00:00:00 1970 +0000] | |
1012 | [log.obsfate|obsolete: pruned] |
|
1012 | [log.obsfate|obsolete: pruned] | |
1013 | [log.summary|summary: add obsolete_e] |
|
1013 | [log.summary|summary: add obsolete_e] | |
1014 |
|
1014 | |||
1015 |
|
1015 | |||
1016 | test summary output |
|
1016 | test summary output | |
1017 |
|
1017 | |||
1018 | $ hg up -r 'phasedivergent() and orphan()' |
|
1018 | $ hg up -r 'phasedivergent() and orphan()' | |
1019 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1019 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1020 | $ hg summary |
|
1020 | $ hg summary | |
1021 | parent: 7:50c51b361e60 (orphan, phase-divergent) |
|
1021 | parent: 7:50c51b361e60 (orphan, phase-divergent) | |
1022 | add babar |
|
1022 | add babar | |
1023 | branch: default |
|
1023 | branch: default | |
1024 | commit: (clean) |
|
1024 | commit: (clean) | |
1025 | update: 2 new changesets (update) |
|
1025 | update: 2 new changesets (update) | |
1026 | phases: 4 draft |
|
1026 | phases: 4 draft | |
1027 | orphan: 2 changesets |
|
1027 | orphan: 2 changesets | |
1028 | phase-divergent: 1 changesets |
|
1028 | phase-divergent: 1 changesets | |
1029 | $ hg up -r 'obsolete()' |
|
1029 | $ hg up -r 'obsolete()' | |
1030 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1030 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1031 | $ hg summary |
|
1031 | $ hg summary | |
1032 | parent: 6:3de5eca88c00 (obsolete) |
|
1032 | parent: 6:3de5eca88c00 (obsolete) | |
1033 | add obsolete_e |
|
1033 | add obsolete_e | |
1034 | branch: default |
|
1034 | branch: default | |
1035 | commit: (clean) |
|
1035 | commit: (clean) | |
1036 | update: 3 new changesets (update) |
|
1036 | update: 3 new changesets (update) | |
1037 | phases: 4 draft |
|
1037 | phases: 4 draft | |
1038 | orphan: 2 changesets |
|
1038 | orphan: 2 changesets | |
1039 | phase-divergent: 1 changesets |
|
1039 | phase-divergent: 1 changesets | |
1040 |
|
1040 | |||
1041 | test debugwhyunstable output |
|
1041 | test debugwhyunstable output | |
1042 |
|
1042 | |||
1043 | $ hg debugwhyunstable 50c51b361e60 |
|
1043 | $ hg debugwhyunstable 50c51b361e60 | |
1044 | orphan: obsolete parent 3de5eca88c00aa039da7399a220f4a5221faa585 |
|
1044 | orphan: obsolete parent 3de5eca88c00aa039da7399a220f4a5221faa585 | |
1045 | phase-divergent: immutable predecessor 245bde4270cd1072a27757984f9cda8ba26f08ca |
|
1045 | phase-divergent: immutable predecessor 245bde4270cd1072a27757984f9cda8ba26f08ca | |
1046 |
|
1046 | |||
1047 | test whyunstable template keyword |
|
1047 | test whyunstable template keyword | |
1048 |
|
1048 | |||
1049 | $ hg log -r 50c51b361e60 -T '{whyunstable}\n' |
|
1049 | $ hg log -r 50c51b361e60 -T '{whyunstable}\n' | |
1050 | orphan: obsolete parent 3de5eca88c00 |
|
1050 | orphan: obsolete parent 3de5eca88c00 | |
1051 | phase-divergent: immutable predecessor 245bde4270cd |
|
1051 | phase-divergent: immutable predecessor 245bde4270cd | |
1052 | $ hg log -r 50c51b361e60 -T '{whyunstable % "{instability}: {reason} {node|shortest}\n"}' |
|
1052 | $ hg log -r 50c51b361e60 -T '{whyunstable % "{instability}: {reason} {node|shortest}\n"}' | |
1053 | orphan: obsolete parent 3de5 |
|
1053 | orphan: obsolete parent 3de5 | |
1054 | phase-divergent: immutable predecessor 245b |
|
1054 | phase-divergent: immutable predecessor 245b | |
1055 |
|
1055 | |||
1056 | #if serve |
|
1056 | #if serve | |
1057 |
|
1057 | |||
1058 | $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log |
|
1058 | $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log | |
1059 | $ cat hg.pid >> $DAEMON_PIDS |
|
1059 | $ cat hg.pid >> $DAEMON_PIDS | |
1060 |
|
1060 | |||
1061 | check obsolete changeset |
|
1061 | check obsolete changeset | |
1062 |
|
1062 | |||
1063 | $ get-with-headers.py localhost:$HGPORT 'log?rev=first(obsolete())&style=paper' | grep '<span class="obsolete">' |
|
1063 | $ get-with-headers.py localhost:$HGPORT 'log?rev=first(obsolete())&style=paper' | grep '<span class="obsolete">' | |
1064 | <span class="phase">draft</span> <span class="obsolete">obsolete</span> |
|
1064 | <span class="phase">draft</span> <span class="obsolete">obsolete</span> | |
1065 | $ get-with-headers.py localhost:$HGPORT 'log?rev=first(obsolete())&style=coal' | grep '<span class="obsolete">' |
|
1065 | $ get-with-headers.py localhost:$HGPORT 'log?rev=first(obsolete())&style=coal' | grep '<span class="obsolete">' | |
1066 | <span class="phase">draft</span> <span class="obsolete">obsolete</span> |
|
1066 | <span class="phase">draft</span> <span class="obsolete">obsolete</span> | |
1067 | $ get-with-headers.py localhost:$HGPORT 'log?rev=first(obsolete())&style=gitweb' | grep '<span class="logtags">' |
|
1067 | $ get-with-headers.py localhost:$HGPORT 'log?rev=first(obsolete())&style=gitweb' | grep '<span class="logtags">' | |
1068 | <span class="logtags"><span class="phasetag" title="draft">draft</span> <span class="obsoletetag" title="obsolete">obsolete</span> </span> |
|
1068 | <span class="logtags"><span class="phasetag" title="draft">draft</span> <span class="obsoletetag" title="obsolete">obsolete</span> </span> | |
1069 | $ get-with-headers.py localhost:$HGPORT 'log?rev=first(obsolete())&style=monoblue' | grep '<span class="logtags">' |
|
1069 | $ get-with-headers.py localhost:$HGPORT 'log?rev=first(obsolete())&style=monoblue' | grep '<span class="logtags">' | |
1070 | <span class="logtags"><span class="phasetag" title="draft">draft</span> <span class="obsoletetag" title="obsolete">obsolete</span> </span> |
|
1070 | <span class="logtags"><span class="phasetag" title="draft">draft</span> <span class="obsoletetag" title="obsolete">obsolete</span> </span> | |
1071 | $ get-with-headers.py localhost:$HGPORT 'log?rev=first(obsolete())&style=spartan' | grep 'class="obsolete"' |
|
1071 | $ get-with-headers.py localhost:$HGPORT 'log?rev=first(obsolete())&style=spartan' | grep 'class="obsolete"' | |
1072 | <th class="obsolete">obsolete:</th> |
|
1072 | <th class="obsolete">obsolete:</th> | |
1073 | <td class="obsolete">pruned by test <span class="age">Thu, 01 Jan 1970 00:00:00 +0000</span></td> |
|
1073 | <td class="obsolete">pruned by test <span class="age">Thu, 01 Jan 1970 00:00:00 +0000</span></td> | |
1074 |
|
1074 | |||
1075 | check changeset with instabilities |
|
1075 | check changeset with instabilities | |
1076 |
|
1076 | |||
1077 | $ get-with-headers.py localhost:$HGPORT 'log?rev=first(phasedivergent())&style=paper' | grep '<span class="instability">' |
|
1077 | $ get-with-headers.py localhost:$HGPORT 'log?rev=first(phasedivergent())&style=paper' | grep '<span class="instability">' | |
1078 | <span class="phase">draft</span> <span class="instability">orphan</span> <span class="instability">phase-divergent</span> |
|
1078 | <span class="phase">draft</span> <span class="instability">orphan</span> <span class="instability">phase-divergent</span> | |
1079 | $ get-with-headers.py localhost:$HGPORT 'log?rev=first(phasedivergent())&style=coal' | grep '<span class="instability">' |
|
1079 | $ get-with-headers.py localhost:$HGPORT 'log?rev=first(phasedivergent())&style=coal' | grep '<span class="instability">' | |
1080 | <span class="phase">draft</span> <span class="instability">orphan</span> <span class="instability">phase-divergent</span> |
|
1080 | <span class="phase">draft</span> <span class="instability">orphan</span> <span class="instability">phase-divergent</span> | |
1081 | $ get-with-headers.py localhost:$HGPORT 'log?rev=first(phasedivergent())&style=gitweb' | grep '<span class="logtags">' |
|
1081 | $ get-with-headers.py localhost:$HGPORT 'log?rev=first(phasedivergent())&style=gitweb' | grep '<span class="logtags">' | |
1082 | <span class="logtags"><span class="phasetag" title="draft">draft</span> <span class="instabilitytag" title="orphan">orphan</span> <span class="instabilitytag" title="phase-divergent">phase-divergent</span> </span> |
|
1082 | <span class="logtags"><span class="phasetag" title="draft">draft</span> <span class="instabilitytag" title="orphan">orphan</span> <span class="instabilitytag" title="phase-divergent">phase-divergent</span> </span> | |
1083 | $ get-with-headers.py localhost:$HGPORT 'log?rev=first(phasedivergent())&style=monoblue' | grep '<span class="logtags">' |
|
1083 | $ get-with-headers.py localhost:$HGPORT 'log?rev=first(phasedivergent())&style=monoblue' | grep '<span class="logtags">' | |
1084 | <span class="logtags"><span class="phasetag" title="draft">draft</span> <span class="instabilitytag" title="orphan">orphan</span> <span class="instabilitytag" title="phase-divergent">phase-divergent</span> </span> |
|
1084 | <span class="logtags"><span class="phasetag" title="draft">draft</span> <span class="instabilitytag" title="orphan">orphan</span> <span class="instabilitytag" title="phase-divergent">phase-divergent</span> </span> | |
1085 | $ get-with-headers.py localhost:$HGPORT 'log?rev=first(phasedivergent())&style=spartan' | grep 'class="unstable"' |
|
1085 | $ get-with-headers.py localhost:$HGPORT 'log?rev=first(phasedivergent())&style=spartan' | grep 'class="unstable"' | |
1086 | <th class="unstable">unstable:</th> |
|
1086 | <th class="unstable">unstable:</th> | |
1087 | <td class="unstable">orphan: obsolete parent <a href="/rev/3de5eca88c00?style=spartan">3de5eca88c00</a></td> |
|
1087 | <td class="unstable">orphan: obsolete parent <a href="/rev/3de5eca88c00?style=spartan">3de5eca88c00</a></td> | |
1088 | <th class="unstable">unstable:</th> |
|
1088 | <th class="unstable">unstable:</th> | |
1089 | <td class="unstable">phase-divergent: immutable predecessor <a href="/rev/245bde4270cd?style=spartan">245bde4270cd</a></td> |
|
1089 | <td class="unstable">phase-divergent: immutable predecessor <a href="/rev/245bde4270cd?style=spartan">245bde4270cd</a></td> | |
1090 |
|
1090 | |||
1091 | check explanation for an orphan and phase-divergent changeset |
|
1091 | check explanation for an orphan and phase-divergent changeset | |
1092 |
|
1092 | |||
1093 | $ get-with-headers.py localhost:$HGPORT 'rev/50c51b361e60?style=paper' | egrep '(orphan|phase-divergent):' |
|
1093 | $ get-with-headers.py localhost:$HGPORT 'rev/50c51b361e60?style=paper' | egrep '(orphan|phase-divergent):' | |
1094 | <td>orphan: obsolete parent <a href="/rev/3de5eca88c00?style=paper">3de5eca88c00</a><br> |
|
1094 | <td>orphan: obsolete parent <a href="/rev/3de5eca88c00?style=paper">3de5eca88c00</a><br> | |
1095 | phase-divergent: immutable predecessor <a href="/rev/245bde4270cd?style=paper">245bde4270cd</a></td> |
|
1095 | phase-divergent: immutable predecessor <a href="/rev/245bde4270cd?style=paper">245bde4270cd</a></td> | |
1096 | $ get-with-headers.py localhost:$HGPORT 'rev/50c51b361e60?style=coal' | egrep '(orphan|phase-divergent):' |
|
1096 | $ get-with-headers.py localhost:$HGPORT 'rev/50c51b361e60?style=coal' | egrep '(orphan|phase-divergent):' | |
1097 | <td>orphan: obsolete parent <a href="/rev/3de5eca88c00?style=coal">3de5eca88c00</a><br> |
|
1097 | <td>orphan: obsolete parent <a href="/rev/3de5eca88c00?style=coal">3de5eca88c00</a><br> | |
1098 | phase-divergent: immutable predecessor <a href="/rev/245bde4270cd?style=coal">245bde4270cd</a></td> |
|
1098 | phase-divergent: immutable predecessor <a href="/rev/245bde4270cd?style=coal">245bde4270cd</a></td> | |
1099 | $ get-with-headers.py localhost:$HGPORT 'rev/50c51b361e60?style=gitweb' | egrep '(orphan|phase-divergent):' |
|
1099 | $ get-with-headers.py localhost:$HGPORT 'rev/50c51b361e60?style=gitweb' | egrep '(orphan|phase-divergent):' | |
1100 | <td>orphan: obsolete parent <a class="list" href="/rev/3de5eca88c00?style=gitweb">3de5eca88c00</a></td> |
|
1100 | <td>orphan: obsolete parent <a class="list" href="/rev/3de5eca88c00?style=gitweb">3de5eca88c00</a></td> | |
1101 | <td>phase-divergent: immutable predecessor <a class="list" href="/rev/245bde4270cd?style=gitweb">245bde4270cd</a></td> |
|
1101 | <td>phase-divergent: immutable predecessor <a class="list" href="/rev/245bde4270cd?style=gitweb">245bde4270cd</a></td> | |
1102 | $ get-with-headers.py localhost:$HGPORT 'rev/50c51b361e60?style=monoblue' | egrep '(orphan|phase-divergent):' |
|
1102 | $ get-with-headers.py localhost:$HGPORT 'rev/50c51b361e60?style=monoblue' | egrep '(orphan|phase-divergent):' | |
1103 | <dd>orphan: obsolete parent <a href="/rev/3de5eca88c00?style=monoblue">3de5eca88c00</a></dd> |
|
1103 | <dd>orphan: obsolete parent <a href="/rev/3de5eca88c00?style=monoblue">3de5eca88c00</a></dd> | |
1104 | <dd>phase-divergent: immutable predecessor <a href="/rev/245bde4270cd?style=monoblue">245bde4270cd</a></dd> |
|
1104 | <dd>phase-divergent: immutable predecessor <a href="/rev/245bde4270cd?style=monoblue">245bde4270cd</a></dd> | |
1105 | $ get-with-headers.py localhost:$HGPORT 'rev/50c51b361e60?style=spartan' | egrep '(orphan|phase-divergent):' |
|
1105 | $ get-with-headers.py localhost:$HGPORT 'rev/50c51b361e60?style=spartan' | egrep '(orphan|phase-divergent):' | |
1106 | <td class="unstable">orphan: obsolete parent <a href="/rev/3de5eca88c00?style=spartan">3de5eca88c00</a></td> |
|
1106 | <td class="unstable">orphan: obsolete parent <a href="/rev/3de5eca88c00?style=spartan">3de5eca88c00</a></td> | |
1107 | <td class="unstable">phase-divergent: immutable predecessor <a href="/rev/245bde4270cd?style=spartan">245bde4270cd</a></td> |
|
1107 | <td class="unstable">phase-divergent: immutable predecessor <a href="/rev/245bde4270cd?style=spartan">245bde4270cd</a></td> | |
1108 |
|
1108 | |||
1109 | $ killdaemons.py |
|
1109 | $ killdaemons.py | |
1110 |
|
1110 | |||
1111 | $ rm hg.pid access.log errors.log |
|
1111 | $ rm hg.pid access.log errors.log | |
1112 |
|
1112 | |||
1113 | #endif |
|
1113 | #endif | |
1114 |
|
1114 | |||
1115 | Test incoming/outcoming with changesets obsoleted remotely, known locally |
|
1115 | Test incoming/outcoming with changesets obsoleted remotely, known locally | |
1116 | =============================================================================== |
|
1116 | =============================================================================== | |
1117 |
|
1117 | |||
1118 | This test issue 3805 |
|
1118 | This test issue 3805 | |
1119 |
|
1119 | |||
1120 | $ hg init repo-issue3805 |
|
1120 | $ hg init repo-issue3805 | |
1121 | $ cd repo-issue3805 |
|
1121 | $ cd repo-issue3805 | |
1122 | $ echo "base" > base |
|
1122 | $ echo "base" > base | |
1123 | $ hg ci -Am "base" |
|
1123 | $ hg ci -Am "base" | |
1124 | adding base |
|
1124 | adding base | |
1125 | $ echo "foo" > foo |
|
1125 | $ echo "foo" > foo | |
1126 | $ hg ci -Am "A" |
|
1126 | $ hg ci -Am "A" | |
1127 | adding foo |
|
1127 | adding foo | |
1128 | $ hg clone . ../other-issue3805 |
|
1128 | $ hg clone . ../other-issue3805 | |
1129 | updating to branch default |
|
1129 | updating to branch default | |
1130 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1130 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1131 | $ echo "bar" >> foo |
|
1131 | $ echo "bar" >> foo | |
1132 | $ hg ci --amend |
|
1132 | $ hg ci --amend | |
1133 | $ cd ../other-issue3805 |
|
1133 | $ cd ../other-issue3805 | |
1134 | $ hg log -G |
|
1134 | $ hg log -G | |
1135 | @ 1:29f0c6921ddd (draft) [tip ] A |
|
1135 | @ 1:29f0c6921ddd (draft) [tip ] A | |
1136 | | |
|
1136 | | | |
1137 | o 0:d20a80d4def3 (draft) [ ] base |
|
1137 | o 0:d20a80d4def3 (draft) [ ] base | |
1138 |
|
1138 | |||
1139 | $ hg log -G -R ../repo-issue3805 |
|
1139 | $ hg log -G -R ../repo-issue3805 | |
1140 | @ 2:323a9c3ddd91 (draft) [tip ] A |
|
1140 | @ 2:323a9c3ddd91 (draft) [tip ] A | |
1141 | | |
|
1141 | | | |
1142 | o 0:d20a80d4def3 (draft) [ ] base |
|
1142 | o 0:d20a80d4def3 (draft) [ ] base | |
1143 |
|
1143 | |||
1144 | $ hg incoming |
|
1144 | $ hg incoming | |
1145 | comparing with $TESTTMP/tmpe/repo-issue3805 |
|
1145 | comparing with $TESTTMP/tmpe/repo-issue3805 | |
1146 | searching for changes |
|
1146 | searching for changes | |
1147 | 2:323a9c3ddd91 (draft) [tip ] A |
|
1147 | 2:323a9c3ddd91 (draft) [tip ] A | |
1148 | $ hg incoming --bundle ../issue3805.hg |
|
1148 | $ hg incoming --bundle ../issue3805.hg | |
1149 | comparing with $TESTTMP/tmpe/repo-issue3805 |
|
1149 | comparing with $TESTTMP/tmpe/repo-issue3805 | |
1150 | searching for changes |
|
1150 | searching for changes | |
1151 | 2:323a9c3ddd91 (draft) [tip ] A |
|
1151 | 2:323a9c3ddd91 (draft) [tip ] A | |
1152 | $ hg outgoing |
|
1152 | $ hg outgoing | |
1153 | comparing with $TESTTMP/tmpe/repo-issue3805 |
|
1153 | comparing with $TESTTMP/tmpe/repo-issue3805 | |
1154 | searching for changes |
|
1154 | searching for changes | |
1155 | 1:29f0c6921ddd (draft) [tip ] A |
|
1155 | 1:29f0c6921ddd (draft) [tip ] A | |
1156 |
|
1156 | |||
1157 | #if serve |
|
1157 | #if serve | |
1158 |
|
1158 | |||
1159 | $ hg serve -R ../repo-issue3805 -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log |
|
1159 | $ hg serve -R ../repo-issue3805 -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log | |
1160 | $ cat hg.pid >> $DAEMON_PIDS |
|
1160 | $ cat hg.pid >> $DAEMON_PIDS | |
1161 |
|
1161 | |||
1162 | $ hg incoming http://localhost:$HGPORT |
|
1162 | $ hg incoming http://localhost:$HGPORT | |
1163 | comparing with http://localhost:$HGPORT/ |
|
1163 | comparing with http://localhost:$HGPORT/ | |
1164 | searching for changes |
|
1164 | searching for changes | |
1165 | 2:323a9c3ddd91 (draft) [tip ] A |
|
1165 | 2:323a9c3ddd91 (draft) [tip ] A | |
1166 | $ hg outgoing http://localhost:$HGPORT |
|
1166 | $ hg outgoing http://localhost:$HGPORT | |
1167 | comparing with http://localhost:$HGPORT/ |
|
1167 | comparing with http://localhost:$HGPORT/ | |
1168 | searching for changes |
|
1168 | searching for changes | |
1169 | 1:29f0c6921ddd (draft) [tip ] A |
|
1169 | 1:29f0c6921ddd (draft) [tip ] A | |
1170 |
|
1170 | |||
1171 | $ killdaemons.py |
|
1171 | $ killdaemons.py | |
1172 |
|
1172 | |||
1173 | #endif |
|
1173 | #endif | |
1174 |
|
1174 | |||
1175 | This test issue 3814 |
|
1175 | This test issue 3814 | |
1176 |
|
1176 | |||
1177 | (nothing to push but locally hidden changeset) |
|
1177 | (nothing to push but locally hidden changeset) | |
1178 |
|
1178 | |||
1179 | $ cd .. |
|
1179 | $ cd .. | |
1180 | $ hg init repo-issue3814 |
|
1180 | $ hg init repo-issue3814 | |
1181 | $ cd repo-issue3805 |
|
1181 | $ cd repo-issue3805 | |
1182 | $ hg push -r 323a9c3ddd91 ../repo-issue3814 |
|
1182 | $ hg push -r 323a9c3ddd91 ../repo-issue3814 | |
1183 | pushing to ../repo-issue3814 |
|
1183 | pushing to ../repo-issue3814 | |
1184 | searching for changes |
|
1184 | searching for changes | |
1185 | adding changesets |
|
1185 | adding changesets | |
1186 | adding manifests |
|
1186 | adding manifests | |
1187 | adding file changes |
|
1187 | adding file changes | |
1188 | added 2 changesets with 2 changes to 2 files |
|
1188 | added 2 changesets with 2 changes to 2 files | |
1189 | 1 new obsolescence markers |
|
1189 | 1 new obsolescence markers | |
1190 | $ hg out ../repo-issue3814 |
|
1190 | $ hg out ../repo-issue3814 | |
1191 | comparing with ../repo-issue3814 |
|
1191 | comparing with ../repo-issue3814 | |
1192 | searching for changes |
|
1192 | searching for changes | |
1193 | no changes found |
|
1193 | no changes found | |
1194 | [1] |
|
1194 | [1] | |
1195 |
|
1195 | |||
1196 | Test that a local tag blocks a changeset from being hidden |
|
1196 | Test that a local tag blocks a changeset from being hidden | |
1197 |
|
1197 | |||
1198 | $ hg tag -l visible -r 1 --hidden |
|
1198 | $ hg tag -l visible -r 1 --hidden | |
1199 | $ hg log -G |
|
1199 | $ hg log -G | |
1200 | @ 2:323a9c3ddd91 (draft) [tip ] A |
|
1200 | @ 2:323a9c3ddd91 (draft) [tip ] A | |
1201 | | |
|
1201 | | | |
1202 | | x 1:29f0c6921ddd (draft *obsolete*) [visible ] A [rewritten using amend as 2:323a9c3ddd91] |
|
1202 | | x 1:29f0c6921ddd (draft *obsolete*) [visible ] A [rewritten using amend as 2:323a9c3ddd91] | |
1203 | |/ |
|
1203 | |/ | |
1204 | o 0:d20a80d4def3 (draft) [ ] base |
|
1204 | o 0:d20a80d4def3 (draft) [ ] base | |
1205 |
|
1205 | |||
1206 | Test that removing a local tag does not cause some commands to fail |
|
1206 | Test that removing a local tag does not cause some commands to fail | |
1207 |
|
1207 | |||
1208 | $ hg tag -l -r tip tiptag |
|
1208 | $ hg tag -l -r tip tiptag | |
1209 | $ hg tags |
|
1209 | $ hg tags | |
1210 | tiptag 2:323a9c3ddd91 |
|
1210 | tiptag 2:323a9c3ddd91 | |
1211 | tip 2:323a9c3ddd91 |
|
1211 | tip 2:323a9c3ddd91 | |
1212 | visible 1:29f0c6921ddd |
|
1212 | visible 1:29f0c6921ddd | |
1213 | $ hg --config extensions.strip= strip -r tip --no-backup |
|
1213 | $ hg --config extensions.strip= strip -r tip --no-backup | |
1214 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1214 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1215 | $ hg tags |
|
1215 | $ hg tags | |
1216 | visible 1:29f0c6921ddd |
|
1216 | visible 1:29f0c6921ddd | |
1217 | tip 1:29f0c6921ddd |
|
1217 | tip 1:29f0c6921ddd | |
1218 |
|
1218 | |||
1219 | Test bundle overlay onto hidden revision |
|
1219 | Test bundle overlay onto hidden revision | |
1220 |
|
1220 | |||
1221 | $ cd .. |
|
1221 | $ cd .. | |
1222 | $ hg init repo-bundleoverlay |
|
1222 | $ hg init repo-bundleoverlay | |
1223 | $ cd repo-bundleoverlay |
|
1223 | $ cd repo-bundleoverlay | |
1224 | $ echo "A" > foo |
|
1224 | $ echo "A" > foo | |
1225 | $ hg ci -Am "A" |
|
1225 | $ hg ci -Am "A" | |
1226 | adding foo |
|
1226 | adding foo | |
1227 | $ echo "B" >> foo |
|
1227 | $ echo "B" >> foo | |
1228 | $ hg ci -m "B" |
|
1228 | $ hg ci -m "B" | |
1229 | $ hg up 0 |
|
1229 | $ hg up 0 | |
1230 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1230 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1231 | $ echo "C" >> foo |
|
1231 | $ echo "C" >> foo | |
1232 | $ hg ci -m "C" |
|
1232 | $ hg ci -m "C" | |
1233 | created new head |
|
1233 | created new head | |
1234 | $ hg log -G |
|
1234 | $ hg log -G | |
1235 | @ 2:c186d7714947 (draft) [tip ] C |
|
1235 | @ 2:c186d7714947 (draft) [tip ] C | |
1236 | | |
|
1236 | | | |
1237 | | o 1:44526ebb0f98 (draft) [ ] B |
|
1237 | | o 1:44526ebb0f98 (draft) [ ] B | |
1238 | |/ |
|
1238 | |/ | |
1239 | o 0:4b34ecfb0d56 (draft) [ ] A |
|
1239 | o 0:4b34ecfb0d56 (draft) [ ] A | |
1240 |
|
1240 | |||
1241 |
|
1241 | |||
1242 | $ hg clone -r1 . ../other-bundleoverlay |
|
1242 | $ hg clone -r1 . ../other-bundleoverlay | |
1243 | adding changesets |
|
1243 | adding changesets | |
1244 | adding manifests |
|
1244 | adding manifests | |
1245 | adding file changes |
|
1245 | adding file changes | |
1246 | added 2 changesets with 2 changes to 1 files |
|
1246 | added 2 changesets with 2 changes to 1 files | |
1247 | new changesets 4b34ecfb0d56:44526ebb0f98 |
|
1247 | new changesets 4b34ecfb0d56:44526ebb0f98 | |
1248 | updating to branch default |
|
1248 | updating to branch default | |
1249 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1249 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1250 | $ cd ../other-bundleoverlay |
|
1250 | $ cd ../other-bundleoverlay | |
1251 | $ echo "B+" >> foo |
|
1251 | $ echo "B+" >> foo | |
1252 | $ hg ci --amend -m "B+" |
|
1252 | $ hg ci --amend -m "B+" | |
1253 | $ hg log -G --hidden |
|
1253 | $ hg log -G --hidden | |
1254 | @ 2:b7d587542d40 (draft) [tip ] B+ |
|
1254 | @ 2:b7d587542d40 (draft) [tip ] B+ | |
1255 | | |
|
1255 | | | |
1256 | | x 1:44526ebb0f98 (draft *obsolete*) [ ] B [rewritten using amend as 2:b7d587542d40] |
|
1256 | | x 1:44526ebb0f98 (draft *obsolete*) [ ] B [rewritten using amend as 2:b7d587542d40] | |
1257 | |/ |
|
1257 | |/ | |
1258 | o 0:4b34ecfb0d56 (draft) [ ] A |
|
1258 | o 0:4b34ecfb0d56 (draft) [ ] A | |
1259 |
|
1259 | |||
1260 |
|
1260 | |||
1261 | #if repobundlerepo |
|
1261 | #if repobundlerepo | |
1262 | $ hg incoming ../repo-bundleoverlay --bundle ../bundleoverlay.hg |
|
1262 | $ hg incoming ../repo-bundleoverlay --bundle ../bundleoverlay.hg | |
1263 | comparing with ../repo-bundleoverlay |
|
1263 | comparing with ../repo-bundleoverlay | |
1264 | searching for changes |
|
1264 | searching for changes | |
1265 | 1:44526ebb0f98 (draft) [ ] B |
|
1265 | 1:44526ebb0f98 (draft) [ ] B | |
1266 | 2:c186d7714947 (draft) [tip ] C |
|
1266 | 2:c186d7714947 (draft) [tip ] C | |
1267 | $ hg log -G -R ../bundleoverlay.hg |
|
1267 | $ hg log -G -R ../bundleoverlay.hg | |
1268 | o 3:c186d7714947 (draft) [tip ] C |
|
1268 | o 3:c186d7714947 (draft) [tip ] C | |
1269 | | |
|
1269 | | | |
1270 | | @ 2:b7d587542d40 (draft) [ ] B+ |
|
1270 | | @ 2:b7d587542d40 (draft) [ ] B+ | |
1271 | |/ |
|
1271 | |/ | |
1272 | o 0:4b34ecfb0d56 (draft) [ ] A |
|
1272 | o 0:4b34ecfb0d56 (draft) [ ] A | |
1273 |
|
1273 | |||
1274 | #endif |
|
1274 | #endif | |
1275 |
|
1275 | |||
1276 | #if serve |
|
1276 | #if serve | |
1277 |
|
1277 | |||
1278 | Test issue 4506 |
|
1278 | Test issue 4506 | |
1279 |
|
1279 | |||
1280 | $ cd .. |
|
1280 | $ cd .. | |
1281 | $ hg init repo-issue4506 |
|
1281 | $ hg init repo-issue4506 | |
1282 | $ cd repo-issue4506 |
|
1282 | $ cd repo-issue4506 | |
1283 | $ echo "0" > foo |
|
1283 | $ echo "0" > foo | |
1284 | $ hg add foo |
|
1284 | $ hg add foo | |
1285 | $ hg ci -m "content-0" |
|
1285 | $ hg ci -m "content-0" | |
1286 |
|
1286 | |||
1287 | $ hg up null |
|
1287 | $ hg up null | |
1288 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1288 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1289 | $ echo "1" > bar |
|
1289 | $ echo "1" > bar | |
1290 | $ hg add bar |
|
1290 | $ hg add bar | |
1291 | $ hg ci -m "content-1" |
|
1291 | $ hg ci -m "content-1" | |
1292 | created new head |
|
1292 | created new head | |
1293 | $ hg up 0 |
|
1293 | $ hg up 0 | |
1294 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1294 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1295 | $ hg graft 1 |
|
1295 | $ hg graft 1 | |
1296 | grafting 1:1c9eddb02162 "content-1" (tip) |
|
1296 | grafting 1:1c9eddb02162 "content-1" (tip) | |
1297 |
|
1297 | |||
1298 | $ hg debugobsolete `hg log -r1 -T'{node}'` `hg log -r2 -T'{node}'` |
|
1298 | $ hg debugobsolete `hg log -r1 -T'{node}'` `hg log -r2 -T'{node}'` | |
1299 | obsoleted 1 changesets |
|
1299 | obsoleted 1 changesets | |
1300 |
|
1300 | |||
1301 | $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log |
|
1301 | $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log | |
1302 | $ cat hg.pid >> $DAEMON_PIDS |
|
1302 | $ cat hg.pid >> $DAEMON_PIDS | |
1303 |
|
1303 | |||
1304 | $ get-with-headers.py --headeronly localhost:$HGPORT 'rev/1' |
|
1304 | $ get-with-headers.py --headeronly localhost:$HGPORT 'rev/1' | |
1305 | 404 Not Found |
|
1305 | 404 Not Found | |
1306 | [1] |
|
1306 | [1] | |
1307 | $ get-with-headers.py --headeronly localhost:$HGPORT 'file/tip/bar' |
|
1307 | $ get-with-headers.py --headeronly localhost:$HGPORT 'file/tip/bar' | |
1308 | 200 Script output follows |
|
1308 | 200 Script output follows | |
1309 | $ get-with-headers.py --headeronly localhost:$HGPORT 'annotate/tip/bar' |
|
1309 | $ get-with-headers.py --headeronly localhost:$HGPORT 'annotate/tip/bar' | |
1310 | 200 Script output follows |
|
1310 | 200 Script output follows | |
1311 |
|
1311 | |||
1312 | $ killdaemons.py |
|
1312 | $ killdaemons.py | |
1313 |
|
1313 | |||
1314 | #endif |
|
1314 | #endif | |
1315 |
|
1315 | |||
1316 | Test heads computation on pending index changes with obsolescence markers |
|
1316 | Test heads computation on pending index changes with obsolescence markers | |
1317 | $ cd .. |
|
1317 | $ cd .. | |
1318 | $ cat >$TESTTMP/test_extension.py << EOF |
|
1318 | $ cat >$TESTTMP/test_extension.py << EOF | |
1319 | > from __future__ import absolute_import |
|
1319 | > from __future__ import absolute_import | |
1320 | > from mercurial.i18n import _ |
|
1320 | > from mercurial.i18n import _ | |
1321 | > from mercurial import cmdutil, registrar |
|
1321 | > from mercurial import cmdutil, registrar | |
1322 | > |
|
1322 | > | |
1323 | > cmdtable = {} |
|
1323 | > cmdtable = {} | |
1324 | > command = registrar.command(cmdtable) |
|
1324 | > command = registrar.command(cmdtable) | |
1325 | > @command(b"amendtransient",[], _(b'hg amendtransient [rev]')) |
|
1325 | > @command(b"amendtransient",[], _(b'hg amendtransient [rev]')) | |
1326 | > def amend(ui, repo, *pats, **opts): |
|
1326 | > def amend(ui, repo, *pats, **opts): | |
1327 | > opts['message'] = 'Test' |
|
1327 | > opts['message'] = 'Test' | |
1328 | > opts['logfile'] = None |
|
1328 | > opts['logfile'] = None | |
1329 | > cmdutil.amend(ui, repo, repo['.'], {}, pats, opts) |
|
1329 | > cmdutil.amend(ui, repo, repo['.'], {}, pats, opts) | |
1330 | > ui.write(b'%s\n' % repo.changelog.headrevs()) |
|
1330 | > ui.write(b'%s\n' % repo.changelog.headrevs()) | |
1331 | > EOF |
|
1331 | > EOF | |
1332 | $ cat >> $HGRCPATH << EOF |
|
1332 | $ cat >> $HGRCPATH << EOF | |
1333 | > [extensions] |
|
1333 | > [extensions] | |
1334 | > testextension=$TESTTMP/test_extension.py |
|
1334 | > testextension=$TESTTMP/test_extension.py | |
1335 | > EOF |
|
1335 | > EOF | |
1336 | $ hg init repo-issue-nativerevs-pending-changes |
|
1336 | $ hg init repo-issue-nativerevs-pending-changes | |
1337 | $ cd repo-issue-nativerevs-pending-changes |
|
1337 | $ cd repo-issue-nativerevs-pending-changes | |
1338 | $ mkcommit a |
|
1338 | $ mkcommit a | |
1339 | $ mkcommit b |
|
1339 | $ mkcommit b | |
1340 | $ hg up ".^" |
|
1340 | $ hg up ".^" | |
1341 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1341 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1342 | $ echo aa > a |
|
1342 | $ echo aa > a | |
1343 | $ hg amendtransient |
|
1343 | $ hg amendtransient | |
1344 | 1 new orphan changesets |
|
1344 | 1 new orphan changesets | |
1345 | [1, 2] |
|
1345 | [1, 2] | |
1346 |
|
1346 | |||
1347 | Test cache consistency for the visible filter |
|
1347 | Test cache consistency for the visible filter | |
1348 | 1) We want to make sure that the cached filtered revs are invalidated when |
|
1348 | 1) We want to make sure that the cached filtered revs are invalidated when | |
1349 | bookmarks change |
|
1349 | bookmarks change | |
1350 | $ cd .. |
|
1350 | $ cd .. | |
1351 | $ cat >$TESTTMP/test_extension.py << EOF |
|
1351 | $ cat >$TESTTMP/test_extension.py << EOF | |
1352 | > from __future__ import absolute_import, print_function |
|
1352 | > from __future__ import absolute_import, print_function | |
1353 | > import weakref |
|
1353 | > import weakref | |
1354 | > from mercurial import ( |
|
1354 | > from mercurial import ( | |
1355 | > bookmarks, |
|
1355 | > bookmarks, | |
1356 | > cmdutil, |
|
1356 | > cmdutil, | |
1357 | > extensions, |
|
1357 | > extensions, | |
1358 | > repoview, |
|
1358 | > repoview, | |
1359 | > ) |
|
1359 | > ) | |
1360 | > def _bookmarkchanged(orig, bkmstoreinst, *args, **kwargs): |
|
1360 | > def _bookmarkchanged(orig, bkmstoreinst, *args, **kwargs): | |
1361 | > reporef = weakref.ref(bkmstoreinst._repo) |
|
1361 | > reporef = weakref.ref(bkmstoreinst._repo) | |
1362 | > def trhook(tr): |
|
1362 | > def trhook(tr): | |
1363 | > repo = reporef() |
|
1363 | > repo = reporef() | |
1364 | > hidden1 = repoview.computehidden(repo) |
|
1364 | > hidden1 = repoview.computehidden(repo) | |
1365 | > hidden = repoview.filterrevs(repo, b'visible') |
|
1365 | > hidden = repoview.filterrevs(repo, b'visible') | |
1366 | > if sorted(hidden1) != sorted(hidden): |
|
1366 | > if sorted(hidden1) != sorted(hidden): | |
1367 | > print("cache inconsistency") |
|
1367 | > print("cache inconsistency") | |
1368 | > bkmstoreinst._repo.currenttransaction().addpostclose('test_extension', trhook) |
|
1368 | > bkmstoreinst._repo.currenttransaction().addpostclose('test_extension', trhook) | |
1369 | > orig(bkmstoreinst, *args, **kwargs) |
|
1369 | > orig(bkmstoreinst, *args, **kwargs) | |
1370 | > def extsetup(ui): |
|
1370 | > def extsetup(ui): | |
1371 | > extensions.wrapfunction(bookmarks.bmstore, '_recordchange', |
|
1371 | > extensions.wrapfunction(bookmarks.bmstore, '_recordchange', | |
1372 | > _bookmarkchanged) |
|
1372 | > _bookmarkchanged) | |
1373 | > EOF |
|
1373 | > EOF | |
1374 |
|
1374 | |||
1375 | $ hg init repo-cache-inconsistency |
|
1375 | $ hg init repo-cache-inconsistency | |
1376 | $ cd repo-issue-nativerevs-pending-changes |
|
1376 | $ cd repo-issue-nativerevs-pending-changes | |
1377 | $ mkcommit a |
|
1377 | $ mkcommit a | |
1378 | a already tracked! |
|
1378 | a already tracked! | |
1379 | $ mkcommit b |
|
1379 | $ mkcommit b | |
1380 | $ hg id |
|
1380 | $ hg id | |
1381 | 13bedc178fce tip |
|
1381 | 13bedc178fce tip | |
1382 | $ echo "hello" > b |
|
1382 | $ echo "hello" > b | |
1383 | $ hg commit --amend -m "message" |
|
1383 | $ hg commit --amend -m "message" | |
1384 | $ hg book bookb -r 13bedc178fce --hidden |
|
1384 | $ hg book bookb -r 13bedc178fce --hidden | |
1385 | bookmarking hidden changeset 13bedc178fce |
|
1385 | bookmarking hidden changeset 13bedc178fce | |
1386 | (hidden revision '13bedc178fce' was rewritten as: a9b1f8652753) |
|
1386 | (hidden revision '13bedc178fce' was rewritten as: a9b1f8652753) | |
1387 | $ hg log -r 13bedc178fce |
|
1387 | $ hg log -r 13bedc178fce | |
1388 | 4:13bedc178fce (draft *obsolete*) [ bookb] add b [rewritten using amend as 5:a9b1f8652753] |
|
1388 | 4:13bedc178fce (draft *obsolete*) [ bookb] add b [rewritten using amend as 5:a9b1f8652753] | |
1389 | $ hg book -d bookb |
|
1389 | $ hg book -d bookb | |
1390 | $ hg log -r 13bedc178fce |
|
1390 | $ hg log -r 13bedc178fce | |
1391 | abort: hidden revision '13bedc178fce' was rewritten as: a9b1f8652753! |
|
1391 | abort: hidden revision '13bedc178fce' was rewritten as: a9b1f8652753! | |
1392 | (use --hidden to access hidden revisions) |
|
1392 | (use --hidden to access hidden revisions) | |
1393 | [255] |
|
1393 | [255] | |
1394 |
|
1394 | |||
1395 | Empty out the test extension, as it isn't compatible with later parts |
|
1395 | Empty out the test extension, as it isn't compatible with later parts | |
1396 | of the test. |
|
1396 | of the test. | |
1397 | $ echo > $TESTTMP/test_extension.py |
|
1397 | $ echo > $TESTTMP/test_extension.py | |
1398 |
|
1398 | |||
1399 | Test ability to pull changeset with locally applying obsolescence markers |
|
1399 | Test ability to pull changeset with locally applying obsolescence markers | |
1400 | (issue4945) |
|
1400 | (issue4945) | |
1401 |
|
1401 | |||
1402 | $ cd .. |
|
1402 | $ cd .. | |
1403 | $ hg init issue4845 |
|
1403 | $ hg init issue4845 | |
1404 | $ cd issue4845 |
|
1404 | $ cd issue4845 | |
1405 |
|
1405 | |||
1406 | $ echo foo > f0 |
|
1406 | $ echo foo > f0 | |
1407 | $ hg add f0 |
|
1407 | $ hg add f0 | |
1408 | $ hg ci -m '0' |
|
1408 | $ hg ci -m '0' | |
1409 | $ echo foo > f1 |
|
1409 | $ echo foo > f1 | |
1410 | $ hg add f1 |
|
1410 | $ hg add f1 | |
1411 | $ hg ci -m '1' |
|
1411 | $ hg ci -m '1' | |
1412 | $ echo foo > f2 |
|
1412 | $ echo foo > f2 | |
1413 | $ hg add f2 |
|
1413 | $ hg add f2 | |
1414 | $ hg ci -m '2' |
|
1414 | $ hg ci -m '2' | |
1415 |
|
1415 | |||
1416 | $ echo bar > f2 |
|
1416 | $ echo bar > f2 | |
1417 | $ hg commit --amend --config experimental.evolution.createmarkers=True |
|
1417 | $ hg commit --amend --config experimental.evolution.createmarkers=True | |
1418 | $ hg log -G |
|
1418 | $ hg log -G | |
1419 | @ 3:b0551702f918 (draft) [tip ] 2 |
|
1419 | @ 3:b0551702f918 (draft) [tip ] 2 | |
1420 | | |
|
1420 | | | |
1421 | o 1:e016b03fd86f (draft) [ ] 1 |
|
1421 | o 1:e016b03fd86f (draft) [ ] 1 | |
1422 | | |
|
1422 | | | |
1423 | o 0:a78f55e5508c (draft) [ ] 0 |
|
1423 | o 0:a78f55e5508c (draft) [ ] 0 | |
1424 |
|
1424 | |||
1425 | $ hg log -G --hidden |
|
1425 | $ hg log -G --hidden | |
1426 | @ 3:b0551702f918 (draft) [tip ] 2 |
|
1426 | @ 3:b0551702f918 (draft) [tip ] 2 | |
1427 | | |
|
1427 | | | |
1428 | | x 2:e008cf283490 (draft *obsolete*) [ ] 2 [rewritten using amend as 3:b0551702f918] |
|
1428 | | x 2:e008cf283490 (draft *obsolete*) [ ] 2 [rewritten using amend as 3:b0551702f918] | |
1429 | |/ |
|
1429 | |/ | |
1430 | o 1:e016b03fd86f (draft) [ ] 1 |
|
1430 | o 1:e016b03fd86f (draft) [ ] 1 | |
1431 | | |
|
1431 | | | |
1432 | o 0:a78f55e5508c (draft) [ ] 0 |
|
1432 | o 0:a78f55e5508c (draft) [ ] 0 | |
1433 |
|
1433 | |||
1434 |
|
1434 | |||
1435 | $ hg strip --hidden -r 2 --config extensions.strip= --config devel.strip-obsmarkers=no |
|
1435 | $ hg strip --hidden -r 2 --config extensions.strip= --config devel.strip-obsmarkers=no | |
1436 | saved backup bundle to $TESTTMP/tmpe/issue4845/.hg/strip-backup/e008cf283490-ede36964-backup.hg |
|
1436 | saved backup bundle to $TESTTMP/tmpe/issue4845/.hg/strip-backup/e008cf283490-ede36964-backup.hg | |
1437 | $ hg debugobsolete |
|
1437 | $ hg debugobsolete | |
1438 | e008cf2834908e5d6b0f792a9d4b0e2272260fb8 b0551702f918510f01ae838ab03a463054c67b46 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'amend', 'user': 'test'} |
|
1438 | e008cf2834908e5d6b0f792a9d4b0e2272260fb8 b0551702f918510f01ae838ab03a463054c67b46 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'amend', 'user': 'test'} | |
1439 | $ hg log -G |
|
1439 | $ hg log -G | |
1440 | @ 2:b0551702f918 (draft) [tip ] 2 |
|
1440 | @ 2:b0551702f918 (draft) [tip ] 2 | |
1441 | | |
|
1441 | | | |
1442 | o 1:e016b03fd86f (draft) [ ] 1 |
|
1442 | o 1:e016b03fd86f (draft) [ ] 1 | |
1443 | | |
|
1443 | | | |
1444 | o 0:a78f55e5508c (draft) [ ] 0 |
|
1444 | o 0:a78f55e5508c (draft) [ ] 0 | |
1445 |
|
1445 | |||
1446 | $ hg log -G --hidden |
|
1446 | $ hg log -G --hidden | |
1447 | @ 2:b0551702f918 (draft) [tip ] 2 |
|
1447 | @ 2:b0551702f918 (draft) [tip ] 2 | |
1448 | | |
|
1448 | | | |
1449 | o 1:e016b03fd86f (draft) [ ] 1 |
|
1449 | o 1:e016b03fd86f (draft) [ ] 1 | |
1450 | | |
|
1450 | | | |
1451 | o 0:a78f55e5508c (draft) [ ] 0 |
|
1451 | o 0:a78f55e5508c (draft) [ ] 0 | |
1452 |
|
1452 | |||
1453 | $ hg debugbundle .hg/strip-backup/e008cf283490-*-backup.hg |
|
1453 | $ hg debugbundle .hg/strip-backup/e008cf283490-*-backup.hg | |
1454 | Stream params: {Compression: BZ} |
|
1454 | Stream params: {Compression: BZ} | |
1455 | changegroup -- {nbchanges: 1, version: 02} |
|
1455 | changegroup -- {nbchanges: 1, version: 02} | |
1456 | e008cf2834908e5d6b0f792a9d4b0e2272260fb8 |
|
1456 | e008cf2834908e5d6b0f792a9d4b0e2272260fb8 | |
1457 | cache:rev-branch-cache -- {} |
|
1457 | cache:rev-branch-cache -- {} | |
1458 | phase-heads -- {} |
|
1458 | phase-heads -- {} | |
1459 | e008cf2834908e5d6b0f792a9d4b0e2272260fb8 draft |
|
1459 | e008cf2834908e5d6b0f792a9d4b0e2272260fb8 draft | |
1460 |
|
1460 | |||
1461 | #if repobundlerepo |
|
1461 | #if repobundlerepo | |
1462 | $ hg pull .hg/strip-backup/e008cf283490-*-backup.hg |
|
1462 | $ hg pull .hg/strip-backup/e008cf283490-*-backup.hg | |
1463 | pulling from .hg/strip-backup/e008cf283490-ede36964-backup.hg |
|
1463 | pulling from .hg/strip-backup/e008cf283490-ede36964-backup.hg | |
1464 | searching for changes |
|
1464 | searching for changes | |
1465 | no changes found |
|
1465 | no changes found | |
1466 | #endif |
|
1466 | #endif | |
1467 | $ hg debugobsolete |
|
1467 | $ hg debugobsolete | |
1468 | e008cf2834908e5d6b0f792a9d4b0e2272260fb8 b0551702f918510f01ae838ab03a463054c67b46 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'amend', 'user': 'test'} |
|
1468 | e008cf2834908e5d6b0f792a9d4b0e2272260fb8 b0551702f918510f01ae838ab03a463054c67b46 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'amend', 'user': 'test'} | |
1469 | $ hg log -G |
|
1469 | $ hg log -G | |
1470 | @ 2:b0551702f918 (draft) [tip ] 2 |
|
1470 | @ 2:b0551702f918 (draft) [tip ] 2 | |
1471 | | |
|
1471 | | | |
1472 | o 1:e016b03fd86f (draft) [ ] 1 |
|
1472 | o 1:e016b03fd86f (draft) [ ] 1 | |
1473 | | |
|
1473 | | | |
1474 | o 0:a78f55e5508c (draft) [ ] 0 |
|
1474 | o 0:a78f55e5508c (draft) [ ] 0 | |
1475 |
|
1475 | |||
1476 | $ hg log -G --hidden |
|
1476 | $ hg log -G --hidden | |
1477 | @ 2:b0551702f918 (draft) [tip ] 2 |
|
1477 | @ 2:b0551702f918 (draft) [tip ] 2 | |
1478 | | |
|
1478 | | | |
1479 | o 1:e016b03fd86f (draft) [ ] 1 |
|
1479 | o 1:e016b03fd86f (draft) [ ] 1 | |
1480 | | |
|
1480 | | | |
1481 | o 0:a78f55e5508c (draft) [ ] 0 |
|
1481 | o 0:a78f55e5508c (draft) [ ] 0 | |
1482 |
|
1482 | |||
1483 |
|
1483 | |||
1484 | Testing that strip remove markers: |
|
1484 | Testing that strip remove markers: | |
1485 |
|
1485 | |||
1486 | $ hg strip -r 1 --config extensions.strip= |
|
1486 | $ hg strip -r 1 --config extensions.strip= | |
1487 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
1487 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
1488 | saved backup bundle to $TESTTMP/tmpe/issue4845/.hg/strip-backup/e016b03fd86f-65ede734-backup.hg |
|
1488 | saved backup bundle to $TESTTMP/tmpe/issue4845/.hg/strip-backup/e016b03fd86f-65ede734-backup.hg | |
1489 | $ hg debugobsolete |
|
1489 | $ hg debugobsolete | |
1490 | $ hg log -G |
|
1490 | $ hg log -G | |
1491 | @ 0:a78f55e5508c (draft) [tip ] 0 |
|
1491 | @ 0:a78f55e5508c (draft) [tip ] 0 | |
1492 |
|
1492 | |||
1493 | $ hg log -G --hidden |
|
1493 | $ hg log -G --hidden | |
1494 | @ 0:a78f55e5508c (draft) [tip ] 0 |
|
1494 | @ 0:a78f55e5508c (draft) [tip ] 0 | |
1495 |
|
1495 | |||
1496 | $ hg debugbundle .hg/strip-backup/e016b03fd86f-*-backup.hg |
|
1496 | $ hg debugbundle .hg/strip-backup/e016b03fd86f-*-backup.hg | |
1497 | Stream params: {Compression: BZ} |
|
1497 | Stream params: {Compression: BZ} | |
1498 | changegroup -- {nbchanges: 2, version: 02} |
|
1498 | changegroup -- {nbchanges: 2, version: 02} | |
1499 | e016b03fd86fcccc54817d120b90b751aaf367d6 |
|
1499 | e016b03fd86fcccc54817d120b90b751aaf367d6 | |
1500 | b0551702f918510f01ae838ab03a463054c67b46 |
|
1500 | b0551702f918510f01ae838ab03a463054c67b46 | |
1501 | cache:rev-branch-cache -- {} |
|
1501 | cache:rev-branch-cache -- {} | |
1502 | obsmarkers -- {} |
|
1502 | obsmarkers -- {} | |
1503 | version: 1 (92 bytes) |
|
1503 | version: 1 (92 bytes) | |
1504 | e008cf2834908e5d6b0f792a9d4b0e2272260fb8 b0551702f918510f01ae838ab03a463054c67b46 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'amend', 'user': 'test'} |
|
1504 | e008cf2834908e5d6b0f792a9d4b0e2272260fb8 b0551702f918510f01ae838ab03a463054c67b46 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'amend', 'user': 'test'} | |
1505 | phase-heads -- {} |
|
1505 | phase-heads -- {} | |
1506 | b0551702f918510f01ae838ab03a463054c67b46 draft |
|
1506 | b0551702f918510f01ae838ab03a463054c67b46 draft | |
1507 |
|
1507 | |||
1508 | $ hg unbundle .hg/strip-backup/e016b03fd86f-*-backup.hg |
|
1508 | $ hg unbundle .hg/strip-backup/e016b03fd86f-*-backup.hg | |
1509 | adding changesets |
|
1509 | adding changesets | |
1510 | adding manifests |
|
1510 | adding manifests | |
1511 | adding file changes |
|
1511 | adding file changes | |
1512 | added 2 changesets with 2 changes to 2 files |
|
1512 | added 2 changesets with 2 changes to 2 files | |
1513 | 1 new obsolescence markers |
|
1513 | 1 new obsolescence markers | |
1514 | new changesets e016b03fd86f:b0551702f918 |
|
1514 | new changesets e016b03fd86f:b0551702f918 | |
1515 | (run 'hg update' to get a working copy) |
|
1515 | (run 'hg update' to get a working copy) | |
1516 | $ hg debugobsolete | sort |
|
1516 | $ hg debugobsolete | sort | |
1517 | e008cf2834908e5d6b0f792a9d4b0e2272260fb8 b0551702f918510f01ae838ab03a463054c67b46 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'amend', 'user': 'test'} |
|
1517 | e008cf2834908e5d6b0f792a9d4b0e2272260fb8 b0551702f918510f01ae838ab03a463054c67b46 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'amend', 'user': 'test'} | |
1518 | $ hg log -G |
|
1518 | $ hg log -G | |
1519 | o 2:b0551702f918 (draft) [tip ] 2 |
|
1519 | o 2:b0551702f918 (draft) [tip ] 2 | |
1520 | | |
|
1520 | | | |
1521 | o 1:e016b03fd86f (draft) [ ] 1 |
|
1521 | o 1:e016b03fd86f (draft) [ ] 1 | |
1522 | | |
|
1522 | | | |
1523 | @ 0:a78f55e5508c (draft) [ ] 0 |
|
1523 | @ 0:a78f55e5508c (draft) [ ] 0 | |
1524 |
|
1524 | |||
1525 | $ hg log -G --hidden |
|
1525 | $ hg log -G --hidden | |
1526 | o 2:b0551702f918 (draft) [tip ] 2 |
|
1526 | o 2:b0551702f918 (draft) [tip ] 2 | |
1527 | | |
|
1527 | | | |
1528 | o 1:e016b03fd86f (draft) [ ] 1 |
|
1528 | o 1:e016b03fd86f (draft) [ ] 1 | |
1529 | | |
|
1529 | | | |
1530 | @ 0:a78f55e5508c (draft) [ ] 0 |
|
1530 | @ 0:a78f55e5508c (draft) [ ] 0 | |
1531 |
|
1531 | |||
1532 | Test that 'hg debugobsolete --index --rev' can show indices of obsmarkers when |
|
1532 | Test that 'hg debugobsolete --index --rev' can show indices of obsmarkers when | |
1533 | only a subset of those are displayed (because of --rev option) |
|
1533 | only a subset of those are displayed (because of --rev option) | |
1534 | $ hg init doindexrev |
|
1534 | $ hg init doindexrev | |
1535 | $ cd doindexrev |
|
1535 | $ cd doindexrev | |
1536 | $ echo a > a |
|
1536 | $ echo a > a | |
1537 | $ hg ci -Am a |
|
1537 | $ hg ci -Am a | |
1538 | adding a |
|
1538 | adding a | |
1539 | $ hg ci --amend -m aa |
|
1539 | $ hg ci --amend -m aa | |
1540 | $ echo b > b |
|
1540 | $ echo b > b | |
1541 | $ hg ci -Am b |
|
1541 | $ hg ci -Am b | |
1542 | adding b |
|
1542 | adding b | |
1543 | $ hg ci --amend -m bb |
|
1543 | $ hg ci --amend -m bb | |
1544 | $ echo c > c |
|
1544 | $ echo c > c | |
1545 | $ hg ci -Am c |
|
1545 | $ hg ci -Am c | |
1546 | adding c |
|
1546 | adding c | |
1547 | $ hg ci --amend -m cc |
|
1547 | $ hg ci --amend -m cc | |
1548 | $ echo d > d |
|
1548 | $ echo d > d | |
1549 | $ hg ci -Am d |
|
1549 | $ hg ci -Am d | |
1550 | adding d |
|
1550 | adding d | |
1551 | $ hg ci --amend -m dd --config experimental.evolution.track-operation=1 |
|
1551 | $ hg ci --amend -m dd --config experimental.evolution.track-operation=1 | |
1552 | $ hg debugobsolete --index --rev "3+7" |
|
1552 | $ hg debugobsolete --index --rev "3+7" | |
1553 | 1 6fdef60fcbabbd3d50e9b9cbc2a240724b91a5e1 d27fb9b066076fd921277a4b9e8b9cb48c95bc6a 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '1', 'operation': 'amend', 'user': 'test'} |
|
1553 | 1 6fdef60fcbabbd3d50e9b9cbc2a240724b91a5e1 d27fb9b066076fd921277a4b9e8b9cb48c95bc6a 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '1', 'operation': 'amend', 'user': 'test'} | |
1554 | 3 4715cf767440ed891755448016c2b8cf70760c30 7ae79c5d60f049c7b0dd02f5f25b9d60aaf7b36d 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '1', 'operation': 'amend', 'user': 'test'} |
|
1554 | 3 4715cf767440ed891755448016c2b8cf70760c30 7ae79c5d60f049c7b0dd02f5f25b9d60aaf7b36d 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '1', 'operation': 'amend', 'user': 'test'} | |
1555 | $ hg debugobsolete --index --rev "3+7" -Tjson |
|
1555 | $ hg debugobsolete --index --rev "3+7" -Tjson | |
1556 | [ |
|
1556 | [ | |
1557 | { |
|
1557 | { | |
1558 | "date": [0, 0], |
|
1558 | "date": [0, 0], | |
1559 | "flag": 0, |
|
1559 | "flag": 0, | |
1560 | "index": 1, |
|
1560 | "index": 1, | |
1561 | "metadata": {"ef1": "1", "operation": "amend", "user": "test"}, |
|
1561 | "metadata": {"ef1": "1", "operation": "amend", "user": "test"}, | |
1562 | "prednode": "6fdef60fcbabbd3d50e9b9cbc2a240724b91a5e1", |
|
1562 | "prednode": "6fdef60fcbabbd3d50e9b9cbc2a240724b91a5e1", | |
1563 | "succnodes": ["d27fb9b066076fd921277a4b9e8b9cb48c95bc6a"] |
|
1563 | "succnodes": ["d27fb9b066076fd921277a4b9e8b9cb48c95bc6a"] | |
1564 | }, |
|
1564 | }, | |
1565 | { |
|
1565 | { | |
1566 | "date": [0, 0], |
|
1566 | "date": [0, 0], | |
1567 | "flag": 0, |
|
1567 | "flag": 0, | |
1568 | "index": 3, |
|
1568 | "index": 3, | |
1569 | "metadata": {"ef1": "1", "operation": "amend", "user": "test"}, |
|
1569 | "metadata": {"ef1": "1", "operation": "amend", "user": "test"}, | |
1570 | "prednode": "4715cf767440ed891755448016c2b8cf70760c30", |
|
1570 | "prednode": "4715cf767440ed891755448016c2b8cf70760c30", | |
1571 | "succnodes": ["7ae79c5d60f049c7b0dd02f5f25b9d60aaf7b36d"] |
|
1571 | "succnodes": ["7ae79c5d60f049c7b0dd02f5f25b9d60aaf7b36d"] | |
1572 | } |
|
1572 | } | |
1573 | ] |
|
1573 | ] | |
1574 |
|
1574 | |||
1575 | Test the --delete option of debugobsolete command |
|
1575 | Test the --delete option of debugobsolete command | |
1576 | $ hg debugobsolete --index |
|
1576 | $ hg debugobsolete --index | |
1577 | 0 cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b f9bd49731b0b175e42992a3c8fa6c678b2bc11f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '1', 'operation': 'amend', 'user': 'test'} |
|
1577 | 0 cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b f9bd49731b0b175e42992a3c8fa6c678b2bc11f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '1', 'operation': 'amend', 'user': 'test'} | |
1578 | 1 6fdef60fcbabbd3d50e9b9cbc2a240724b91a5e1 d27fb9b066076fd921277a4b9e8b9cb48c95bc6a 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '1', 'operation': 'amend', 'user': 'test'} |
|
1578 | 1 6fdef60fcbabbd3d50e9b9cbc2a240724b91a5e1 d27fb9b066076fd921277a4b9e8b9cb48c95bc6a 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '1', 'operation': 'amend', 'user': 'test'} | |
1579 | 2 1ab51af8f9b41ef8c7f6f3312d4706d870b1fb74 29346082e4a9e27042b62d2da0e2de211c027621 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '1', 'operation': 'amend', 'user': 'test'} |
|
1579 | 2 1ab51af8f9b41ef8c7f6f3312d4706d870b1fb74 29346082e4a9e27042b62d2da0e2de211c027621 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '1', 'operation': 'amend', 'user': 'test'} | |
1580 | 3 4715cf767440ed891755448016c2b8cf70760c30 7ae79c5d60f049c7b0dd02f5f25b9d60aaf7b36d 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '1', 'operation': 'amend', 'user': 'test'} |
|
1580 | 3 4715cf767440ed891755448016c2b8cf70760c30 7ae79c5d60f049c7b0dd02f5f25b9d60aaf7b36d 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '1', 'operation': 'amend', 'user': 'test'} | |
1581 | $ hg debugobsolete --delete 1 --delete 3 |
|
1581 | $ hg debugobsolete --delete 1 --delete 3 | |
1582 | deleted 2 obsolescence markers |
|
1582 | deleted 2 obsolescence markers | |
1583 | $ hg debugobsolete |
|
1583 | $ hg debugobsolete | |
1584 | cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b f9bd49731b0b175e42992a3c8fa6c678b2bc11f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '1', 'operation': 'amend', 'user': 'test'} |
|
1584 | cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b f9bd49731b0b175e42992a3c8fa6c678b2bc11f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '1', 'operation': 'amend', 'user': 'test'} | |
1585 | 1ab51af8f9b41ef8c7f6f3312d4706d870b1fb74 29346082e4a9e27042b62d2da0e2de211c027621 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '1', 'operation': 'amend', 'user': 'test'} |
|
1585 | 1ab51af8f9b41ef8c7f6f3312d4706d870b1fb74 29346082e4a9e27042b62d2da0e2de211c027621 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '1', 'operation': 'amend', 'user': 'test'} | |
1586 |
|
1586 | |||
1587 | Test adding changeset after obsmarkers affecting it |
|
1587 | Test adding changeset after obsmarkers affecting it | |
1588 | (eg: during pull, or unbundle) |
|
1588 | (eg: during pull, or unbundle) | |
1589 |
|
1589 | |||
1590 | $ mkcommit e |
|
1590 | $ mkcommit e | |
1591 | $ hg bundle -r . --base .~1 ../bundle-2.hg |
|
1591 | $ hg bundle -r . --base .~1 ../bundle-2.hg | |
1592 | 1 changesets found |
|
1592 | 1 changesets found | |
1593 | $ getid . |
|
1593 | $ getid . | |
1594 | $ hg --config extensions.strip= strip -r . |
|
1594 | $ hg --config extensions.strip= strip -r . | |
1595 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1595 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1596 | saved backup bundle to $TESTTMP/tmpe/issue4845/doindexrev/.hg/strip-backup/9bc153528424-ee80edd4-backup.hg |
|
1596 | saved backup bundle to $TESTTMP/tmpe/issue4845/doindexrev/.hg/strip-backup/9bc153528424-ee80edd4-backup.hg | |
1597 | $ hg debugobsolete 9bc153528424ea266d13e57f9ff0d799dfe61e4b |
|
1597 | $ hg debugobsolete 9bc153528424ea266d13e57f9ff0d799dfe61e4b | |
1598 | $ hg unbundle ../bundle-2.hg |
|
1598 | $ hg unbundle ../bundle-2.hg | |
1599 | adding changesets |
|
1599 | adding changesets | |
1600 | adding manifests |
|
1600 | adding manifests | |
1601 | adding file changes |
|
1601 | adding file changes | |
1602 | added 1 changesets with 1 changes to 1 files |
|
1602 | added 1 changesets with 1 changes to 1 files | |
1603 | (run 'hg update' to get a working copy) |
|
1603 | (run 'hg update' to get a working copy) | |
1604 | $ hg log -G |
|
1604 | $ hg log -G | |
1605 | @ 7:7ae79c5d60f0 (draft) [tip ] dd |
|
1605 | @ 7:7ae79c5d60f0 (draft) [tip ] dd | |
1606 | | |
|
1606 | | | |
1607 | | o 6:4715cf767440 (draft) [ ] d |
|
1607 | | o 6:4715cf767440 (draft) [ ] d | |
1608 | |/ |
|
1608 | |/ | |
1609 | o 5:29346082e4a9 (draft) [ ] cc |
|
1609 | o 5:29346082e4a9 (draft) [ ] cc | |
1610 | | |
|
1610 | | | |
1611 | o 3:d27fb9b06607 (draft) [ ] bb |
|
1611 | o 3:d27fb9b06607 (draft) [ ] bb | |
1612 | | |
|
1612 | | | |
1613 | | o 2:6fdef60fcbab (draft) [ ] b |
|
1613 | | o 2:6fdef60fcbab (draft) [ ] b | |
1614 | |/ |
|
1614 | |/ | |
1615 | o 1:f9bd49731b0b (draft) [ ] aa |
|
1615 | o 1:f9bd49731b0b (draft) [ ] aa | |
1616 |
|
1616 | |||
1617 |
|
1617 | |||
1618 | $ cd .. |
|
1618 | $ cd .. |
@@ -1,1624 +1,1623 b'' | |||||
1 | This file tests the behavior of run-tests.py itself. |
|
1 | This file tests the behavior of run-tests.py itself. | |
2 |
|
2 | |||
3 | Avoid interference from actual test env: |
|
3 | Avoid interference from actual test env: | |
4 |
|
4 | |||
5 | $ . "$TESTDIR/helper-runtests.sh" |
|
5 | $ . "$TESTDIR/helper-runtests.sh" | |
6 |
|
6 | |||
7 | Smoke test with install |
|
7 | Smoke test with install | |
8 | ============ |
|
8 | ============ | |
9 | $ $PYTHON $TESTDIR/run-tests.py $HGTEST_RUN_TESTS_PURE -l |
|
9 | $ $PYTHON $TESTDIR/run-tests.py $HGTEST_RUN_TESTS_PURE -l | |
10 |
|
10 | |||
11 | # Ran 0 tests, 0 skipped, 0 failed. |
|
11 | # Ran 0 tests, 0 skipped, 0 failed. | |
12 |
|
12 | |||
13 | Define a helper to avoid the install step |
|
13 | Define a helper to avoid the install step | |
14 | ============= |
|
14 | ============= | |
15 | $ rt() |
|
15 | $ rt() | |
16 | > { |
|
16 | > { | |
17 | > $PYTHON $TESTDIR/run-tests.py --with-hg=`which hg` "$@" |
|
17 | > $PYTHON $TESTDIR/run-tests.py --with-hg=`which hg` "$@" | |
18 | > } |
|
18 | > } | |
19 |
|
19 | |||
20 | error paths |
|
20 | error paths | |
21 |
|
21 | |||
22 | #if symlink |
|
22 | #if symlink | |
23 | $ ln -s `which true` hg |
|
23 | $ ln -s `which true` hg | |
24 | $ $PYTHON $TESTDIR/run-tests.py --with-hg=./hg |
|
24 | $ $PYTHON $TESTDIR/run-tests.py --with-hg=./hg | |
25 | warning: --with-hg should specify an hg script |
|
25 | warning: --with-hg should specify an hg script | |
26 |
|
26 | |||
27 | # Ran 0 tests, 0 skipped, 0 failed. |
|
27 | # Ran 0 tests, 0 skipped, 0 failed. | |
28 | $ rm hg |
|
28 | $ rm hg | |
29 | #endif |
|
29 | #endif | |
30 |
|
30 | |||
31 | #if execbit |
|
31 | #if execbit | |
32 | $ touch hg |
|
32 | $ touch hg | |
33 | $ $PYTHON $TESTDIR/run-tests.py --with-hg=./hg |
|
33 | $ $PYTHON $TESTDIR/run-tests.py --with-hg=./hg | |
34 | usage: run-tests.py [options] [tests] |
|
34 | usage: run-tests.py [options] [tests] | |
35 | run-tests.py: error: --with-hg must specify an executable hg script |
|
35 | run-tests.py: error: --with-hg must specify an executable hg script | |
36 | [2] |
|
36 | [2] | |
37 | $ rm hg |
|
37 | $ rm hg | |
38 | #endif |
|
38 | #endif | |
39 |
|
39 | |||
40 | Features for testing optional lines |
|
40 | Features for testing optional lines | |
41 | =================================== |
|
41 | =================================== | |
42 |
|
42 | |||
43 | $ cat > hghaveaddon.py <<EOF |
|
43 | $ cat > hghaveaddon.py <<EOF | |
44 | > import hghave |
|
44 | > import hghave | |
45 | > @hghave.check("custom", "custom hghave feature") |
|
45 | > @hghave.check("custom", "custom hghave feature") | |
46 | > def has_custom(): |
|
46 | > def has_custom(): | |
47 | > return True |
|
47 | > return True | |
48 | > @hghave.check("missing", "missing hghave feature") |
|
48 | > @hghave.check("missing", "missing hghave feature") | |
49 | > def has_missing(): |
|
49 | > def has_missing(): | |
50 | > return False |
|
50 | > return False | |
51 | > EOF |
|
51 | > EOF | |
52 |
|
52 | |||
53 | an empty test |
|
53 | an empty test | |
54 | ======================= |
|
54 | ======================= | |
55 |
|
55 | |||
56 | $ touch test-empty.t |
|
56 | $ touch test-empty.t | |
57 | $ rt |
|
57 | $ rt | |
58 | . |
|
58 | . | |
59 | # Ran 1 tests, 0 skipped, 0 failed. |
|
59 | # Ran 1 tests, 0 skipped, 0 failed. | |
60 | $ rm test-empty.t |
|
60 | $ rm test-empty.t | |
61 |
|
61 | |||
62 | a succesful test |
|
62 | a succesful test | |
63 | ======================= |
|
63 | ======================= | |
64 |
|
64 | |||
65 | $ cat > test-success.t << EOF |
|
65 | $ cat > test-success.t << EOF | |
66 | > $ echo babar |
|
66 | > $ echo babar | |
67 | > babar |
|
67 | > babar | |
68 | > $ echo xyzzy |
|
68 | > $ echo xyzzy | |
69 | > dont_print (?) |
|
69 | > dont_print (?) | |
70 | > nothing[42]line (re) (?) |
|
70 | > nothing[42]line (re) (?) | |
71 | > never*happens (glob) (?) |
|
71 | > never*happens (glob) (?) | |
72 | > more_nothing (?) |
|
72 | > more_nothing (?) | |
73 | > xyzzy |
|
73 | > xyzzy | |
74 | > nor this (?) |
|
74 | > nor this (?) | |
75 | > $ printf 'abc\ndef\nxyz\n' |
|
75 | > $ printf 'abc\ndef\nxyz\n' | |
76 | > 123 (?) |
|
76 | > 123 (?) | |
77 | > abc |
|
77 | > abc | |
78 | > def (?) |
|
78 | > def (?) | |
79 | > 456 (?) |
|
79 | > 456 (?) | |
80 | > xyz |
|
80 | > xyz | |
81 | > $ printf 'zyx\nwvu\ntsr\n' |
|
81 | > $ printf 'zyx\nwvu\ntsr\n' | |
82 | > abc (?) |
|
82 | > abc (?) | |
83 | > zyx (custom !) |
|
83 | > zyx (custom !) | |
84 | > wvu |
|
84 | > wvu | |
85 | > no_print (no-custom !) |
|
85 | > no_print (no-custom !) | |
86 | > tsr (no-missing !) |
|
86 | > tsr (no-missing !) | |
87 | > missing (missing !) |
|
87 | > missing (missing !) | |
88 | > EOF |
|
88 | > EOF | |
89 |
|
89 | |||
90 | $ rt |
|
90 | $ rt | |
91 | . |
|
91 | . | |
92 | # Ran 1 tests, 0 skipped, 0 failed. |
|
92 | # Ran 1 tests, 0 skipped, 0 failed. | |
93 |
|
93 | |||
94 | failing test |
|
94 | failing test | |
95 | ================== |
|
95 | ================== | |
96 |
|
96 | |||
97 | test churn with globs |
|
97 | test churn with globs | |
98 | $ cat > test-failure.t <<EOF |
|
98 | $ cat > test-failure.t <<EOF | |
99 | > $ echo "bar-baz"; echo "bar-bad"; echo foo |
|
99 | > $ echo "bar-baz"; echo "bar-bad"; echo foo | |
100 | > bar*bad (glob) |
|
100 | > bar*bad (glob) | |
101 | > bar*baz (glob) |
|
101 | > bar*baz (glob) | |
102 | > | fo (re) |
|
102 | > | fo (re) | |
103 | > EOF |
|
103 | > EOF | |
104 | $ rt test-failure.t |
|
104 | $ rt test-failure.t | |
105 |
|
105 | |||
106 | --- $TESTTMP/test-failure.t |
|
106 | --- $TESTTMP/test-failure.t | |
107 | +++ $TESTTMP/test-failure.t.err |
|
107 | +++ $TESTTMP/test-failure.t.err | |
108 | @@ -1,4 +1,4 @@ |
|
108 | @@ -1,4 +1,4 @@ | |
109 | $ echo "bar-baz"; echo "bar-bad"; echo foo |
|
109 | $ echo "bar-baz"; echo "bar-bad"; echo foo | |
110 | + bar*baz (glob) |
|
110 | + bar*baz (glob) | |
111 | bar*bad (glob) |
|
111 | bar*bad (glob) | |
112 | - bar*baz (glob) |
|
112 | - bar*baz (glob) | |
113 | - | fo (re) |
|
113 | - | fo (re) | |
114 | + foo |
|
114 | + foo | |
115 |
|
115 | |||
116 | ERROR: test-failure.t output changed |
|
116 | ERROR: test-failure.t output changed | |
117 | ! |
|
117 | ! | |
118 | Failed test-failure.t: output changed |
|
118 | Failed test-failure.t: output changed | |
119 | # Ran 1 tests, 0 skipped, 1 failed. |
|
119 | # Ran 1 tests, 0 skipped, 1 failed. | |
120 | python hash seed: * (glob) |
|
120 | python hash seed: * (glob) | |
121 | [1] |
|
121 | [1] | |
122 |
|
122 | |||
123 | test diff colorisation |
|
123 | test diff colorisation | |
124 |
|
124 | |||
125 | #if no-windows pygments |
|
125 | #if no-windows pygments | |
126 | $ rt test-failure.t --color always |
|
126 | $ rt test-failure.t --color always | |
127 |
|
127 | |||
128 | \x1b[38;5;124m--- $TESTTMP/test-failure.t\x1b[39m (esc) |
|
128 | \x1b[38;5;124m--- $TESTTMP/test-failure.t\x1b[39m (esc) | |
129 | \x1b[38;5;34m+++ $TESTTMP/test-failure.t.err\x1b[39m (esc) |
|
129 | \x1b[38;5;34m+++ $TESTTMP/test-failure.t.err\x1b[39m (esc) | |
130 | \x1b[38;5;90;01m@@ -1,4 +1,4 @@\x1b[39;00m (esc) |
|
130 | \x1b[38;5;90;01m@@ -1,4 +1,4 @@\x1b[39;00m (esc) | |
131 | $ echo "bar-baz"; echo "bar-bad"; echo foo |
|
131 | $ echo "bar-baz"; echo "bar-bad"; echo foo | |
132 | \x1b[38;5;34m+ bar*baz (glob)\x1b[39m (esc) |
|
132 | \x1b[38;5;34m+ bar*baz (glob)\x1b[39m (esc) | |
133 | bar*bad (glob) |
|
133 | bar*bad (glob) | |
134 | \x1b[38;5;124m- bar*baz (glob)\x1b[39m (esc) |
|
134 | \x1b[38;5;124m- bar*baz (glob)\x1b[39m (esc) | |
135 | \x1b[38;5;124m- | fo (re)\x1b[39m (esc) |
|
135 | \x1b[38;5;124m- | fo (re)\x1b[39m (esc) | |
136 | \x1b[38;5;34m+ foo\x1b[39m (esc) |
|
136 | \x1b[38;5;34m+ foo\x1b[39m (esc) | |
137 |
|
137 | |||
138 | \x1b[38;5;88mERROR: \x1b[39m\x1b[38;5;9mtest-failure.t\x1b[39m\x1b[38;5;88m output changed\x1b[39m (esc) |
|
138 | \x1b[38;5;88mERROR: \x1b[39m\x1b[38;5;9mtest-failure.t\x1b[39m\x1b[38;5;88m output changed\x1b[39m (esc) | |
139 | ! |
|
139 | ! | |
140 | \x1b[38;5;88mFailed \x1b[39m\x1b[38;5;9mtest-failure.t\x1b[39m\x1b[38;5;88m: output changed\x1b[39m (esc) |
|
140 | \x1b[38;5;88mFailed \x1b[39m\x1b[38;5;9mtest-failure.t\x1b[39m\x1b[38;5;88m: output changed\x1b[39m (esc) | |
141 | # Ran 1 tests, 0 skipped, 1 failed. |
|
141 | # Ran 1 tests, 0 skipped, 1 failed. | |
142 | python hash seed: * (glob) |
|
142 | python hash seed: * (glob) | |
143 | [1] |
|
143 | [1] | |
144 |
|
144 | |||
145 | $ rt test-failure.t 2> tmp.log |
|
145 | $ rt test-failure.t 2> tmp.log | |
146 | [1] |
|
146 | [1] | |
147 | $ cat tmp.log |
|
147 | $ cat tmp.log | |
148 |
|
148 | |||
149 | --- $TESTTMP/test-failure.t |
|
149 | --- $TESTTMP/test-failure.t | |
150 | +++ $TESTTMP/test-failure.t.err |
|
150 | +++ $TESTTMP/test-failure.t.err | |
151 | @@ -1,4 +1,4 @@ |
|
151 | @@ -1,4 +1,4 @@ | |
152 | $ echo "bar-baz"; echo "bar-bad"; echo foo |
|
152 | $ echo "bar-baz"; echo "bar-bad"; echo foo | |
153 | + bar*baz (glob) |
|
153 | + bar*baz (glob) | |
154 | bar*bad (glob) |
|
154 | bar*bad (glob) | |
155 | - bar*baz (glob) |
|
155 | - bar*baz (glob) | |
156 | - | fo (re) |
|
156 | - | fo (re) | |
157 | + foo |
|
157 | + foo | |
158 |
|
158 | |||
159 | ERROR: test-failure.t output changed |
|
159 | ERROR: test-failure.t output changed | |
160 | ! |
|
160 | ! | |
161 | Failed test-failure.t: output changed |
|
161 | Failed test-failure.t: output changed | |
162 | # Ran 1 tests, 0 skipped, 1 failed. |
|
162 | # Ran 1 tests, 0 skipped, 1 failed. | |
163 | python hash seed: * (glob) |
|
163 | python hash seed: * (glob) | |
164 | #endif |
|
164 | #endif | |
165 |
|
165 | |||
166 | $ cat > test-failure.t << EOF |
|
166 | $ cat > test-failure.t << EOF | |
167 | > $ true |
|
167 | > $ true | |
168 | > should go away (true !) |
|
168 | > should go away (true !) | |
169 | > $ true |
|
169 | > $ true | |
170 | > should stay (false !) |
|
170 | > should stay (false !) | |
171 | > |
|
171 | > | |
172 | > Should remove first line, not second or third |
|
172 | > Should remove first line, not second or third | |
173 | > $ echo 'testing' |
|
173 | > $ echo 'testing' | |
174 | > baz*foo (glob) (true !) |
|
174 | > baz*foo (glob) (true !) | |
175 | > foobar*foo (glob) (false !) |
|
175 | > foobar*foo (glob) (false !) | |
176 | > te*ting (glob) (true !) |
|
176 | > te*ting (glob) (true !) | |
177 | > |
|
177 | > | |
178 | > Should keep first two lines, remove third and last |
|
178 | > Should keep first two lines, remove third and last | |
179 | > $ echo 'testing' |
|
179 | > $ echo 'testing' | |
180 | > test.ng (re) (true !) |
|
180 | > test.ng (re) (true !) | |
181 | > foo.ar (re) (false !) |
|
181 | > foo.ar (re) (false !) | |
182 | > b.r (re) (true !) |
|
182 | > b.r (re) (true !) | |
183 | > missing (?) |
|
183 | > missing (?) | |
184 | > awol (true !) |
|
184 | > awol (true !) | |
185 | > |
|
185 | > | |
186 | > The "missing" line should stay, even though awol is dropped |
|
186 | > The "missing" line should stay, even though awol is dropped | |
187 | > $ echo 'testing' |
|
187 | > $ echo 'testing' | |
188 | > test.ng (re) (true !) |
|
188 | > test.ng (re) (true !) | |
189 | > foo.ar (?) |
|
189 | > foo.ar (?) | |
190 | > awol |
|
190 | > awol | |
191 | > missing (?) |
|
191 | > missing (?) | |
192 | > EOF |
|
192 | > EOF | |
193 | $ rt test-failure.t |
|
193 | $ rt test-failure.t | |
194 |
|
194 | |||
195 | --- $TESTTMP/test-failure.t |
|
195 | --- $TESTTMP/test-failure.t | |
196 | +++ $TESTTMP/test-failure.t.err |
|
196 | +++ $TESTTMP/test-failure.t.err | |
197 | @@ -1,11 +1,9 @@ |
|
197 | @@ -1,11 +1,9 @@ | |
198 | $ true |
|
198 | $ true | |
199 | - should go away (true !) |
|
199 | - should go away (true !) | |
200 | $ true |
|
200 | $ true | |
201 | should stay (false !) |
|
201 | should stay (false !) | |
202 |
|
202 | |||
203 | Should remove first line, not second or third |
|
203 | Should remove first line, not second or third | |
204 | $ echo 'testing' |
|
204 | $ echo 'testing' | |
205 | - baz*foo (glob) (true !) |
|
205 | - baz*foo (glob) (true !) | |
206 | foobar*foo (glob) (false !) |
|
206 | foobar*foo (glob) (false !) | |
207 | te*ting (glob) (true !) |
|
207 | te*ting (glob) (true !) | |
208 |
|
208 | |||
209 | foo.ar (re) (false !) |
|
209 | foo.ar (re) (false !) | |
210 | missing (?) |
|
210 | missing (?) | |
211 | @@ -13,13 +11,10 @@ |
|
211 | @@ -13,13 +11,10 @@ | |
212 | $ echo 'testing' |
|
212 | $ echo 'testing' | |
213 | test.ng (re) (true !) |
|
213 | test.ng (re) (true !) | |
214 | foo.ar (re) (false !) |
|
214 | foo.ar (re) (false !) | |
215 | - b.r (re) (true !) |
|
215 | - b.r (re) (true !) | |
216 | missing (?) |
|
216 | missing (?) | |
217 | - awol (true !) |
|
217 | - awol (true !) | |
218 |
|
218 | |||
219 | The "missing" line should stay, even though awol is dropped |
|
219 | The "missing" line should stay, even though awol is dropped | |
220 | $ echo 'testing' |
|
220 | $ echo 'testing' | |
221 | test.ng (re) (true !) |
|
221 | test.ng (re) (true !) | |
222 | foo.ar (?) |
|
222 | foo.ar (?) | |
223 | - awol |
|
223 | - awol | |
224 | missing (?) |
|
224 | missing (?) | |
225 |
|
225 | |||
226 | ERROR: test-failure.t output changed |
|
226 | ERROR: test-failure.t output changed | |
227 | ! |
|
227 | ! | |
228 | Failed test-failure.t: output changed |
|
228 | Failed test-failure.t: output changed | |
229 | # Ran 1 tests, 0 skipped, 1 failed. |
|
229 | # Ran 1 tests, 0 skipped, 1 failed. | |
230 | python hash seed: * (glob) |
|
230 | python hash seed: * (glob) | |
231 | [1] |
|
231 | [1] | |
232 |
|
232 | |||
233 | basic failing test |
|
233 | basic failing test | |
234 | $ cat > test-failure.t << EOF |
|
234 | $ cat > test-failure.t << EOF | |
235 | > $ echo babar |
|
235 | > $ echo babar | |
236 | > rataxes |
|
236 | > rataxes | |
237 | > This is a noop statement so that |
|
237 | > This is a noop statement so that | |
238 | > this test is still more bytes than success. |
|
238 | > this test is still more bytes than success. | |
239 | > pad pad pad pad............................................................ |
|
239 | > pad pad pad pad............................................................ | |
240 | > pad pad pad pad............................................................ |
|
240 | > pad pad pad pad............................................................ | |
241 | > pad pad pad pad............................................................ |
|
241 | > pad pad pad pad............................................................ | |
242 | > pad pad pad pad............................................................ |
|
242 | > pad pad pad pad............................................................ | |
243 | > pad pad pad pad............................................................ |
|
243 | > pad pad pad pad............................................................ | |
244 | > pad pad pad pad............................................................ |
|
244 | > pad pad pad pad............................................................ | |
245 | > EOF |
|
245 | > EOF | |
246 |
|
246 | |||
247 | >>> fh = open('test-failure-unicode.t', 'wb') |
|
247 | >>> fh = open('test-failure-unicode.t', 'wb') | |
248 | >>> fh.write(u' $ echo babar\u03b1\n'.encode('utf-8')) and None |
|
248 | >>> fh.write(u' $ echo babar\u03b1\n'.encode('utf-8')) and None | |
249 | >>> fh.write(u' l\u03b5\u03b5t\n'.encode('utf-8')) and None |
|
249 | >>> fh.write(u' l\u03b5\u03b5t\n'.encode('utf-8')) and None | |
250 |
|
250 | |||
251 | $ rt |
|
251 | $ rt | |
252 |
|
252 | |||
253 | --- $TESTTMP/test-failure.t |
|
253 | --- $TESTTMP/test-failure.t | |
254 | +++ $TESTTMP/test-failure.t.err |
|
254 | +++ $TESTTMP/test-failure.t.err | |
255 | @@ -1,5 +1,5 @@ |
|
255 | @@ -1,5 +1,5 @@ | |
256 | $ echo babar |
|
256 | $ echo babar | |
257 | - rataxes |
|
257 | - rataxes | |
258 | + babar |
|
258 | + babar | |
259 | This is a noop statement so that |
|
259 | This is a noop statement so that | |
260 | this test is still more bytes than success. |
|
260 | this test is still more bytes than success. | |
261 | pad pad pad pad............................................................ |
|
261 | pad pad pad pad............................................................ | |
262 |
|
262 | |||
263 | ERROR: test-failure.t output changed |
|
263 | ERROR: test-failure.t output changed | |
264 | !. |
|
264 | !. | |
265 | --- $TESTTMP/test-failure-unicode.t |
|
265 | --- $TESTTMP/test-failure-unicode.t | |
266 | +++ $TESTTMP/test-failure-unicode.t.err |
|
266 | +++ $TESTTMP/test-failure-unicode.t.err | |
267 | @@ -1,2 +1,2 @@ |
|
267 | @@ -1,2 +1,2 @@ | |
268 | $ echo babar\xce\xb1 (esc) |
|
268 | $ echo babar\xce\xb1 (esc) | |
269 | - l\xce\xb5\xce\xb5t (esc) |
|
269 | - l\xce\xb5\xce\xb5t (esc) | |
270 | + babar\xce\xb1 (esc) |
|
270 | + babar\xce\xb1 (esc) | |
271 |
|
271 | |||
272 | ERROR: test-failure-unicode.t output changed |
|
272 | ERROR: test-failure-unicode.t output changed | |
273 | ! |
|
273 | ! | |
274 | Failed test-failure.t: output changed |
|
274 | Failed test-failure.t: output changed | |
275 | Failed test-failure-unicode.t: output changed |
|
275 | Failed test-failure-unicode.t: output changed | |
276 | # Ran 3 tests, 0 skipped, 2 failed. |
|
276 | # Ran 3 tests, 0 skipped, 2 failed. | |
277 | python hash seed: * (glob) |
|
277 | python hash seed: * (glob) | |
278 | [1] |
|
278 | [1] | |
279 |
|
279 | |||
280 | test --outputdir |
|
280 | test --outputdir | |
281 | $ mkdir output |
|
281 | $ mkdir output | |
282 | $ rt --outputdir output |
|
282 | $ rt --outputdir output | |
283 |
|
283 | |||
284 | --- $TESTTMP/test-failure.t |
|
284 | --- $TESTTMP/test-failure.t | |
285 | +++ $TESTTMP/output/test-failure.t.err |
|
285 | +++ $TESTTMP/output/test-failure.t.err | |
286 | @@ -1,5 +1,5 @@ |
|
286 | @@ -1,5 +1,5 @@ | |
287 | $ echo babar |
|
287 | $ echo babar | |
288 | - rataxes |
|
288 | - rataxes | |
289 | + babar |
|
289 | + babar | |
290 | This is a noop statement so that |
|
290 | This is a noop statement so that | |
291 | this test is still more bytes than success. |
|
291 | this test is still more bytes than success. | |
292 | pad pad pad pad............................................................ |
|
292 | pad pad pad pad............................................................ | |
293 |
|
293 | |||
294 | ERROR: test-failure.t output changed |
|
294 | ERROR: test-failure.t output changed | |
295 | !. |
|
295 | !. | |
296 | --- $TESTTMP/test-failure-unicode.t |
|
296 | --- $TESTTMP/test-failure-unicode.t | |
297 | +++ $TESTTMP/output/test-failure-unicode.t.err |
|
297 | +++ $TESTTMP/output/test-failure-unicode.t.err | |
298 | @@ -1,2 +1,2 @@ |
|
298 | @@ -1,2 +1,2 @@ | |
299 | $ echo babar\xce\xb1 (esc) |
|
299 | $ echo babar\xce\xb1 (esc) | |
300 | - l\xce\xb5\xce\xb5t (esc) |
|
300 | - l\xce\xb5\xce\xb5t (esc) | |
301 | + babar\xce\xb1 (esc) |
|
301 | + babar\xce\xb1 (esc) | |
302 |
|
302 | |||
303 | ERROR: test-failure-unicode.t output changed |
|
303 | ERROR: test-failure-unicode.t output changed | |
304 | ! |
|
304 | ! | |
305 | Failed test-failure.t: output changed |
|
305 | Failed test-failure.t: output changed | |
306 | Failed test-failure-unicode.t: output changed |
|
306 | Failed test-failure-unicode.t: output changed | |
307 | # Ran 3 tests, 0 skipped, 2 failed. |
|
307 | # Ran 3 tests, 0 skipped, 2 failed. | |
308 | python hash seed: * (glob) |
|
308 | python hash seed: * (glob) | |
309 | [1] |
|
309 | [1] | |
310 | $ ls -a output |
|
310 | $ ls -a output | |
311 | . |
|
311 | . | |
312 | .. |
|
312 | .. | |
313 | .testtimes |
|
313 | .testtimes | |
314 | test-failure-unicode.t.err |
|
314 | test-failure-unicode.t.err | |
315 | test-failure.t.err |
|
315 | test-failure.t.err | |
316 |
|
316 | |||
317 | test --xunit support |
|
317 | test --xunit support | |
318 | $ rt --xunit=xunit.xml |
|
318 | $ rt --xunit=xunit.xml | |
319 |
|
319 | |||
320 | --- $TESTTMP/test-failure.t |
|
320 | --- $TESTTMP/test-failure.t | |
321 | +++ $TESTTMP/test-failure.t.err |
|
321 | +++ $TESTTMP/test-failure.t.err | |
322 | @@ -1,5 +1,5 @@ |
|
322 | @@ -1,5 +1,5 @@ | |
323 | $ echo babar |
|
323 | $ echo babar | |
324 | - rataxes |
|
324 | - rataxes | |
325 | + babar |
|
325 | + babar | |
326 | This is a noop statement so that |
|
326 | This is a noop statement so that | |
327 | this test is still more bytes than success. |
|
327 | this test is still more bytes than success. | |
328 | pad pad pad pad............................................................ |
|
328 | pad pad pad pad............................................................ | |
329 |
|
329 | |||
330 | ERROR: test-failure.t output changed |
|
330 | ERROR: test-failure.t output changed | |
331 | !. |
|
331 | !. | |
332 | --- $TESTTMP/test-failure-unicode.t |
|
332 | --- $TESTTMP/test-failure-unicode.t | |
333 | +++ $TESTTMP/test-failure-unicode.t.err |
|
333 | +++ $TESTTMP/test-failure-unicode.t.err | |
334 | @@ -1,2 +1,2 @@ |
|
334 | @@ -1,2 +1,2 @@ | |
335 | $ echo babar\xce\xb1 (esc) |
|
335 | $ echo babar\xce\xb1 (esc) | |
336 | - l\xce\xb5\xce\xb5t (esc) |
|
336 | - l\xce\xb5\xce\xb5t (esc) | |
337 | + babar\xce\xb1 (esc) |
|
337 | + babar\xce\xb1 (esc) | |
338 |
|
338 | |||
339 | ERROR: test-failure-unicode.t output changed |
|
339 | ERROR: test-failure-unicode.t output changed | |
340 | ! |
|
340 | ! | |
341 | Failed test-failure.t: output changed |
|
341 | Failed test-failure.t: output changed | |
342 | Failed test-failure-unicode.t: output changed |
|
342 | Failed test-failure-unicode.t: output changed | |
343 | # Ran 3 tests, 0 skipped, 2 failed. |
|
343 | # Ran 3 tests, 0 skipped, 2 failed. | |
344 | python hash seed: * (glob) |
|
344 | python hash seed: * (glob) | |
345 | [1] |
|
345 | [1] | |
346 | $ cat xunit.xml |
|
346 | $ cat xunit.xml | |
347 | <?xml version="1.0" encoding="utf-8"?> |
|
347 | <?xml version="1.0" encoding="utf-8"?> | |
348 | <testsuite errors="0" failures="2" name="run-tests" skipped="0" tests="3"> |
|
348 | <testsuite errors="0" failures="2" name="run-tests" skipped="0" tests="3"> | |
349 | <testcase name="test-success.t" time="*"/> (glob) |
|
349 | <testcase name="test-success.t" time="*"/> (glob) | |
350 | <testcase name="test-failure-unicode.t" time="*"> (glob) |
|
350 | <testcase name="test-failure-unicode.t" time="*"> (glob) | |
351 | <failure message="output changed" type="output-mismatch"> |
|
351 | <failure message="output changed" type="output-mismatch"> | |
352 | <![CDATA[--- $TESTTMP/test-failure-unicode.t |
|
352 | <![CDATA[--- $TESTTMP/test-failure-unicode.t | |
353 | +++ $TESTTMP/test-failure-unicode.t.err |
|
353 | +++ $TESTTMP/test-failure-unicode.t.err | |
354 | @@ -1,2 +1,2 @@ |
|
354 | @@ -1,2 +1,2 @@ | |
355 | $ echo babar\xce\xb1 (esc) |
|
355 | $ echo babar\xce\xb1 (esc) | |
356 | - l\xce\xb5\xce\xb5t (esc) |
|
356 | - l\xce\xb5\xce\xb5t (esc) | |
357 | + babar\xce\xb1 (esc) |
|
357 | + babar\xce\xb1 (esc) | |
358 | ]]> </failure> |
|
358 | ]]> </failure> | |
359 | </testcase> |
|
359 | </testcase> | |
360 | <testcase name="test-failure.t" time="*"> (glob) |
|
360 | <testcase name="test-failure.t" time="*"> (glob) | |
361 | <failure message="output changed" type="output-mismatch"> |
|
361 | <failure message="output changed" type="output-mismatch"> | |
362 | <![CDATA[--- $TESTTMP/test-failure.t |
|
362 | <![CDATA[--- $TESTTMP/test-failure.t | |
363 | +++ $TESTTMP/test-failure.t.err |
|
363 | +++ $TESTTMP/test-failure.t.err | |
364 | @@ -1,5 +1,5 @@ |
|
364 | @@ -1,5 +1,5 @@ | |
365 | $ echo babar |
|
365 | $ echo babar | |
366 | - rataxes |
|
366 | - rataxes | |
367 | + babar |
|
367 | + babar | |
368 | This is a noop statement so that |
|
368 | This is a noop statement so that | |
369 | this test is still more bytes than success. |
|
369 | this test is still more bytes than success. | |
370 | pad pad pad pad............................................................ |
|
370 | pad pad pad pad............................................................ | |
371 | ]]> </failure> |
|
371 | ]]> </failure> | |
372 | </testcase> |
|
372 | </testcase> | |
373 | </testsuite> |
|
373 | </testsuite> | |
374 |
|
374 | |||
375 | $ cat .testtimes |
|
375 | $ cat .testtimes | |
376 | test-empty.t * (glob) |
|
376 | test-empty.t * (glob) | |
377 | test-failure-unicode.t * (glob) |
|
377 | test-failure-unicode.t * (glob) | |
378 | test-failure.t * (glob) |
|
378 | test-failure.t * (glob) | |
379 | test-success.t * (glob) |
|
379 | test-success.t * (glob) | |
380 |
|
380 | |||
381 | $ rt --list-tests |
|
381 | $ rt --list-tests | |
382 | test-failure-unicode.t |
|
382 | test-failure-unicode.t | |
383 | test-failure.t |
|
383 | test-failure.t | |
384 | test-success.t |
|
384 | test-success.t | |
385 |
|
385 | |||
386 | $ rt --list-tests --json |
|
386 | $ rt --list-tests --json | |
387 | test-failure-unicode.t |
|
387 | test-failure-unicode.t | |
388 | test-failure.t |
|
388 | test-failure.t | |
389 | test-success.t |
|
389 | test-success.t | |
390 | $ cat report.json |
|
390 | $ cat report.json | |
391 | testreport ={ |
|
391 | testreport ={ | |
392 | "test-failure-unicode.t": { |
|
392 | "test-failure-unicode.t": { | |
393 | "result": "success" |
|
393 | "result": "success" | |
394 | }, |
|
394 | }, | |
395 | "test-failure.t": { |
|
395 | "test-failure.t": { | |
396 | "result": "success" |
|
396 | "result": "success" | |
397 | }, |
|
397 | }, | |
398 | "test-success.t": { |
|
398 | "test-success.t": { | |
399 | "result": "success" |
|
399 | "result": "success" | |
400 | } |
|
400 | } | |
401 | } (no-eol) |
|
401 | } (no-eol) | |
402 |
|
402 | |||
403 | $ rt --list-tests --xunit=xunit.xml |
|
403 | $ rt --list-tests --xunit=xunit.xml | |
404 | test-failure-unicode.t |
|
404 | test-failure-unicode.t | |
405 | test-failure.t |
|
405 | test-failure.t | |
406 | test-success.t |
|
406 | test-success.t | |
407 | $ cat xunit.xml |
|
407 | $ cat xunit.xml | |
408 | <?xml version="1.0" encoding="utf-8"?> |
|
408 | <?xml version="1.0" encoding="utf-8"?> | |
409 | <testsuite errors="0" failures="0" name="run-tests" skipped="0" tests="0"> |
|
409 | <testsuite errors="0" failures="0" name="run-tests" skipped="0" tests="0"> | |
410 | <testcase name="test-failure-unicode.t"/> |
|
410 | <testcase name="test-failure-unicode.t"/> | |
411 | <testcase name="test-failure.t"/> |
|
411 | <testcase name="test-failure.t"/> | |
412 | <testcase name="test-success.t"/> |
|
412 | <testcase name="test-success.t"/> | |
413 | </testsuite> |
|
413 | </testsuite> | |
414 |
|
414 | |||
415 | $ rt --list-tests test-failure* --json --xunit=xunit.xml --outputdir output |
|
415 | $ rt --list-tests test-failure* --json --xunit=xunit.xml --outputdir output | |
416 | test-failure-unicode.t |
|
416 | test-failure-unicode.t | |
417 | test-failure.t |
|
417 | test-failure.t | |
418 | $ cat output/report.json |
|
418 | $ cat output/report.json | |
419 | testreport ={ |
|
419 | testreport ={ | |
420 | "test-failure-unicode.t": { |
|
420 | "test-failure-unicode.t": { | |
421 | "result": "success" |
|
421 | "result": "success" | |
422 | }, |
|
422 | }, | |
423 | "test-failure.t": { |
|
423 | "test-failure.t": { | |
424 | "result": "success" |
|
424 | "result": "success" | |
425 | } |
|
425 | } | |
426 | } (no-eol) |
|
426 | } (no-eol) | |
427 | $ cat xunit.xml |
|
427 | $ cat xunit.xml | |
428 | <?xml version="1.0" encoding="utf-8"?> |
|
428 | <?xml version="1.0" encoding="utf-8"?> | |
429 | <testsuite errors="0" failures="0" name="run-tests" skipped="0" tests="0"> |
|
429 | <testsuite errors="0" failures="0" name="run-tests" skipped="0" tests="0"> | |
430 | <testcase name="test-failure-unicode.t"/> |
|
430 | <testcase name="test-failure-unicode.t"/> | |
431 | <testcase name="test-failure.t"/> |
|
431 | <testcase name="test-failure.t"/> | |
432 | </testsuite> |
|
432 | </testsuite> | |
433 |
|
433 | |||
434 | $ rm test-failure-unicode.t |
|
434 | $ rm test-failure-unicode.t | |
435 |
|
435 | |||
436 | test for --retest |
|
436 | test for --retest | |
437 | ==================== |
|
437 | ==================== | |
438 |
|
438 | |||
439 | $ rt --retest |
|
439 | $ rt --retest | |
440 |
|
440 | |||
441 | --- $TESTTMP/test-failure.t |
|
441 | --- $TESTTMP/test-failure.t | |
442 | +++ $TESTTMP/test-failure.t.err |
|
442 | +++ $TESTTMP/test-failure.t.err | |
443 | @@ -1,5 +1,5 @@ |
|
443 | @@ -1,5 +1,5 @@ | |
444 | $ echo babar |
|
444 | $ echo babar | |
445 | - rataxes |
|
445 | - rataxes | |
446 | + babar |
|
446 | + babar | |
447 | This is a noop statement so that |
|
447 | This is a noop statement so that | |
448 | this test is still more bytes than success. |
|
448 | this test is still more bytes than success. | |
449 | pad pad pad pad............................................................ |
|
449 | pad pad pad pad............................................................ | |
450 |
|
450 | |||
451 | ERROR: test-failure.t output changed |
|
451 | ERROR: test-failure.t output changed | |
452 | ! |
|
452 | ! | |
453 | Failed test-failure.t: output changed |
|
453 | Failed test-failure.t: output changed | |
454 | # Ran 2 tests, 1 skipped, 1 failed. |
|
454 | # Ran 2 tests, 1 skipped, 1 failed. | |
455 | python hash seed: * (glob) |
|
455 | python hash seed: * (glob) | |
456 | [1] |
|
456 | [1] | |
457 |
|
457 | |||
458 | --retest works with --outputdir |
|
458 | --retest works with --outputdir | |
459 | $ rm -r output |
|
459 | $ rm -r output | |
460 | $ mkdir output |
|
460 | $ mkdir output | |
461 | $ mv test-failure.t.err output |
|
461 | $ mv test-failure.t.err output | |
462 | $ rt --retest --outputdir output |
|
462 | $ rt --retest --outputdir output | |
463 |
|
463 | |||
464 | --- $TESTTMP/test-failure.t |
|
464 | --- $TESTTMP/test-failure.t | |
465 | +++ $TESTTMP/output/test-failure.t.err |
|
465 | +++ $TESTTMP/output/test-failure.t.err | |
466 | @@ -1,5 +1,5 @@ |
|
466 | @@ -1,5 +1,5 @@ | |
467 | $ echo babar |
|
467 | $ echo babar | |
468 | - rataxes |
|
468 | - rataxes | |
469 | + babar |
|
469 | + babar | |
470 | This is a noop statement so that |
|
470 | This is a noop statement so that | |
471 | this test is still more bytes than success. |
|
471 | this test is still more bytes than success. | |
472 | pad pad pad pad............................................................ |
|
472 | pad pad pad pad............................................................ | |
473 |
|
473 | |||
474 | ERROR: test-failure.t output changed |
|
474 | ERROR: test-failure.t output changed | |
475 | ! |
|
475 | ! | |
476 | Failed test-failure.t: output changed |
|
476 | Failed test-failure.t: output changed | |
477 | # Ran 2 tests, 1 skipped, 1 failed. |
|
477 | # Ran 2 tests, 1 skipped, 1 failed. | |
478 | python hash seed: * (glob) |
|
478 | python hash seed: * (glob) | |
479 | [1] |
|
479 | [1] | |
480 |
|
480 | |||
481 | Selecting Tests To Run |
|
481 | Selecting Tests To Run | |
482 | ====================== |
|
482 | ====================== | |
483 |
|
483 | |||
484 | successful |
|
484 | successful | |
485 |
|
485 | |||
486 | $ rt test-success.t |
|
486 | $ rt test-success.t | |
487 | . |
|
487 | . | |
488 | # Ran 1 tests, 0 skipped, 0 failed. |
|
488 | # Ran 1 tests, 0 skipped, 0 failed. | |
489 |
|
489 | |||
490 | success w/ keyword |
|
490 | success w/ keyword | |
491 | $ rt -k xyzzy |
|
491 | $ rt -k xyzzy | |
492 | . |
|
492 | . | |
493 | # Ran 2 tests, 1 skipped, 0 failed. |
|
493 | # Ran 2 tests, 1 skipped, 0 failed. | |
494 |
|
494 | |||
495 | failed |
|
495 | failed | |
496 |
|
496 | |||
497 | $ rt test-failure.t |
|
497 | $ rt test-failure.t | |
498 |
|
498 | |||
499 | --- $TESTTMP/test-failure.t |
|
499 | --- $TESTTMP/test-failure.t | |
500 | +++ $TESTTMP/test-failure.t.err |
|
500 | +++ $TESTTMP/test-failure.t.err | |
501 | @@ -1,5 +1,5 @@ |
|
501 | @@ -1,5 +1,5 @@ | |
502 | $ echo babar |
|
502 | $ echo babar | |
503 | - rataxes |
|
503 | - rataxes | |
504 | + babar |
|
504 | + babar | |
505 | This is a noop statement so that |
|
505 | This is a noop statement so that | |
506 | this test is still more bytes than success. |
|
506 | this test is still more bytes than success. | |
507 | pad pad pad pad............................................................ |
|
507 | pad pad pad pad............................................................ | |
508 |
|
508 | |||
509 | ERROR: test-failure.t output changed |
|
509 | ERROR: test-failure.t output changed | |
510 | ! |
|
510 | ! | |
511 | Failed test-failure.t: output changed |
|
511 | Failed test-failure.t: output changed | |
512 | # Ran 1 tests, 0 skipped, 1 failed. |
|
512 | # Ran 1 tests, 0 skipped, 1 failed. | |
513 | python hash seed: * (glob) |
|
513 | python hash seed: * (glob) | |
514 | [1] |
|
514 | [1] | |
515 |
|
515 | |||
516 | failure w/ keyword |
|
516 | failure w/ keyword | |
517 | $ rt -k rataxes |
|
517 | $ rt -k rataxes | |
518 |
|
518 | |||
519 | --- $TESTTMP/test-failure.t |
|
519 | --- $TESTTMP/test-failure.t | |
520 | +++ $TESTTMP/test-failure.t.err |
|
520 | +++ $TESTTMP/test-failure.t.err | |
521 | @@ -1,5 +1,5 @@ |
|
521 | @@ -1,5 +1,5 @@ | |
522 | $ echo babar |
|
522 | $ echo babar | |
523 | - rataxes |
|
523 | - rataxes | |
524 | + babar |
|
524 | + babar | |
525 | This is a noop statement so that |
|
525 | This is a noop statement so that | |
526 | this test is still more bytes than success. |
|
526 | this test is still more bytes than success. | |
527 | pad pad pad pad............................................................ |
|
527 | pad pad pad pad............................................................ | |
528 |
|
528 | |||
529 | ERROR: test-failure.t output changed |
|
529 | ERROR: test-failure.t output changed | |
530 | ! |
|
530 | ! | |
531 | Failed test-failure.t: output changed |
|
531 | Failed test-failure.t: output changed | |
532 | # Ran 2 tests, 1 skipped, 1 failed. |
|
532 | # Ran 2 tests, 1 skipped, 1 failed. | |
533 | python hash seed: * (glob) |
|
533 | python hash seed: * (glob) | |
534 | [1] |
|
534 | [1] | |
535 |
|
535 | |||
536 | Verify that when a process fails to start we show a useful message |
|
536 | Verify that when a process fails to start we show a useful message | |
537 | ================================================================== |
|
537 | ================================================================== | |
538 |
|
538 | |||
539 | $ cat > test-serve-fail.t <<EOF |
|
539 | $ cat > test-serve-fail.t <<EOF | |
540 | > $ echo 'abort: child process failed to start blah' |
|
540 | > $ echo 'abort: child process failed to start blah' | |
541 | > EOF |
|
541 | > EOF | |
542 | $ rt test-serve-fail.t |
|
542 | $ rt test-serve-fail.t | |
543 |
|
543 | |||
544 | --- $TESTTMP/test-serve-fail.t |
|
544 | --- $TESTTMP/test-serve-fail.t | |
545 | +++ $TESTTMP/test-serve-fail.t.err |
|
545 | +++ $TESTTMP/test-serve-fail.t.err | |
546 | @@ -1* +1,2 @@ (glob) |
|
546 | @@ -1* +1,2 @@ (glob) | |
547 | $ echo 'abort: child process failed to start blah' |
|
547 | $ echo 'abort: child process failed to start blah' | |
548 | + abort: child process failed to start blah |
|
548 | + abort: child process failed to start blah | |
549 |
|
549 | |||
550 | ERROR: test-serve-fail.t output changed |
|
550 | ERROR: test-serve-fail.t output changed | |
551 | ! |
|
551 | ! | |
552 | Failed test-serve-fail.t: server failed to start (HGPORT=*) (glob) |
|
552 | Failed test-serve-fail.t: server failed to start (HGPORT=*) (glob) | |
553 | # Ran 1 tests, 0 skipped, 1 failed. |
|
553 | # Ran 1 tests, 0 skipped, 1 failed. | |
554 | python hash seed: * (glob) |
|
554 | python hash seed: * (glob) | |
555 | [1] |
|
555 | [1] | |
556 | $ rm test-serve-fail.t |
|
556 | $ rm test-serve-fail.t | |
557 |
|
557 | |||
558 | Verify that we can try other ports |
|
558 | Verify that we can try other ports | |
559 | =================================== |
|
559 | =================================== | |
560 |
|
560 | |||
561 | Extensions aren't inherited by the invoked run-tests.py. An extension |
|
561 | Extensions aren't inherited by the invoked run-tests.py. An extension | |
562 | introducing a repository requirement could cause this to fail. So we force |
|
562 | introducing a repository requirement could cause this to fail. So we force | |
563 | HGRCPATH to get a clean environment. |
|
563 | HGRCPATH to get a clean environment. | |
564 |
|
564 | |||
565 | $ HGRCPATH= hg init inuse |
|
565 | $ HGRCPATH= hg init inuse | |
566 | $ hg serve -R inuse -p $HGPORT -d --pid-file=blocks.pid |
|
566 | $ hg serve -R inuse -p $HGPORT -d --pid-file=blocks.pid | |
567 | $ cat blocks.pid >> $DAEMON_PIDS |
|
567 | $ cat blocks.pid >> $DAEMON_PIDS | |
568 | $ cat > test-serve-inuse.t <<EOF |
|
568 | $ cat > test-serve-inuse.t <<EOF | |
569 | > $ hg serve -R `pwd`/inuse -p \$HGPORT -d --pid-file=hg.pid |
|
569 | > $ hg serve -R `pwd`/inuse -p \$HGPORT -d --pid-file=hg.pid | |
570 | > $ cat hg.pid >> \$DAEMON_PIDS |
|
570 | > $ cat hg.pid >> \$DAEMON_PIDS | |
571 | > EOF |
|
571 | > EOF | |
572 | $ rt test-serve-inuse.t |
|
572 | $ rt test-serve-inuse.t | |
573 | . |
|
573 | . | |
574 | # Ran 1 tests, 0 skipped, 0 failed. |
|
574 | # Ran 1 tests, 0 skipped, 0 failed. | |
575 | $ rm test-serve-inuse.t |
|
575 | $ rm test-serve-inuse.t | |
576 | $ killdaemons.py $DAEMON_PIDS |
|
576 | $ killdaemons.py $DAEMON_PIDS | |
577 | $ rm $DAEMON_PIDS |
|
|||
578 |
|
577 | |||
579 | Running In Debug Mode |
|
578 | Running In Debug Mode | |
580 | ====================== |
|
579 | ====================== | |
581 |
|
580 | |||
582 | $ rt --debug 2>&1 | grep -v pwd |
|
581 | $ rt --debug 2>&1 | grep -v pwd | |
583 | + echo *SALT* 0 0 (glob) |
|
582 | + echo *SALT* 0 0 (glob) | |
584 | *SALT* 0 0 (glob) |
|
583 | *SALT* 0 0 (glob) | |
585 | + echo babar |
|
584 | + echo babar | |
586 | babar |
|
585 | babar | |
587 | + echo *SALT* 10 0 (glob) |
|
586 | + echo *SALT* 10 0 (glob) | |
588 | *SALT* 10 0 (glob) |
|
587 | *SALT* 10 0 (glob) | |
589 | *+ echo *SALT* 0 0 (glob) |
|
588 | *+ echo *SALT* 0 0 (glob) | |
590 | *SALT* 0 0 (glob) |
|
589 | *SALT* 0 0 (glob) | |
591 | + echo babar |
|
590 | + echo babar | |
592 | babar |
|
591 | babar | |
593 | + echo *SALT* 2 0 (glob) |
|
592 | + echo *SALT* 2 0 (glob) | |
594 | *SALT* 2 0 (glob) |
|
593 | *SALT* 2 0 (glob) | |
595 | + echo xyzzy |
|
594 | + echo xyzzy | |
596 | xyzzy |
|
595 | xyzzy | |
597 | + echo *SALT* 9 0 (glob) |
|
596 | + echo *SALT* 9 0 (glob) | |
598 | *SALT* 9 0 (glob) |
|
597 | *SALT* 9 0 (glob) | |
599 | + printf *abc\ndef\nxyz\n* (glob) |
|
598 | + printf *abc\ndef\nxyz\n* (glob) | |
600 | abc |
|
599 | abc | |
601 | def |
|
600 | def | |
602 | xyz |
|
601 | xyz | |
603 | + echo *SALT* 15 0 (glob) |
|
602 | + echo *SALT* 15 0 (glob) | |
604 | *SALT* 15 0 (glob) |
|
603 | *SALT* 15 0 (glob) | |
605 | + printf *zyx\nwvu\ntsr\n* (glob) |
|
604 | + printf *zyx\nwvu\ntsr\n* (glob) | |
606 | zyx |
|
605 | zyx | |
607 | wvu |
|
606 | wvu | |
608 | tsr |
|
607 | tsr | |
609 | + echo *SALT* 22 0 (glob) |
|
608 | + echo *SALT* 22 0 (glob) | |
610 | *SALT* 22 0 (glob) |
|
609 | *SALT* 22 0 (glob) | |
611 | . |
|
610 | . | |
612 | # Ran 2 tests, 0 skipped, 0 failed. |
|
611 | # Ran 2 tests, 0 skipped, 0 failed. | |
613 |
|
612 | |||
614 | Parallel runs |
|
613 | Parallel runs | |
615 | ============== |
|
614 | ============== | |
616 |
|
615 | |||
617 | (duplicate the failing test to get predictable output) |
|
616 | (duplicate the failing test to get predictable output) | |
618 | $ cp test-failure.t test-failure-copy.t |
|
617 | $ cp test-failure.t test-failure-copy.t | |
619 |
|
618 | |||
620 | $ rt --jobs 2 test-failure*.t -n |
|
619 | $ rt --jobs 2 test-failure*.t -n | |
621 | !! |
|
620 | !! | |
622 | Failed test-failure*.t: output changed (glob) |
|
621 | Failed test-failure*.t: output changed (glob) | |
623 | Failed test-failure*.t: output changed (glob) |
|
622 | Failed test-failure*.t: output changed (glob) | |
624 | # Ran 2 tests, 0 skipped, 2 failed. |
|
623 | # Ran 2 tests, 0 skipped, 2 failed. | |
625 | python hash seed: * (glob) |
|
624 | python hash seed: * (glob) | |
626 | [1] |
|
625 | [1] | |
627 |
|
626 | |||
628 | failures in parallel with --first should only print one failure |
|
627 | failures in parallel with --first should only print one failure | |
629 | $ rt --jobs 2 --first test-failure*.t |
|
628 | $ rt --jobs 2 --first test-failure*.t | |
630 |
|
629 | |||
631 | --- $TESTTMP/test-failure*.t (glob) |
|
630 | --- $TESTTMP/test-failure*.t (glob) | |
632 | +++ $TESTTMP/test-failure*.t.err (glob) |
|
631 | +++ $TESTTMP/test-failure*.t.err (glob) | |
633 | @@ -1,5 +1,5 @@ |
|
632 | @@ -1,5 +1,5 @@ | |
634 | $ echo babar |
|
633 | $ echo babar | |
635 | - rataxes |
|
634 | - rataxes | |
636 | + babar |
|
635 | + babar | |
637 | This is a noop statement so that |
|
636 | This is a noop statement so that | |
638 | this test is still more bytes than success. |
|
637 | this test is still more bytes than success. | |
639 | pad pad pad pad............................................................ |
|
638 | pad pad pad pad............................................................ | |
640 |
|
639 | |||
641 | Failed test-failure*.t: output changed (glob) |
|
640 | Failed test-failure*.t: output changed (glob) | |
642 | Failed test-failure*.t: output changed (glob) |
|
641 | Failed test-failure*.t: output changed (glob) | |
643 | # Ran 2 tests, 0 skipped, 2 failed. |
|
642 | # Ran 2 tests, 0 skipped, 2 failed. | |
644 | python hash seed: * (glob) |
|
643 | python hash seed: * (glob) | |
645 | [1] |
|
644 | [1] | |
646 |
|
645 | |||
647 |
|
646 | |||
648 | (delete the duplicated test file) |
|
647 | (delete the duplicated test file) | |
649 | $ rm test-failure-copy.t |
|
648 | $ rm test-failure-copy.t | |
650 |
|
649 | |||
651 |
|
650 | |||
652 | Interactive run |
|
651 | Interactive run | |
653 | =============== |
|
652 | =============== | |
654 |
|
653 | |||
655 | (backup the failing test) |
|
654 | (backup the failing test) | |
656 | $ cp test-failure.t backup |
|
655 | $ cp test-failure.t backup | |
657 |
|
656 | |||
658 | Refuse the fix |
|
657 | Refuse the fix | |
659 |
|
658 | |||
660 | $ echo 'n' | rt -i |
|
659 | $ echo 'n' | rt -i | |
661 |
|
660 | |||
662 | --- $TESTTMP/test-failure.t |
|
661 | --- $TESTTMP/test-failure.t | |
663 | +++ $TESTTMP/test-failure.t.err |
|
662 | +++ $TESTTMP/test-failure.t.err | |
664 | @@ -1,5 +1,5 @@ |
|
663 | @@ -1,5 +1,5 @@ | |
665 | $ echo babar |
|
664 | $ echo babar | |
666 | - rataxes |
|
665 | - rataxes | |
667 | + babar |
|
666 | + babar | |
668 | This is a noop statement so that |
|
667 | This is a noop statement so that | |
669 | this test is still more bytes than success. |
|
668 | this test is still more bytes than success. | |
670 | pad pad pad pad............................................................ |
|
669 | pad pad pad pad............................................................ | |
671 | Accept this change? [n] |
|
670 | Accept this change? [n] | |
672 | ERROR: test-failure.t output changed |
|
671 | ERROR: test-failure.t output changed | |
673 | !. |
|
672 | !. | |
674 | Failed test-failure.t: output changed |
|
673 | Failed test-failure.t: output changed | |
675 | # Ran 2 tests, 0 skipped, 1 failed. |
|
674 | # Ran 2 tests, 0 skipped, 1 failed. | |
676 | python hash seed: * (glob) |
|
675 | python hash seed: * (glob) | |
677 | [1] |
|
676 | [1] | |
678 |
|
677 | |||
679 | $ cat test-failure.t |
|
678 | $ cat test-failure.t | |
680 | $ echo babar |
|
679 | $ echo babar | |
681 | rataxes |
|
680 | rataxes | |
682 | This is a noop statement so that |
|
681 | This is a noop statement so that | |
683 | this test is still more bytes than success. |
|
682 | this test is still more bytes than success. | |
684 | pad pad pad pad............................................................ |
|
683 | pad pad pad pad............................................................ | |
685 | pad pad pad pad............................................................ |
|
684 | pad pad pad pad............................................................ | |
686 | pad pad pad pad............................................................ |
|
685 | pad pad pad pad............................................................ | |
687 | pad pad pad pad............................................................ |
|
686 | pad pad pad pad............................................................ | |
688 | pad pad pad pad............................................................ |
|
687 | pad pad pad pad............................................................ | |
689 | pad pad pad pad............................................................ |
|
688 | pad pad pad pad............................................................ | |
690 |
|
689 | |||
691 | Interactive with custom view |
|
690 | Interactive with custom view | |
692 |
|
691 | |||
693 | $ echo 'n' | rt -i --view echo |
|
692 | $ echo 'n' | rt -i --view echo | |
694 | $TESTTMP/test-failure.t $TESTTMP/test-failure.t.err |
|
693 | $TESTTMP/test-failure.t $TESTTMP/test-failure.t.err | |
695 | Accept this change? [n]* (glob) |
|
694 | Accept this change? [n]* (glob) | |
696 | ERROR: test-failure.t output changed |
|
695 | ERROR: test-failure.t output changed | |
697 | !. |
|
696 | !. | |
698 | Failed test-failure.t: output changed |
|
697 | Failed test-failure.t: output changed | |
699 | # Ran 2 tests, 0 skipped, 1 failed. |
|
698 | # Ran 2 tests, 0 skipped, 1 failed. | |
700 | python hash seed: * (glob) |
|
699 | python hash seed: * (glob) | |
701 | [1] |
|
700 | [1] | |
702 |
|
701 | |||
703 | View the fix |
|
702 | View the fix | |
704 |
|
703 | |||
705 | $ echo 'y' | rt --view echo |
|
704 | $ echo 'y' | rt --view echo | |
706 | $TESTTMP/test-failure.t $TESTTMP/test-failure.t.err |
|
705 | $TESTTMP/test-failure.t $TESTTMP/test-failure.t.err | |
707 |
|
706 | |||
708 | ERROR: test-failure.t output changed |
|
707 | ERROR: test-failure.t output changed | |
709 | !. |
|
708 | !. | |
710 | Failed test-failure.t: output changed |
|
709 | Failed test-failure.t: output changed | |
711 | # Ran 2 tests, 0 skipped, 1 failed. |
|
710 | # Ran 2 tests, 0 skipped, 1 failed. | |
712 | python hash seed: * (glob) |
|
711 | python hash seed: * (glob) | |
713 | [1] |
|
712 | [1] | |
714 |
|
713 | |||
715 | Accept the fix |
|
714 | Accept the fix | |
716 |
|
715 | |||
717 | $ cat >> test-failure.t <<EOF |
|
716 | $ cat >> test-failure.t <<EOF | |
718 | > $ echo 'saved backup bundle to \$TESTTMP/foo.hg' |
|
717 | > $ echo 'saved backup bundle to \$TESTTMP/foo.hg' | |
719 | > saved backup bundle to \$TESTTMP/foo.hg |
|
718 | > saved backup bundle to \$TESTTMP/foo.hg | |
720 | > $ echo 'saved backup bundle to \$TESTTMP/foo.hg' |
|
719 | > $ echo 'saved backup bundle to \$TESTTMP/foo.hg' | |
721 | > saved backup bundle to $TESTTMP\\foo.hg |
|
720 | > saved backup bundle to $TESTTMP\\foo.hg | |
722 | > $ echo 'saved backup bundle to \$TESTTMP/foo.hg' |
|
721 | > $ echo 'saved backup bundle to \$TESTTMP/foo.hg' | |
723 | > saved backup bundle to \$TESTTMP/*.hg (glob) |
|
722 | > saved backup bundle to \$TESTTMP/*.hg (glob) | |
724 | > EOF |
|
723 | > EOF | |
725 | $ echo 'y' | rt -i 2>&1 |
|
724 | $ echo 'y' | rt -i 2>&1 | |
726 |
|
725 | |||
727 | --- $TESTTMP/test-failure.t |
|
726 | --- $TESTTMP/test-failure.t | |
728 | +++ $TESTTMP/test-failure.t.err |
|
727 | +++ $TESTTMP/test-failure.t.err | |
729 | @@ -1,5 +1,5 @@ |
|
728 | @@ -1,5 +1,5 @@ | |
730 | $ echo babar |
|
729 | $ echo babar | |
731 | - rataxes |
|
730 | - rataxes | |
732 | + babar |
|
731 | + babar | |
733 | This is a noop statement so that |
|
732 | This is a noop statement so that | |
734 | this test is still more bytes than success. |
|
733 | this test is still more bytes than success. | |
735 | pad pad pad pad............................................................ |
|
734 | pad pad pad pad............................................................ | |
736 | @@ -11,6 +11,6 @@ |
|
735 | @@ -11,6 +11,6 @@ | |
737 | $ echo 'saved backup bundle to $TESTTMP/foo.hg' |
|
736 | $ echo 'saved backup bundle to $TESTTMP/foo.hg' | |
738 | saved backup bundle to $TESTTMP/foo.hg |
|
737 | saved backup bundle to $TESTTMP/foo.hg | |
739 | $ echo 'saved backup bundle to $TESTTMP/foo.hg' |
|
738 | $ echo 'saved backup bundle to $TESTTMP/foo.hg' | |
740 | - saved backup bundle to $TESTTMP\foo.hg |
|
739 | - saved backup bundle to $TESTTMP\foo.hg | |
741 | + saved backup bundle to $TESTTMP/foo.hg |
|
740 | + saved backup bundle to $TESTTMP/foo.hg | |
742 | $ echo 'saved backup bundle to $TESTTMP/foo.hg' |
|
741 | $ echo 'saved backup bundle to $TESTTMP/foo.hg' | |
743 | saved backup bundle to $TESTTMP/*.hg (glob) |
|
742 | saved backup bundle to $TESTTMP/*.hg (glob) | |
744 | Accept this change? [n] .. |
|
743 | Accept this change? [n] .. | |
745 | # Ran 2 tests, 0 skipped, 0 failed. |
|
744 | # Ran 2 tests, 0 skipped, 0 failed. | |
746 |
|
745 | |||
747 | $ sed -e 's,(glob)$,&<,g' test-failure.t |
|
746 | $ sed -e 's,(glob)$,&<,g' test-failure.t | |
748 | $ echo babar |
|
747 | $ echo babar | |
749 | babar |
|
748 | babar | |
750 | This is a noop statement so that |
|
749 | This is a noop statement so that | |
751 | this test is still more bytes than success. |
|
750 | this test is still more bytes than success. | |
752 | pad pad pad pad............................................................ |
|
751 | pad pad pad pad............................................................ | |
753 | pad pad pad pad............................................................ |
|
752 | pad pad pad pad............................................................ | |
754 | pad pad pad pad............................................................ |
|
753 | pad pad pad pad............................................................ | |
755 | pad pad pad pad............................................................ |
|
754 | pad pad pad pad............................................................ | |
756 | pad pad pad pad............................................................ |
|
755 | pad pad pad pad............................................................ | |
757 | pad pad pad pad............................................................ |
|
756 | pad pad pad pad............................................................ | |
758 | $ echo 'saved backup bundle to $TESTTMP/foo.hg' |
|
757 | $ echo 'saved backup bundle to $TESTTMP/foo.hg' | |
759 | saved backup bundle to $TESTTMP/foo.hg |
|
758 | saved backup bundle to $TESTTMP/foo.hg | |
760 | $ echo 'saved backup bundle to $TESTTMP/foo.hg' |
|
759 | $ echo 'saved backup bundle to $TESTTMP/foo.hg' | |
761 | saved backup bundle to $TESTTMP/foo.hg |
|
760 | saved backup bundle to $TESTTMP/foo.hg | |
762 | $ echo 'saved backup bundle to $TESTTMP/foo.hg' |
|
761 | $ echo 'saved backup bundle to $TESTTMP/foo.hg' | |
763 | saved backup bundle to $TESTTMP/*.hg (glob)< |
|
762 | saved backup bundle to $TESTTMP/*.hg (glob)< | |
764 |
|
763 | |||
765 | Race condition - test file was modified when test is running |
|
764 | Race condition - test file was modified when test is running | |
766 |
|
765 | |||
767 | $ TESTRACEDIR=`pwd` |
|
766 | $ TESTRACEDIR=`pwd` | |
768 | $ export TESTRACEDIR |
|
767 | $ export TESTRACEDIR | |
769 | $ cat > test-race.t <<EOF |
|
768 | $ cat > test-race.t <<EOF | |
770 | > $ echo 1 |
|
769 | > $ echo 1 | |
771 | > $ echo "# a new line" >> $TESTRACEDIR/test-race.t |
|
770 | > $ echo "# a new line" >> $TESTRACEDIR/test-race.t | |
772 | > EOF |
|
771 | > EOF | |
773 |
|
772 | |||
774 | $ rt -i test-race.t |
|
773 | $ rt -i test-race.t | |
775 |
|
774 | |||
776 | --- $TESTTMP/test-race.t |
|
775 | --- $TESTTMP/test-race.t | |
777 | +++ $TESTTMP/test-race.t.err |
|
776 | +++ $TESTTMP/test-race.t.err | |
778 | @@ -1,2 +1,3 @@ |
|
777 | @@ -1,2 +1,3 @@ | |
779 | $ echo 1 |
|
778 | $ echo 1 | |
780 | + 1 |
|
779 | + 1 | |
781 | $ echo "# a new line" >> $TESTTMP/test-race.t |
|
780 | $ echo "# a new line" >> $TESTTMP/test-race.t | |
782 | Reference output has changed (run again to prompt changes) |
|
781 | Reference output has changed (run again to prompt changes) | |
783 | ERROR: test-race.t output changed |
|
782 | ERROR: test-race.t output changed | |
784 | ! |
|
783 | ! | |
785 | Failed test-race.t: output changed |
|
784 | Failed test-race.t: output changed | |
786 | # Ran 1 tests, 0 skipped, 1 failed. |
|
785 | # Ran 1 tests, 0 skipped, 1 failed. | |
787 | python hash seed: * (glob) |
|
786 | python hash seed: * (glob) | |
788 | [1] |
|
787 | [1] | |
789 |
|
788 | |||
790 | $ rm test-race.t |
|
789 | $ rm test-race.t | |
791 |
|
790 | |||
792 | When "#testcases" is used in .t files |
|
791 | When "#testcases" is used in .t files | |
793 |
|
792 | |||
794 | $ cat >> test-cases.t <<EOF |
|
793 | $ cat >> test-cases.t <<EOF | |
795 | > #testcases a b |
|
794 | > #testcases a b | |
796 | > #if a |
|
795 | > #if a | |
797 | > $ echo 1 |
|
796 | > $ echo 1 | |
798 | > #endif |
|
797 | > #endif | |
799 | > #if b |
|
798 | > #if b | |
800 | > $ echo 2 |
|
799 | > $ echo 2 | |
801 | > #endif |
|
800 | > #endif | |
802 | > EOF |
|
801 | > EOF | |
803 |
|
802 | |||
804 | $ cat <<EOF | rt -i test-cases.t 2>&1 |
|
803 | $ cat <<EOF | rt -i test-cases.t 2>&1 | |
805 | > y |
|
804 | > y | |
806 | > y |
|
805 | > y | |
807 | > EOF |
|
806 | > EOF | |
808 |
|
807 | |||
809 | --- $TESTTMP/test-cases.t |
|
808 | --- $TESTTMP/test-cases.t | |
810 | +++ $TESTTMP/test-cases.t.a.err |
|
809 | +++ $TESTTMP/test-cases.t.a.err | |
811 | @@ -1,6 +1,7 @@ |
|
810 | @@ -1,6 +1,7 @@ | |
812 | #testcases a b |
|
811 | #testcases a b | |
813 | #if a |
|
812 | #if a | |
814 | $ echo 1 |
|
813 | $ echo 1 | |
815 | + 1 |
|
814 | + 1 | |
816 | #endif |
|
815 | #endif | |
817 | #if b |
|
816 | #if b | |
818 | $ echo 2 |
|
817 | $ echo 2 | |
819 | Accept this change? [n] . |
|
818 | Accept this change? [n] . | |
820 | --- $TESTTMP/test-cases.t |
|
819 | --- $TESTTMP/test-cases.t | |
821 | +++ $TESTTMP/test-cases.t.b.err |
|
820 | +++ $TESTTMP/test-cases.t.b.err | |
822 | @@ -5,4 +5,5 @@ |
|
821 | @@ -5,4 +5,5 @@ | |
823 | #endif |
|
822 | #endif | |
824 | #if b |
|
823 | #if b | |
825 | $ echo 2 |
|
824 | $ echo 2 | |
826 | + 2 |
|
825 | + 2 | |
827 | #endif |
|
826 | #endif | |
828 | Accept this change? [n] . |
|
827 | Accept this change? [n] . | |
829 | # Ran 2 tests, 0 skipped, 0 failed. |
|
828 | # Ran 2 tests, 0 skipped, 0 failed. | |
830 |
|
829 | |||
831 | $ cat test-cases.t |
|
830 | $ cat test-cases.t | |
832 | #testcases a b |
|
831 | #testcases a b | |
833 | #if a |
|
832 | #if a | |
834 | $ echo 1 |
|
833 | $ echo 1 | |
835 | 1 |
|
834 | 1 | |
836 | #endif |
|
835 | #endif | |
837 | #if b |
|
836 | #if b | |
838 | $ echo 2 |
|
837 | $ echo 2 | |
839 | 2 |
|
838 | 2 | |
840 | #endif |
|
839 | #endif | |
841 |
|
840 | |||
842 | $ cat >> test-cases.t <<'EOF' |
|
841 | $ cat >> test-cases.t <<'EOF' | |
843 | > #if a |
|
842 | > #if a | |
844 | > $ NAME=A |
|
843 | > $ NAME=A | |
845 | > #else |
|
844 | > #else | |
846 | > $ NAME=B |
|
845 | > $ NAME=B | |
847 | > #endif |
|
846 | > #endif | |
848 | > $ echo $NAME |
|
847 | > $ echo $NAME | |
849 | > A (a !) |
|
848 | > A (a !) | |
850 | > B (b !) |
|
849 | > B (b !) | |
851 | > EOF |
|
850 | > EOF | |
852 | $ rt test-cases.t |
|
851 | $ rt test-cases.t | |
853 | .. |
|
852 | .. | |
854 | # Ran 2 tests, 0 skipped, 0 failed. |
|
853 | # Ran 2 tests, 0 skipped, 0 failed. | |
855 |
|
854 | |||
856 | $ rm test-cases.t |
|
855 | $ rm test-cases.t | |
857 |
|
856 | |||
858 | (reinstall) |
|
857 | (reinstall) | |
859 | $ mv backup test-failure.t |
|
858 | $ mv backup test-failure.t | |
860 |
|
859 | |||
861 | No Diff |
|
860 | No Diff | |
862 | =============== |
|
861 | =============== | |
863 |
|
862 | |||
864 | $ rt --nodiff |
|
863 | $ rt --nodiff | |
865 | !. |
|
864 | !. | |
866 | Failed test-failure.t: output changed |
|
865 | Failed test-failure.t: output changed | |
867 | # Ran 2 tests, 0 skipped, 1 failed. |
|
866 | # Ran 2 tests, 0 skipped, 1 failed. | |
868 | python hash seed: * (glob) |
|
867 | python hash seed: * (glob) | |
869 | [1] |
|
868 | [1] | |
870 |
|
869 | |||
871 | test --tmpdir support |
|
870 | test --tmpdir support | |
872 | $ rt --tmpdir=$TESTTMP/keep test-success.t |
|
871 | $ rt --tmpdir=$TESTTMP/keep test-success.t | |
873 |
|
872 | |||
874 | Keeping testtmp dir: $TESTTMP/keep/child1/test-success.t |
|
873 | Keeping testtmp dir: $TESTTMP/keep/child1/test-success.t | |
875 | Keeping threadtmp dir: $TESTTMP/keep/child1 |
|
874 | Keeping threadtmp dir: $TESTTMP/keep/child1 | |
876 | . |
|
875 | . | |
877 | # Ran 1 tests, 0 skipped, 0 failed. |
|
876 | # Ran 1 tests, 0 skipped, 0 failed. | |
878 |
|
877 | |||
879 | timeouts |
|
878 | timeouts | |
880 | ======== |
|
879 | ======== | |
881 | $ cat > test-timeout.t <<EOF |
|
880 | $ cat > test-timeout.t <<EOF | |
882 | > $ sleep 2 |
|
881 | > $ sleep 2 | |
883 | > $ echo pass |
|
882 | > $ echo pass | |
884 | > pass |
|
883 | > pass | |
885 | > EOF |
|
884 | > EOF | |
886 | > echo '#require slow' > test-slow-timeout.t |
|
885 | > echo '#require slow' > test-slow-timeout.t | |
887 | > cat test-timeout.t >> test-slow-timeout.t |
|
886 | > cat test-timeout.t >> test-slow-timeout.t | |
888 | $ rt --timeout=1 --slowtimeout=3 test-timeout.t test-slow-timeout.t |
|
887 | $ rt --timeout=1 --slowtimeout=3 test-timeout.t test-slow-timeout.t | |
889 | st |
|
888 | st | |
890 | Skipped test-slow-timeout.t: missing feature: allow slow tests (use --allow-slow-tests) |
|
889 | Skipped test-slow-timeout.t: missing feature: allow slow tests (use --allow-slow-tests) | |
891 | Failed test-timeout.t: timed out |
|
890 | Failed test-timeout.t: timed out | |
892 | # Ran 1 tests, 1 skipped, 1 failed. |
|
891 | # Ran 1 tests, 1 skipped, 1 failed. | |
893 | python hash seed: * (glob) |
|
892 | python hash seed: * (glob) | |
894 | [1] |
|
893 | [1] | |
895 | $ rt --timeout=1 --slowtimeout=3 \ |
|
894 | $ rt --timeout=1 --slowtimeout=3 \ | |
896 | > test-timeout.t test-slow-timeout.t --allow-slow-tests |
|
895 | > test-timeout.t test-slow-timeout.t --allow-slow-tests | |
897 | .t |
|
896 | .t | |
898 | Failed test-timeout.t: timed out |
|
897 | Failed test-timeout.t: timed out | |
899 | # Ran 2 tests, 0 skipped, 1 failed. |
|
898 | # Ran 2 tests, 0 skipped, 1 failed. | |
900 | python hash seed: * (glob) |
|
899 | python hash seed: * (glob) | |
901 | [1] |
|
900 | [1] | |
902 | $ rm test-timeout.t test-slow-timeout.t |
|
901 | $ rm test-timeout.t test-slow-timeout.t | |
903 |
|
902 | |||
904 | test for --time |
|
903 | test for --time | |
905 | ================== |
|
904 | ================== | |
906 |
|
905 | |||
907 | $ rt test-success.t --time |
|
906 | $ rt test-success.t --time | |
908 | . |
|
907 | . | |
909 | # Ran 1 tests, 0 skipped, 0 failed. |
|
908 | # Ran 1 tests, 0 skipped, 0 failed. | |
910 | # Producing time report |
|
909 | # Producing time report | |
911 | start end cuser csys real Test |
|
910 | start end cuser csys real Test | |
912 | \s*[\d\.]{5} \s*[\d\.]{5} \s*[\d\.]{5} \s*[\d\.]{5} \s*[\d\.]{5} test-success.t (re) |
|
911 | \s*[\d\.]{5} \s*[\d\.]{5} \s*[\d\.]{5} \s*[\d\.]{5} \s*[\d\.]{5} test-success.t (re) | |
913 |
|
912 | |||
914 | test for --time with --job enabled |
|
913 | test for --time with --job enabled | |
915 | ==================================== |
|
914 | ==================================== | |
916 |
|
915 | |||
917 | $ rt test-success.t --time --jobs 2 |
|
916 | $ rt test-success.t --time --jobs 2 | |
918 | . |
|
917 | . | |
919 | # Ran 1 tests, 0 skipped, 0 failed. |
|
918 | # Ran 1 tests, 0 skipped, 0 failed. | |
920 | # Producing time report |
|
919 | # Producing time report | |
921 | start end cuser csys real Test |
|
920 | start end cuser csys real Test | |
922 | \s*[\d\.]{5} \s*[\d\.]{5} \s*[\d\.]{5} \s*[\d\.]{5} \s*[\d\.]{5} test-success.t (re) |
|
921 | \s*[\d\.]{5} \s*[\d\.]{5} \s*[\d\.]{5} \s*[\d\.]{5} \s*[\d\.]{5} test-success.t (re) | |
923 |
|
922 | |||
924 | Skips |
|
923 | Skips | |
925 | ================ |
|
924 | ================ | |
926 | $ cat > test-skip.t <<EOF |
|
925 | $ cat > test-skip.t <<EOF | |
927 | > $ echo xyzzy |
|
926 | > $ echo xyzzy | |
928 | > #if true |
|
927 | > #if true | |
929 | > #require false |
|
928 | > #require false | |
930 | > #end |
|
929 | > #end | |
931 | > EOF |
|
930 | > EOF | |
932 | $ cat > test-noskip.t <<EOF |
|
931 | $ cat > test-noskip.t <<EOF | |
933 | > #if false |
|
932 | > #if false | |
934 | > #require false |
|
933 | > #require false | |
935 | > #endif |
|
934 | > #endif | |
936 | > EOF |
|
935 | > EOF | |
937 | $ rt --nodiff |
|
936 | $ rt --nodiff | |
938 | !.s. |
|
937 | !.s. | |
939 | Skipped test-skip.t: missing feature: nail clipper |
|
938 | Skipped test-skip.t: missing feature: nail clipper | |
940 | Failed test-failure.t: output changed |
|
939 | Failed test-failure.t: output changed | |
941 | # Ran 3 tests, 1 skipped, 1 failed. |
|
940 | # Ran 3 tests, 1 skipped, 1 failed. | |
942 | python hash seed: * (glob) |
|
941 | python hash seed: * (glob) | |
943 | [1] |
|
942 | [1] | |
944 |
|
943 | |||
945 | $ rm test-noskip.t |
|
944 | $ rm test-noskip.t | |
946 | $ rt --keyword xyzzy |
|
945 | $ rt --keyword xyzzy | |
947 | .s |
|
946 | .s | |
948 | Skipped test-skip.t: missing feature: nail clipper |
|
947 | Skipped test-skip.t: missing feature: nail clipper | |
949 | # Ran 2 tests, 2 skipped, 0 failed. |
|
948 | # Ran 2 tests, 2 skipped, 0 failed. | |
950 |
|
949 | |||
951 | Skips with xml |
|
950 | Skips with xml | |
952 | $ rt --keyword xyzzy \ |
|
951 | $ rt --keyword xyzzy \ | |
953 | > --xunit=xunit.xml |
|
952 | > --xunit=xunit.xml | |
954 | .s |
|
953 | .s | |
955 | Skipped test-skip.t: missing feature: nail clipper |
|
954 | Skipped test-skip.t: missing feature: nail clipper | |
956 | # Ran 2 tests, 2 skipped, 0 failed. |
|
955 | # Ran 2 tests, 2 skipped, 0 failed. | |
957 | $ cat xunit.xml |
|
956 | $ cat xunit.xml | |
958 | <?xml version="1.0" encoding="utf-8"?> |
|
957 | <?xml version="1.0" encoding="utf-8"?> | |
959 | <testsuite errors="0" failures="0" name="run-tests" skipped="2" tests="2"> |
|
958 | <testsuite errors="0" failures="0" name="run-tests" skipped="2" tests="2"> | |
960 | <testcase name="test-success.t" time="*"/> (glob) |
|
959 | <testcase name="test-success.t" time="*"/> (glob) | |
961 | <testcase name="test-skip.t"> |
|
960 | <testcase name="test-skip.t"> | |
962 | <skipped> |
|
961 | <skipped> | |
963 | <![CDATA[missing feature: nail clipper]]> </skipped> |
|
962 | <![CDATA[missing feature: nail clipper]]> </skipped> | |
964 | </testcase> |
|
963 | </testcase> | |
965 | </testsuite> |
|
964 | </testsuite> | |
966 |
|
965 | |||
967 | Missing skips or blacklisted skips don't count as executed: |
|
966 | Missing skips or blacklisted skips don't count as executed: | |
968 | $ echo test-failure.t > blacklist |
|
967 | $ echo test-failure.t > blacklist | |
969 | $ rt --blacklist=blacklist --json\ |
|
968 | $ rt --blacklist=blacklist --json\ | |
970 | > test-failure.t test-bogus.t |
|
969 | > test-failure.t test-bogus.t | |
971 | ss |
|
970 | ss | |
972 | Skipped test-bogus.t: Doesn't exist |
|
971 | Skipped test-bogus.t: Doesn't exist | |
973 | Skipped test-failure.t: blacklisted |
|
972 | Skipped test-failure.t: blacklisted | |
974 | # Ran 0 tests, 2 skipped, 0 failed. |
|
973 | # Ran 0 tests, 2 skipped, 0 failed. | |
975 | $ cat report.json |
|
974 | $ cat report.json | |
976 | testreport ={ |
|
975 | testreport ={ | |
977 | "test-bogus.t": { |
|
976 | "test-bogus.t": { | |
978 | "result": "skip" |
|
977 | "result": "skip" | |
979 | }, |
|
978 | }, | |
980 | "test-failure.t": { |
|
979 | "test-failure.t": { | |
981 | "result": "skip" |
|
980 | "result": "skip" | |
982 | } |
|
981 | } | |
983 | } (no-eol) |
|
982 | } (no-eol) | |
984 |
|
983 | |||
985 | Whitelist trumps blacklist |
|
984 | Whitelist trumps blacklist | |
986 | $ echo test-failure.t > whitelist |
|
985 | $ echo test-failure.t > whitelist | |
987 | $ rt --blacklist=blacklist --whitelist=whitelist --json\ |
|
986 | $ rt --blacklist=blacklist --whitelist=whitelist --json\ | |
988 | > test-failure.t test-bogus.t |
|
987 | > test-failure.t test-bogus.t | |
989 | s |
|
988 | s | |
990 | --- $TESTTMP/test-failure.t |
|
989 | --- $TESTTMP/test-failure.t | |
991 | +++ $TESTTMP/test-failure.t.err |
|
990 | +++ $TESTTMP/test-failure.t.err | |
992 | @@ -1,5 +1,5 @@ |
|
991 | @@ -1,5 +1,5 @@ | |
993 | $ echo babar |
|
992 | $ echo babar | |
994 | - rataxes |
|
993 | - rataxes | |
995 | + babar |
|
994 | + babar | |
996 | This is a noop statement so that |
|
995 | This is a noop statement so that | |
997 | this test is still more bytes than success. |
|
996 | this test is still more bytes than success. | |
998 | pad pad pad pad............................................................ |
|
997 | pad pad pad pad............................................................ | |
999 |
|
998 | |||
1000 | ERROR: test-failure.t output changed |
|
999 | ERROR: test-failure.t output changed | |
1001 | ! |
|
1000 | ! | |
1002 | Skipped test-bogus.t: Doesn't exist |
|
1001 | Skipped test-bogus.t: Doesn't exist | |
1003 | Failed test-failure.t: output changed |
|
1002 | Failed test-failure.t: output changed | |
1004 | # Ran 1 tests, 1 skipped, 1 failed. |
|
1003 | # Ran 1 tests, 1 skipped, 1 failed. | |
1005 | python hash seed: * (glob) |
|
1004 | python hash seed: * (glob) | |
1006 | [1] |
|
1005 | [1] | |
1007 |
|
1006 | |||
1008 | Ensure that --test-list causes only the tests listed in that file to |
|
1007 | Ensure that --test-list causes only the tests listed in that file to | |
1009 | be executed. |
|
1008 | be executed. | |
1010 | $ echo test-success.t >> onlytest |
|
1009 | $ echo test-success.t >> onlytest | |
1011 | $ rt --test-list=onlytest |
|
1010 | $ rt --test-list=onlytest | |
1012 | . |
|
1011 | . | |
1013 | # Ran 1 tests, 0 skipped, 0 failed. |
|
1012 | # Ran 1 tests, 0 skipped, 0 failed. | |
1014 | $ echo test-bogus.t >> anothertest |
|
1013 | $ echo test-bogus.t >> anothertest | |
1015 | $ rt --test-list=onlytest --test-list=anothertest |
|
1014 | $ rt --test-list=onlytest --test-list=anothertest | |
1016 | s. |
|
1015 | s. | |
1017 | Skipped test-bogus.t: Doesn't exist |
|
1016 | Skipped test-bogus.t: Doesn't exist | |
1018 | # Ran 1 tests, 1 skipped, 0 failed. |
|
1017 | # Ran 1 tests, 1 skipped, 0 failed. | |
1019 | $ rm onlytest anothertest |
|
1018 | $ rm onlytest anothertest | |
1020 |
|
1019 | |||
1021 | test for --json |
|
1020 | test for --json | |
1022 | ================== |
|
1021 | ================== | |
1023 |
|
1022 | |||
1024 | $ rt --json |
|
1023 | $ rt --json | |
1025 |
|
1024 | |||
1026 | --- $TESTTMP/test-failure.t |
|
1025 | --- $TESTTMP/test-failure.t | |
1027 | +++ $TESTTMP/test-failure.t.err |
|
1026 | +++ $TESTTMP/test-failure.t.err | |
1028 | @@ -1,5 +1,5 @@ |
|
1027 | @@ -1,5 +1,5 @@ | |
1029 | $ echo babar |
|
1028 | $ echo babar | |
1030 | - rataxes |
|
1029 | - rataxes | |
1031 | + babar |
|
1030 | + babar | |
1032 | This is a noop statement so that |
|
1031 | This is a noop statement so that | |
1033 | this test is still more bytes than success. |
|
1032 | this test is still more bytes than success. | |
1034 | pad pad pad pad............................................................ |
|
1033 | pad pad pad pad............................................................ | |
1035 |
|
1034 | |||
1036 | ERROR: test-failure.t output changed |
|
1035 | ERROR: test-failure.t output changed | |
1037 | !.s |
|
1036 | !.s | |
1038 | Skipped test-skip.t: missing feature: nail clipper |
|
1037 | Skipped test-skip.t: missing feature: nail clipper | |
1039 | Failed test-failure.t: output changed |
|
1038 | Failed test-failure.t: output changed | |
1040 | # Ran 2 tests, 1 skipped, 1 failed. |
|
1039 | # Ran 2 tests, 1 skipped, 1 failed. | |
1041 | python hash seed: * (glob) |
|
1040 | python hash seed: * (glob) | |
1042 | [1] |
|
1041 | [1] | |
1043 |
|
1042 | |||
1044 | $ cat report.json |
|
1043 | $ cat report.json | |
1045 | testreport ={ |
|
1044 | testreport ={ | |
1046 | "test-failure.t": [\{] (re) |
|
1045 | "test-failure.t": [\{] (re) | |
1047 | "csys": "\s*[\d\.]{4,5}", ? (re) |
|
1046 | "csys": "\s*[\d\.]{4,5}", ? (re) | |
1048 | "cuser": "\s*[\d\.]{4,5}", ? (re) |
|
1047 | "cuser": "\s*[\d\.]{4,5}", ? (re) | |
1049 | "diff": "---.+\+\+\+.+", ? (re) |
|
1048 | "diff": "---.+\+\+\+.+", ? (re) | |
1050 | "end": "\s*[\d\.]{4,5}", ? (re) |
|
1049 | "end": "\s*[\d\.]{4,5}", ? (re) | |
1051 | "result": "failure", ? (re) |
|
1050 | "result": "failure", ? (re) | |
1052 | "start": "\s*[\d\.]{4,5}", ? (re) |
|
1051 | "start": "\s*[\d\.]{4,5}", ? (re) | |
1053 | "time": "\s*[\d\.]{4,5}" (re) |
|
1052 | "time": "\s*[\d\.]{4,5}" (re) | |
1054 | }, ? (re) |
|
1053 | }, ? (re) | |
1055 | "test-skip.t": { |
|
1054 | "test-skip.t": { | |
1056 | "csys": "\s*[\d\.]{4,5}", ? (re) |
|
1055 | "csys": "\s*[\d\.]{4,5}", ? (re) | |
1057 | "cuser": "\s*[\d\.]{4,5}", ? (re) |
|
1056 | "cuser": "\s*[\d\.]{4,5}", ? (re) | |
1058 | "diff": "", ? (re) |
|
1057 | "diff": "", ? (re) | |
1059 | "end": "\s*[\d\.]{4,5}", ? (re) |
|
1058 | "end": "\s*[\d\.]{4,5}", ? (re) | |
1060 | "result": "skip", ? (re) |
|
1059 | "result": "skip", ? (re) | |
1061 | "start": "\s*[\d\.]{4,5}", ? (re) |
|
1060 | "start": "\s*[\d\.]{4,5}", ? (re) | |
1062 | "time": "\s*[\d\.]{4,5}" (re) |
|
1061 | "time": "\s*[\d\.]{4,5}" (re) | |
1063 | }, ? (re) |
|
1062 | }, ? (re) | |
1064 | "test-success.t": [\{] (re) |
|
1063 | "test-success.t": [\{] (re) | |
1065 | "csys": "\s*[\d\.]{4,5}", ? (re) |
|
1064 | "csys": "\s*[\d\.]{4,5}", ? (re) | |
1066 | "cuser": "\s*[\d\.]{4,5}", ? (re) |
|
1065 | "cuser": "\s*[\d\.]{4,5}", ? (re) | |
1067 | "diff": "", ? (re) |
|
1066 | "diff": "", ? (re) | |
1068 | "end": "\s*[\d\.]{4,5}", ? (re) |
|
1067 | "end": "\s*[\d\.]{4,5}", ? (re) | |
1069 | "result": "success", ? (re) |
|
1068 | "result": "success", ? (re) | |
1070 | "start": "\s*[\d\.]{4,5}", ? (re) |
|
1069 | "start": "\s*[\d\.]{4,5}", ? (re) | |
1071 | "time": "\s*[\d\.]{4,5}" (re) |
|
1070 | "time": "\s*[\d\.]{4,5}" (re) | |
1072 | } |
|
1071 | } | |
1073 | } (no-eol) |
|
1072 | } (no-eol) | |
1074 | --json with --outputdir |
|
1073 | --json with --outputdir | |
1075 |
|
1074 | |||
1076 | $ rm report.json |
|
1075 | $ rm report.json | |
1077 | $ rm -r output |
|
1076 | $ rm -r output | |
1078 | $ mkdir output |
|
1077 | $ mkdir output | |
1079 | $ rt --json --outputdir output |
|
1078 | $ rt --json --outputdir output | |
1080 |
|
1079 | |||
1081 | --- $TESTTMP/test-failure.t |
|
1080 | --- $TESTTMP/test-failure.t | |
1082 | +++ $TESTTMP/output/test-failure.t.err |
|
1081 | +++ $TESTTMP/output/test-failure.t.err | |
1083 | @@ -1,5 +1,5 @@ |
|
1082 | @@ -1,5 +1,5 @@ | |
1084 | $ echo babar |
|
1083 | $ echo babar | |
1085 | - rataxes |
|
1084 | - rataxes | |
1086 | + babar |
|
1085 | + babar | |
1087 | This is a noop statement so that |
|
1086 | This is a noop statement so that | |
1088 | this test is still more bytes than success. |
|
1087 | this test is still more bytes than success. | |
1089 | pad pad pad pad............................................................ |
|
1088 | pad pad pad pad............................................................ | |
1090 |
|
1089 | |||
1091 | ERROR: test-failure.t output changed |
|
1090 | ERROR: test-failure.t output changed | |
1092 | !.s |
|
1091 | !.s | |
1093 | Skipped test-skip.t: missing feature: nail clipper |
|
1092 | Skipped test-skip.t: missing feature: nail clipper | |
1094 | Failed test-failure.t: output changed |
|
1093 | Failed test-failure.t: output changed | |
1095 | # Ran 2 tests, 1 skipped, 1 failed. |
|
1094 | # Ran 2 tests, 1 skipped, 1 failed. | |
1096 | python hash seed: * (glob) |
|
1095 | python hash seed: * (glob) | |
1097 | [1] |
|
1096 | [1] | |
1098 | $ f report.json |
|
1097 | $ f report.json | |
1099 | report.json: file not found |
|
1098 | report.json: file not found | |
1100 | $ cat output/report.json |
|
1099 | $ cat output/report.json | |
1101 | testreport ={ |
|
1100 | testreport ={ | |
1102 | "test-failure.t": [\{] (re) |
|
1101 | "test-failure.t": [\{] (re) | |
1103 | "csys": "\s*[\d\.]{4,5}", ? (re) |
|
1102 | "csys": "\s*[\d\.]{4,5}", ? (re) | |
1104 | "cuser": "\s*[\d\.]{4,5}", ? (re) |
|
1103 | "cuser": "\s*[\d\.]{4,5}", ? (re) | |
1105 | "diff": "---.+\+\+\+.+", ? (re) |
|
1104 | "diff": "---.+\+\+\+.+", ? (re) | |
1106 | "end": "\s*[\d\.]{4,5}", ? (re) |
|
1105 | "end": "\s*[\d\.]{4,5}", ? (re) | |
1107 | "result": "failure", ? (re) |
|
1106 | "result": "failure", ? (re) | |
1108 | "start": "\s*[\d\.]{4,5}", ? (re) |
|
1107 | "start": "\s*[\d\.]{4,5}", ? (re) | |
1109 | "time": "\s*[\d\.]{4,5}" (re) |
|
1108 | "time": "\s*[\d\.]{4,5}" (re) | |
1110 | }, ? (re) |
|
1109 | }, ? (re) | |
1111 | "test-skip.t": { |
|
1110 | "test-skip.t": { | |
1112 | "csys": "\s*[\d\.]{4,5}", ? (re) |
|
1111 | "csys": "\s*[\d\.]{4,5}", ? (re) | |
1113 | "cuser": "\s*[\d\.]{4,5}", ? (re) |
|
1112 | "cuser": "\s*[\d\.]{4,5}", ? (re) | |
1114 | "diff": "", ? (re) |
|
1113 | "diff": "", ? (re) | |
1115 | "end": "\s*[\d\.]{4,5}", ? (re) |
|
1114 | "end": "\s*[\d\.]{4,5}", ? (re) | |
1116 | "result": "skip", ? (re) |
|
1115 | "result": "skip", ? (re) | |
1117 | "start": "\s*[\d\.]{4,5}", ? (re) |
|
1116 | "start": "\s*[\d\.]{4,5}", ? (re) | |
1118 | "time": "\s*[\d\.]{4,5}" (re) |
|
1117 | "time": "\s*[\d\.]{4,5}" (re) | |
1119 | }, ? (re) |
|
1118 | }, ? (re) | |
1120 | "test-success.t": [\{] (re) |
|
1119 | "test-success.t": [\{] (re) | |
1121 | "csys": "\s*[\d\.]{4,5}", ? (re) |
|
1120 | "csys": "\s*[\d\.]{4,5}", ? (re) | |
1122 | "cuser": "\s*[\d\.]{4,5}", ? (re) |
|
1121 | "cuser": "\s*[\d\.]{4,5}", ? (re) | |
1123 | "diff": "", ? (re) |
|
1122 | "diff": "", ? (re) | |
1124 | "end": "\s*[\d\.]{4,5}", ? (re) |
|
1123 | "end": "\s*[\d\.]{4,5}", ? (re) | |
1125 | "result": "success", ? (re) |
|
1124 | "result": "success", ? (re) | |
1126 | "start": "\s*[\d\.]{4,5}", ? (re) |
|
1125 | "start": "\s*[\d\.]{4,5}", ? (re) | |
1127 | "time": "\s*[\d\.]{4,5}" (re) |
|
1126 | "time": "\s*[\d\.]{4,5}" (re) | |
1128 | } |
|
1127 | } | |
1129 | } (no-eol) |
|
1128 | } (no-eol) | |
1130 | $ ls -a output |
|
1129 | $ ls -a output | |
1131 | . |
|
1130 | . | |
1132 | .. |
|
1131 | .. | |
1133 | .testtimes |
|
1132 | .testtimes | |
1134 | report.json |
|
1133 | report.json | |
1135 | test-failure.t.err |
|
1134 | test-failure.t.err | |
1136 |
|
1135 | |||
1137 | Test that failed test accepted through interactive are properly reported: |
|
1136 | Test that failed test accepted through interactive are properly reported: | |
1138 |
|
1137 | |||
1139 | $ cp test-failure.t backup |
|
1138 | $ cp test-failure.t backup | |
1140 | $ echo y | rt --json -i |
|
1139 | $ echo y | rt --json -i | |
1141 |
|
1140 | |||
1142 | --- $TESTTMP/test-failure.t |
|
1141 | --- $TESTTMP/test-failure.t | |
1143 | +++ $TESTTMP/test-failure.t.err |
|
1142 | +++ $TESTTMP/test-failure.t.err | |
1144 | @@ -1,5 +1,5 @@ |
|
1143 | @@ -1,5 +1,5 @@ | |
1145 | $ echo babar |
|
1144 | $ echo babar | |
1146 | - rataxes |
|
1145 | - rataxes | |
1147 | + babar |
|
1146 | + babar | |
1148 | This is a noop statement so that |
|
1147 | This is a noop statement so that | |
1149 | this test is still more bytes than success. |
|
1148 | this test is still more bytes than success. | |
1150 | pad pad pad pad............................................................ |
|
1149 | pad pad pad pad............................................................ | |
1151 | Accept this change? [n] ..s |
|
1150 | Accept this change? [n] ..s | |
1152 | Skipped test-skip.t: missing feature: nail clipper |
|
1151 | Skipped test-skip.t: missing feature: nail clipper | |
1153 | # Ran 2 tests, 1 skipped, 0 failed. |
|
1152 | # Ran 2 tests, 1 skipped, 0 failed. | |
1154 |
|
1153 | |||
1155 | $ cat report.json |
|
1154 | $ cat report.json | |
1156 | testreport ={ |
|
1155 | testreport ={ | |
1157 | "test-failure.t": [\{] (re) |
|
1156 | "test-failure.t": [\{] (re) | |
1158 | "csys": "\s*[\d\.]{4,5}", ? (re) |
|
1157 | "csys": "\s*[\d\.]{4,5}", ? (re) | |
1159 | "cuser": "\s*[\d\.]{4,5}", ? (re) |
|
1158 | "cuser": "\s*[\d\.]{4,5}", ? (re) | |
1160 | "diff": "", ? (re) |
|
1159 | "diff": "", ? (re) | |
1161 | "end": "\s*[\d\.]{4,5}", ? (re) |
|
1160 | "end": "\s*[\d\.]{4,5}", ? (re) | |
1162 | "result": "success", ? (re) |
|
1161 | "result": "success", ? (re) | |
1163 | "start": "\s*[\d\.]{4,5}", ? (re) |
|
1162 | "start": "\s*[\d\.]{4,5}", ? (re) | |
1164 | "time": "\s*[\d\.]{4,5}" (re) |
|
1163 | "time": "\s*[\d\.]{4,5}" (re) | |
1165 | }, ? (re) |
|
1164 | }, ? (re) | |
1166 | "test-skip.t": { |
|
1165 | "test-skip.t": { | |
1167 | "csys": "\s*[\d\.]{4,5}", ? (re) |
|
1166 | "csys": "\s*[\d\.]{4,5}", ? (re) | |
1168 | "cuser": "\s*[\d\.]{4,5}", ? (re) |
|
1167 | "cuser": "\s*[\d\.]{4,5}", ? (re) | |
1169 | "diff": "", ? (re) |
|
1168 | "diff": "", ? (re) | |
1170 | "end": "\s*[\d\.]{4,5}", ? (re) |
|
1169 | "end": "\s*[\d\.]{4,5}", ? (re) | |
1171 | "result": "skip", ? (re) |
|
1170 | "result": "skip", ? (re) | |
1172 | "start": "\s*[\d\.]{4,5}", ? (re) |
|
1171 | "start": "\s*[\d\.]{4,5}", ? (re) | |
1173 | "time": "\s*[\d\.]{4,5}" (re) |
|
1172 | "time": "\s*[\d\.]{4,5}" (re) | |
1174 | }, ? (re) |
|
1173 | }, ? (re) | |
1175 | "test-success.t": [\{] (re) |
|
1174 | "test-success.t": [\{] (re) | |
1176 | "csys": "\s*[\d\.]{4,5}", ? (re) |
|
1175 | "csys": "\s*[\d\.]{4,5}", ? (re) | |
1177 | "cuser": "\s*[\d\.]{4,5}", ? (re) |
|
1176 | "cuser": "\s*[\d\.]{4,5}", ? (re) | |
1178 | "diff": "", ? (re) |
|
1177 | "diff": "", ? (re) | |
1179 | "end": "\s*[\d\.]{4,5}", ? (re) |
|
1178 | "end": "\s*[\d\.]{4,5}", ? (re) | |
1180 | "result": "success", ? (re) |
|
1179 | "result": "success", ? (re) | |
1181 | "start": "\s*[\d\.]{4,5}", ? (re) |
|
1180 | "start": "\s*[\d\.]{4,5}", ? (re) | |
1182 | "time": "\s*[\d\.]{4,5}" (re) |
|
1181 | "time": "\s*[\d\.]{4,5}" (re) | |
1183 | } |
|
1182 | } | |
1184 | } (no-eol) |
|
1183 | } (no-eol) | |
1185 | $ mv backup test-failure.t |
|
1184 | $ mv backup test-failure.t | |
1186 |
|
1185 | |||
1187 | backslash on end of line with glob matching is handled properly |
|
1186 | backslash on end of line with glob matching is handled properly | |
1188 |
|
1187 | |||
1189 | $ cat > test-glob-backslash.t << EOF |
|
1188 | $ cat > test-glob-backslash.t << EOF | |
1190 | > $ echo 'foo bar \\' |
|
1189 | > $ echo 'foo bar \\' | |
1191 | > foo * \ (glob) |
|
1190 | > foo * \ (glob) | |
1192 | > EOF |
|
1191 | > EOF | |
1193 |
|
1192 | |||
1194 | $ rt test-glob-backslash.t |
|
1193 | $ rt test-glob-backslash.t | |
1195 | . |
|
1194 | . | |
1196 | # Ran 1 tests, 0 skipped, 0 failed. |
|
1195 | # Ran 1 tests, 0 skipped, 0 failed. | |
1197 |
|
1196 | |||
1198 | $ rm -f test-glob-backslash.t |
|
1197 | $ rm -f test-glob-backslash.t | |
1199 |
|
1198 | |||
1200 | Test globbing of local IP addresses |
|
1199 | Test globbing of local IP addresses | |
1201 | $ echo 172.16.18.1 |
|
1200 | $ echo 172.16.18.1 | |
1202 | $LOCALIP (glob) |
|
1201 | $LOCALIP (glob) | |
1203 | $ echo dead:beef::1 |
|
1202 | $ echo dead:beef::1 | |
1204 | $LOCALIP (glob) |
|
1203 | $LOCALIP (glob) | |
1205 |
|
1204 | |||
1206 | Test reusability for third party tools |
|
1205 | Test reusability for third party tools | |
1207 | ====================================== |
|
1206 | ====================================== | |
1208 |
|
1207 | |||
1209 | $ mkdir "$TESTTMP"/anothertests |
|
1208 | $ mkdir "$TESTTMP"/anothertests | |
1210 | $ cd "$TESTTMP"/anothertests |
|
1209 | $ cd "$TESTTMP"/anothertests | |
1211 |
|
1210 | |||
1212 | test that `run-tests.py` can execute hghave, even if it runs not in |
|
1211 | test that `run-tests.py` can execute hghave, even if it runs not in | |
1213 | Mercurial source tree. |
|
1212 | Mercurial source tree. | |
1214 |
|
1213 | |||
1215 | $ cat > test-hghave.t <<EOF |
|
1214 | $ cat > test-hghave.t <<EOF | |
1216 | > #require true |
|
1215 | > #require true | |
1217 | > $ echo foo |
|
1216 | > $ echo foo | |
1218 | > foo |
|
1217 | > foo | |
1219 | > EOF |
|
1218 | > EOF | |
1220 | $ rt test-hghave.t |
|
1219 | $ rt test-hghave.t | |
1221 | . |
|
1220 | . | |
1222 | # Ran 1 tests, 0 skipped, 0 failed. |
|
1221 | # Ran 1 tests, 0 skipped, 0 failed. | |
1223 |
|
1222 | |||
1224 | test that RUNTESTDIR refers the directory, in which `run-tests.py` now |
|
1223 | test that RUNTESTDIR refers the directory, in which `run-tests.py` now | |
1225 | running is placed. |
|
1224 | running is placed. | |
1226 |
|
1225 | |||
1227 | $ cat > test-runtestdir.t <<EOF |
|
1226 | $ cat > test-runtestdir.t <<EOF | |
1228 | > - $TESTDIR, in which test-run-tests.t is placed |
|
1227 | > - $TESTDIR, in which test-run-tests.t is placed | |
1229 | > - \$TESTDIR, in which test-runtestdir.t is placed (expanded at runtime) |
|
1228 | > - \$TESTDIR, in which test-runtestdir.t is placed (expanded at runtime) | |
1230 | > - \$RUNTESTDIR, in which run-tests.py is placed (expanded at runtime) |
|
1229 | > - \$RUNTESTDIR, in which run-tests.py is placed (expanded at runtime) | |
1231 | > |
|
1230 | > | |
1232 | > #if windows |
|
1231 | > #if windows | |
1233 | > $ test "\$TESTDIR" = "$TESTTMP\anothertests" |
|
1232 | > $ test "\$TESTDIR" = "$TESTTMP\anothertests" | |
1234 | > #else |
|
1233 | > #else | |
1235 | > $ test "\$TESTDIR" = "$TESTTMP"/anothertests |
|
1234 | > $ test "\$TESTDIR" = "$TESTTMP"/anothertests | |
1236 | > #endif |
|
1235 | > #endif | |
1237 | > If this prints a path, that means RUNTESTDIR didn't equal |
|
1236 | > If this prints a path, that means RUNTESTDIR didn't equal | |
1238 | > TESTDIR as it should have. |
|
1237 | > TESTDIR as it should have. | |
1239 | > $ test "\$RUNTESTDIR" = "$TESTDIR" || echo "\$RUNTESTDIR" |
|
1238 | > $ test "\$RUNTESTDIR" = "$TESTDIR" || echo "\$RUNTESTDIR" | |
1240 | > This should print the start of check-code. If this passes but the |
|
1239 | > This should print the start of check-code. If this passes but the | |
1241 | > previous check failed, that means we found a copy of check-code at whatever |
|
1240 | > previous check failed, that means we found a copy of check-code at whatever | |
1242 | > RUNTESTSDIR ended up containing, even though it doesn't match TESTDIR. |
|
1241 | > RUNTESTSDIR ended up containing, even though it doesn't match TESTDIR. | |
1243 | > $ head -n 3 "\$RUNTESTDIR"/../contrib/check-code.py | sed 's@.!.*python@#!USRBINENVPY@' |
|
1242 | > $ head -n 3 "\$RUNTESTDIR"/../contrib/check-code.py | sed 's@.!.*python@#!USRBINENVPY@' | |
1244 | > #!USRBINENVPY |
|
1243 | > #!USRBINENVPY | |
1245 | > # |
|
1244 | > # | |
1246 | > # check-code - a style and portability checker for Mercurial |
|
1245 | > # check-code - a style and portability checker for Mercurial | |
1247 | > EOF |
|
1246 | > EOF | |
1248 | $ rt test-runtestdir.t |
|
1247 | $ rt test-runtestdir.t | |
1249 | . |
|
1248 | . | |
1250 | # Ran 1 tests, 0 skipped, 0 failed. |
|
1249 | # Ran 1 tests, 0 skipped, 0 failed. | |
1251 |
|
1250 | |||
1252 | #if execbit |
|
1251 | #if execbit | |
1253 |
|
1252 | |||
1254 | test that TESTDIR is referred in PATH |
|
1253 | test that TESTDIR is referred in PATH | |
1255 |
|
1254 | |||
1256 | $ cat > custom-command.sh <<EOF |
|
1255 | $ cat > custom-command.sh <<EOF | |
1257 | > #!/bin/sh |
|
1256 | > #!/bin/sh | |
1258 | > echo "hello world" |
|
1257 | > echo "hello world" | |
1259 | > EOF |
|
1258 | > EOF | |
1260 | $ chmod +x custom-command.sh |
|
1259 | $ chmod +x custom-command.sh | |
1261 | $ cat > test-testdir-path.t <<EOF |
|
1260 | $ cat > test-testdir-path.t <<EOF | |
1262 | > $ custom-command.sh |
|
1261 | > $ custom-command.sh | |
1263 | > hello world |
|
1262 | > hello world | |
1264 | > EOF |
|
1263 | > EOF | |
1265 | $ rt test-testdir-path.t |
|
1264 | $ rt test-testdir-path.t | |
1266 | . |
|
1265 | . | |
1267 | # Ran 1 tests, 0 skipped, 0 failed. |
|
1266 | # Ran 1 tests, 0 skipped, 0 failed. | |
1268 |
|
1267 | |||
1269 | #endif |
|
1268 | #endif | |
1270 |
|
1269 | |||
1271 | test support for --allow-slow-tests |
|
1270 | test support for --allow-slow-tests | |
1272 | $ cat > test-very-slow-test.t <<EOF |
|
1271 | $ cat > test-very-slow-test.t <<EOF | |
1273 | > #require slow |
|
1272 | > #require slow | |
1274 | > $ echo pass |
|
1273 | > $ echo pass | |
1275 | > pass |
|
1274 | > pass | |
1276 | > EOF |
|
1275 | > EOF | |
1277 | $ rt test-very-slow-test.t |
|
1276 | $ rt test-very-slow-test.t | |
1278 | s |
|
1277 | s | |
1279 | Skipped test-very-slow-test.t: missing feature: allow slow tests (use --allow-slow-tests) |
|
1278 | Skipped test-very-slow-test.t: missing feature: allow slow tests (use --allow-slow-tests) | |
1280 | # Ran 0 tests, 1 skipped, 0 failed. |
|
1279 | # Ran 0 tests, 1 skipped, 0 failed. | |
1281 | $ rt $HGTEST_RUN_TESTS_PURE --allow-slow-tests test-very-slow-test.t |
|
1280 | $ rt $HGTEST_RUN_TESTS_PURE --allow-slow-tests test-very-slow-test.t | |
1282 | . |
|
1281 | . | |
1283 | # Ran 1 tests, 0 skipped, 0 failed. |
|
1282 | # Ran 1 tests, 0 skipped, 0 failed. | |
1284 |
|
1283 | |||
1285 | support for running a test outside the current directory |
|
1284 | support for running a test outside the current directory | |
1286 | $ mkdir nonlocal |
|
1285 | $ mkdir nonlocal | |
1287 | $ cat > nonlocal/test-is-not-here.t << EOF |
|
1286 | $ cat > nonlocal/test-is-not-here.t << EOF | |
1288 | > $ echo pass |
|
1287 | > $ echo pass | |
1289 | > pass |
|
1288 | > pass | |
1290 | > EOF |
|
1289 | > EOF | |
1291 | $ rt nonlocal/test-is-not-here.t |
|
1290 | $ rt nonlocal/test-is-not-here.t | |
1292 | . |
|
1291 | . | |
1293 | # Ran 1 tests, 0 skipped, 0 failed. |
|
1292 | # Ran 1 tests, 0 skipped, 0 failed. | |
1294 |
|
1293 | |||
1295 | support for automatically discovering test if arg is a folder |
|
1294 | support for automatically discovering test if arg is a folder | |
1296 | $ mkdir tmp && cd tmp |
|
1295 | $ mkdir tmp && cd tmp | |
1297 |
|
1296 | |||
1298 | $ cat > test-uno.t << EOF |
|
1297 | $ cat > test-uno.t << EOF | |
1299 | > $ echo line |
|
1298 | > $ echo line | |
1300 | > line |
|
1299 | > line | |
1301 | > EOF |
|
1300 | > EOF | |
1302 |
|
1301 | |||
1303 | $ cp test-uno.t test-dos.t |
|
1302 | $ cp test-uno.t test-dos.t | |
1304 | $ cd .. |
|
1303 | $ cd .. | |
1305 | $ cp -R tmp tmpp |
|
1304 | $ cp -R tmp tmpp | |
1306 | $ cp tmp/test-uno.t test-solo.t |
|
1305 | $ cp tmp/test-uno.t test-solo.t | |
1307 |
|
1306 | |||
1308 | $ rt tmp/ test-solo.t tmpp |
|
1307 | $ rt tmp/ test-solo.t tmpp | |
1309 | ..... |
|
1308 | ..... | |
1310 | # Ran 5 tests, 0 skipped, 0 failed. |
|
1309 | # Ran 5 tests, 0 skipped, 0 failed. | |
1311 | $ rm -rf tmp tmpp |
|
1310 | $ rm -rf tmp tmpp | |
1312 |
|
1311 | |||
1313 | support for running run-tests.py from another directory |
|
1312 | support for running run-tests.py from another directory | |
1314 | $ mkdir tmp && cd tmp |
|
1313 | $ mkdir tmp && cd tmp | |
1315 |
|
1314 | |||
1316 | $ cat > useful-file.sh << EOF |
|
1315 | $ cat > useful-file.sh << EOF | |
1317 | > important command |
|
1316 | > important command | |
1318 | > EOF |
|
1317 | > EOF | |
1319 |
|
1318 | |||
1320 | $ cat > test-folder.t << EOF |
|
1319 | $ cat > test-folder.t << EOF | |
1321 | > $ cat \$TESTDIR/useful-file.sh |
|
1320 | > $ cat \$TESTDIR/useful-file.sh | |
1322 | > important command |
|
1321 | > important command | |
1323 | > EOF |
|
1322 | > EOF | |
1324 |
|
1323 | |||
1325 | $ cat > test-folder-fail.t << EOF |
|
1324 | $ cat > test-folder-fail.t << EOF | |
1326 | > $ cat \$TESTDIR/useful-file.sh |
|
1325 | > $ cat \$TESTDIR/useful-file.sh | |
1327 | > important commando |
|
1326 | > important commando | |
1328 | > EOF |
|
1327 | > EOF | |
1329 |
|
1328 | |||
1330 | $ cd .. |
|
1329 | $ cd .. | |
1331 | $ rt tmp/test-*.t |
|
1330 | $ rt tmp/test-*.t | |
1332 |
|
1331 | |||
1333 | --- $TESTTMP/anothertests/tmp/test-folder-fail.t |
|
1332 | --- $TESTTMP/anothertests/tmp/test-folder-fail.t | |
1334 | +++ $TESTTMP/anothertests/tmp/test-folder-fail.t.err |
|
1333 | +++ $TESTTMP/anothertests/tmp/test-folder-fail.t.err | |
1335 | @@ -1,2 +1,2 @@ |
|
1334 | @@ -1,2 +1,2 @@ | |
1336 | $ cat $TESTDIR/useful-file.sh |
|
1335 | $ cat $TESTDIR/useful-file.sh | |
1337 | - important commando |
|
1336 | - important commando | |
1338 | + important command |
|
1337 | + important command | |
1339 |
|
1338 | |||
1340 | ERROR: test-folder-fail.t output changed |
|
1339 | ERROR: test-folder-fail.t output changed | |
1341 | !. |
|
1340 | !. | |
1342 | Failed test-folder-fail.t: output changed |
|
1341 | Failed test-folder-fail.t: output changed | |
1343 | # Ran 2 tests, 0 skipped, 1 failed. |
|
1342 | # Ran 2 tests, 0 skipped, 1 failed. | |
1344 | python hash seed: * (glob) |
|
1343 | python hash seed: * (glob) | |
1345 | [1] |
|
1344 | [1] | |
1346 |
|
1345 | |||
1347 | support for bisecting failed tests automatically |
|
1346 | support for bisecting failed tests automatically | |
1348 | $ hg init bisect |
|
1347 | $ hg init bisect | |
1349 | $ cd bisect |
|
1348 | $ cd bisect | |
1350 | $ cat >> test-bisect.t <<EOF |
|
1349 | $ cat >> test-bisect.t <<EOF | |
1351 | > $ echo pass |
|
1350 | > $ echo pass | |
1352 | > pass |
|
1351 | > pass | |
1353 | > EOF |
|
1352 | > EOF | |
1354 | $ hg add test-bisect.t |
|
1353 | $ hg add test-bisect.t | |
1355 | $ hg ci -m 'good' |
|
1354 | $ hg ci -m 'good' | |
1356 | $ cat >> test-bisect.t <<EOF |
|
1355 | $ cat >> test-bisect.t <<EOF | |
1357 | > $ echo pass |
|
1356 | > $ echo pass | |
1358 | > fail |
|
1357 | > fail | |
1359 | > EOF |
|
1358 | > EOF | |
1360 | $ hg ci -m 'bad' |
|
1359 | $ hg ci -m 'bad' | |
1361 | $ rt --known-good-rev=0 test-bisect.t |
|
1360 | $ rt --known-good-rev=0 test-bisect.t | |
1362 |
|
1361 | |||
1363 | --- $TESTTMP/anothertests/bisect/test-bisect.t |
|
1362 | --- $TESTTMP/anothertests/bisect/test-bisect.t | |
1364 | +++ $TESTTMP/anothertests/bisect/test-bisect.t.err |
|
1363 | +++ $TESTTMP/anothertests/bisect/test-bisect.t.err | |
1365 | @@ -1,4 +1,4 @@ |
|
1364 | @@ -1,4 +1,4 @@ | |
1366 | $ echo pass |
|
1365 | $ echo pass | |
1367 | pass |
|
1366 | pass | |
1368 | $ echo pass |
|
1367 | $ echo pass | |
1369 | - fail |
|
1368 | - fail | |
1370 | + pass |
|
1369 | + pass | |
1371 |
|
1370 | |||
1372 | ERROR: test-bisect.t output changed |
|
1371 | ERROR: test-bisect.t output changed | |
1373 | ! |
|
1372 | ! | |
1374 | Failed test-bisect.t: output changed |
|
1373 | Failed test-bisect.t: output changed | |
1375 | test-bisect.t broken by 72cbf122d116 (bad) |
|
1374 | test-bisect.t broken by 72cbf122d116 (bad) | |
1376 | # Ran 1 tests, 0 skipped, 1 failed. |
|
1375 | # Ran 1 tests, 0 skipped, 1 failed. | |
1377 | python hash seed: * (glob) |
|
1376 | python hash seed: * (glob) | |
1378 | [1] |
|
1377 | [1] | |
1379 |
|
1378 | |||
1380 | $ cd .. |
|
1379 | $ cd .. | |
1381 |
|
1380 | |||
1382 | support bisecting a separate repo |
|
1381 | support bisecting a separate repo | |
1383 |
|
1382 | |||
1384 | $ hg init bisect-dependent |
|
1383 | $ hg init bisect-dependent | |
1385 | $ cd bisect-dependent |
|
1384 | $ cd bisect-dependent | |
1386 | $ cat > test-bisect-dependent.t <<EOF |
|
1385 | $ cat > test-bisect-dependent.t <<EOF | |
1387 | > $ tail -1 \$TESTDIR/../bisect/test-bisect.t |
|
1386 | > $ tail -1 \$TESTDIR/../bisect/test-bisect.t | |
1388 | > pass |
|
1387 | > pass | |
1389 | > EOF |
|
1388 | > EOF | |
1390 | $ hg commit -Am dependent test-bisect-dependent.t |
|
1389 | $ hg commit -Am dependent test-bisect-dependent.t | |
1391 |
|
1390 | |||
1392 | $ rt --known-good-rev=0 test-bisect-dependent.t |
|
1391 | $ rt --known-good-rev=0 test-bisect-dependent.t | |
1393 |
|
1392 | |||
1394 | --- $TESTTMP/anothertests/bisect-dependent/test-bisect-dependent.t |
|
1393 | --- $TESTTMP/anothertests/bisect-dependent/test-bisect-dependent.t | |
1395 | +++ $TESTTMP/anothertests/bisect-dependent/test-bisect-dependent.t.err |
|
1394 | +++ $TESTTMP/anothertests/bisect-dependent/test-bisect-dependent.t.err | |
1396 | @@ -1,2 +1,2 @@ |
|
1395 | @@ -1,2 +1,2 @@ | |
1397 | $ tail -1 $TESTDIR/../bisect/test-bisect.t |
|
1396 | $ tail -1 $TESTDIR/../bisect/test-bisect.t | |
1398 | - pass |
|
1397 | - pass | |
1399 | + fail |
|
1398 | + fail | |
1400 |
|
1399 | |||
1401 | ERROR: test-bisect-dependent.t output changed |
|
1400 | ERROR: test-bisect-dependent.t output changed | |
1402 | ! |
|
1401 | ! | |
1403 | Failed test-bisect-dependent.t: output changed |
|
1402 | Failed test-bisect-dependent.t: output changed | |
1404 | Failed to identify failure point for test-bisect-dependent.t |
|
1403 | Failed to identify failure point for test-bisect-dependent.t | |
1405 | # Ran 1 tests, 0 skipped, 1 failed. |
|
1404 | # Ran 1 tests, 0 skipped, 1 failed. | |
1406 | python hash seed: * (glob) |
|
1405 | python hash seed: * (glob) | |
1407 | [1] |
|
1406 | [1] | |
1408 |
|
1407 | |||
1409 | $ rt --bisect-repo=../test-bisect test-bisect-dependent.t |
|
1408 | $ rt --bisect-repo=../test-bisect test-bisect-dependent.t | |
1410 | usage: run-tests.py [options] [tests] |
|
1409 | usage: run-tests.py [options] [tests] | |
1411 | run-tests.py: error: --bisect-repo cannot be used without --known-good-rev |
|
1410 | run-tests.py: error: --bisect-repo cannot be used without --known-good-rev | |
1412 | [2] |
|
1411 | [2] | |
1413 |
|
1412 | |||
1414 | $ rt --known-good-rev=0 --bisect-repo=../bisect test-bisect-dependent.t |
|
1413 | $ rt --known-good-rev=0 --bisect-repo=../bisect test-bisect-dependent.t | |
1415 |
|
1414 | |||
1416 | --- $TESTTMP/anothertests/bisect-dependent/test-bisect-dependent.t |
|
1415 | --- $TESTTMP/anothertests/bisect-dependent/test-bisect-dependent.t | |
1417 | +++ $TESTTMP/anothertests/bisect-dependent/test-bisect-dependent.t.err |
|
1416 | +++ $TESTTMP/anothertests/bisect-dependent/test-bisect-dependent.t.err | |
1418 | @@ -1,2 +1,2 @@ |
|
1417 | @@ -1,2 +1,2 @@ | |
1419 | $ tail -1 $TESTDIR/../bisect/test-bisect.t |
|
1418 | $ tail -1 $TESTDIR/../bisect/test-bisect.t | |
1420 | - pass |
|
1419 | - pass | |
1421 | + fail |
|
1420 | + fail | |
1422 |
|
1421 | |||
1423 | ERROR: test-bisect-dependent.t output changed |
|
1422 | ERROR: test-bisect-dependent.t output changed | |
1424 | ! |
|
1423 | ! | |
1425 | Failed test-bisect-dependent.t: output changed |
|
1424 | Failed test-bisect-dependent.t: output changed | |
1426 | test-bisect-dependent.t broken by 72cbf122d116 (bad) |
|
1425 | test-bisect-dependent.t broken by 72cbf122d116 (bad) | |
1427 | # Ran 1 tests, 0 skipped, 1 failed. |
|
1426 | # Ran 1 tests, 0 skipped, 1 failed. | |
1428 | python hash seed: * (glob) |
|
1427 | python hash seed: * (glob) | |
1429 | [1] |
|
1428 | [1] | |
1430 |
|
1429 | |||
1431 | $ cd .. |
|
1430 | $ cd .. | |
1432 |
|
1431 | |||
1433 | Test a broken #if statement doesn't break run-tests threading. |
|
1432 | Test a broken #if statement doesn't break run-tests threading. | |
1434 | ============================================================== |
|
1433 | ============================================================== | |
1435 | $ mkdir broken |
|
1434 | $ mkdir broken | |
1436 | $ cd broken |
|
1435 | $ cd broken | |
1437 | $ cat > test-broken.t <<EOF |
|
1436 | $ cat > test-broken.t <<EOF | |
1438 | > true |
|
1437 | > true | |
1439 | > #if notarealhghavefeature |
|
1438 | > #if notarealhghavefeature | |
1440 | > $ false |
|
1439 | > $ false | |
1441 | > #endif |
|
1440 | > #endif | |
1442 | > EOF |
|
1441 | > EOF | |
1443 | $ for f in 1 2 3 4 ; do |
|
1442 | $ for f in 1 2 3 4 ; do | |
1444 | > cat > test-works-$f.t <<EOF |
|
1443 | > cat > test-works-$f.t <<EOF | |
1445 | > This is test case $f |
|
1444 | > This is test case $f | |
1446 | > $ sleep 1 |
|
1445 | > $ sleep 1 | |
1447 | > EOF |
|
1446 | > EOF | |
1448 | > done |
|
1447 | > done | |
1449 | $ rt -j 2 |
|
1448 | $ rt -j 2 | |
1450 | .... |
|
1449 | .... | |
1451 | # Ran 5 tests, 0 skipped, 0 failed. |
|
1450 | # Ran 5 tests, 0 skipped, 0 failed. | |
1452 | skipped: unknown feature: notarealhghavefeature |
|
1451 | skipped: unknown feature: notarealhghavefeature | |
1453 |
|
1452 | |||
1454 | $ cd .. |
|
1453 | $ cd .. | |
1455 | $ rm -rf broken |
|
1454 | $ rm -rf broken | |
1456 |
|
1455 | |||
1457 | Test cases in .t files |
|
1456 | Test cases in .t files | |
1458 | ====================== |
|
1457 | ====================== | |
1459 | $ mkdir cases |
|
1458 | $ mkdir cases | |
1460 | $ cd cases |
|
1459 | $ cd cases | |
1461 | $ cat > test-cases-abc.t <<'EOF' |
|
1460 | $ cat > test-cases-abc.t <<'EOF' | |
1462 | > #testcases A B C |
|
1461 | > #testcases A B C | |
1463 | > $ V=B |
|
1462 | > $ V=B | |
1464 | > #if A |
|
1463 | > #if A | |
1465 | > $ V=A |
|
1464 | > $ V=A | |
1466 | > #endif |
|
1465 | > #endif | |
1467 | > #if C |
|
1466 | > #if C | |
1468 | > $ V=C |
|
1467 | > $ V=C | |
1469 | > #endif |
|
1468 | > #endif | |
1470 | > $ echo $V | sed 's/A/C/' |
|
1469 | > $ echo $V | sed 's/A/C/' | |
1471 | > C |
|
1470 | > C | |
1472 | > #if C |
|
1471 | > #if C | |
1473 | > $ [ $V = C ] |
|
1472 | > $ [ $V = C ] | |
1474 | > #endif |
|
1473 | > #endif | |
1475 | > #if A |
|
1474 | > #if A | |
1476 | > $ [ $V = C ] |
|
1475 | > $ [ $V = C ] | |
1477 | > [1] |
|
1476 | > [1] | |
1478 | > #endif |
|
1477 | > #endif | |
1479 | > #if no-C |
|
1478 | > #if no-C | |
1480 | > $ [ $V = C ] |
|
1479 | > $ [ $V = C ] | |
1481 | > [1] |
|
1480 | > [1] | |
1482 | > #endif |
|
1481 | > #endif | |
1483 | > $ [ $V = D ] |
|
1482 | > $ [ $V = D ] | |
1484 | > [1] |
|
1483 | > [1] | |
1485 | > EOF |
|
1484 | > EOF | |
1486 | $ rt |
|
1485 | $ rt | |
1487 | . |
|
1486 | . | |
1488 | --- $TESTTMP/anothertests/cases/test-cases-abc.t |
|
1487 | --- $TESTTMP/anothertests/cases/test-cases-abc.t | |
1489 | +++ $TESTTMP/anothertests/cases/test-cases-abc.t.B.err |
|
1488 | +++ $TESTTMP/anothertests/cases/test-cases-abc.t.B.err | |
1490 | @@ -7,7 +7,7 @@ |
|
1489 | @@ -7,7 +7,7 @@ | |
1491 | $ V=C |
|
1490 | $ V=C | |
1492 | #endif |
|
1491 | #endif | |
1493 | $ echo $V | sed 's/A/C/' |
|
1492 | $ echo $V | sed 's/A/C/' | |
1494 | - C |
|
1493 | - C | |
1495 | + B |
|
1494 | + B | |
1496 | #if C |
|
1495 | #if C | |
1497 | $ [ $V = C ] |
|
1496 | $ [ $V = C ] | |
1498 | #endif |
|
1497 | #endif | |
1499 |
|
1498 | |||
1500 | ERROR: test-cases-abc.t (case B) output changed |
|
1499 | ERROR: test-cases-abc.t (case B) output changed | |
1501 | !. |
|
1500 | !. | |
1502 | Failed test-cases-abc.t (case B): output changed |
|
1501 | Failed test-cases-abc.t (case B): output changed | |
1503 | # Ran 3 tests, 0 skipped, 1 failed. |
|
1502 | # Ran 3 tests, 0 skipped, 1 failed. | |
1504 | python hash seed: * (glob) |
|
1503 | python hash seed: * (glob) | |
1505 | [1] |
|
1504 | [1] | |
1506 |
|
1505 | |||
1507 | --restart works |
|
1506 | --restart works | |
1508 |
|
1507 | |||
1509 | $ rt --restart |
|
1508 | $ rt --restart | |
1510 |
|
1509 | |||
1511 | --- $TESTTMP/anothertests/cases/test-cases-abc.t |
|
1510 | --- $TESTTMP/anothertests/cases/test-cases-abc.t | |
1512 | +++ $TESTTMP/anothertests/cases/test-cases-abc.t.B.err |
|
1511 | +++ $TESTTMP/anothertests/cases/test-cases-abc.t.B.err | |
1513 | @@ -7,7 +7,7 @@ |
|
1512 | @@ -7,7 +7,7 @@ | |
1514 | $ V=C |
|
1513 | $ V=C | |
1515 | #endif |
|
1514 | #endif | |
1516 | $ echo $V | sed 's/A/C/' |
|
1515 | $ echo $V | sed 's/A/C/' | |
1517 | - C |
|
1516 | - C | |
1518 | + B |
|
1517 | + B | |
1519 | #if C |
|
1518 | #if C | |
1520 | $ [ $V = C ] |
|
1519 | $ [ $V = C ] | |
1521 | #endif |
|
1520 | #endif | |
1522 |
|
1521 | |||
1523 | ERROR: test-cases-abc.t (case B) output changed |
|
1522 | ERROR: test-cases-abc.t (case B) output changed | |
1524 | !. |
|
1523 | !. | |
1525 | Failed test-cases-abc.t (case B): output changed |
|
1524 | Failed test-cases-abc.t (case B): output changed | |
1526 | # Ran 2 tests, 0 skipped, 1 failed. |
|
1525 | # Ran 2 tests, 0 skipped, 1 failed. | |
1527 | python hash seed: * (glob) |
|
1526 | python hash seed: * (glob) | |
1528 | [1] |
|
1527 | [1] | |
1529 |
|
1528 | |||
1530 | --restart works with outputdir |
|
1529 | --restart works with outputdir | |
1531 |
|
1530 | |||
1532 | $ mkdir output |
|
1531 | $ mkdir output | |
1533 | $ mv test-cases-abc.t.B.err output |
|
1532 | $ mv test-cases-abc.t.B.err output | |
1534 | $ rt --restart --outputdir output |
|
1533 | $ rt --restart --outputdir output | |
1535 |
|
1534 | |||
1536 | --- $TESTTMP/anothertests/cases/test-cases-abc.t |
|
1535 | --- $TESTTMP/anothertests/cases/test-cases-abc.t | |
1537 | +++ $TESTTMP/anothertests/cases/output/test-cases-abc.t.B.err |
|
1536 | +++ $TESTTMP/anothertests/cases/output/test-cases-abc.t.B.err | |
1538 | @@ -7,7 +7,7 @@ |
|
1537 | @@ -7,7 +7,7 @@ | |
1539 | $ V=C |
|
1538 | $ V=C | |
1540 | #endif |
|
1539 | #endif | |
1541 | $ echo $V | sed 's/A/C/' |
|
1540 | $ echo $V | sed 's/A/C/' | |
1542 | - C |
|
1541 | - C | |
1543 | + B |
|
1542 | + B | |
1544 | #if C |
|
1543 | #if C | |
1545 | $ [ $V = C ] |
|
1544 | $ [ $V = C ] | |
1546 | #endif |
|
1545 | #endif | |
1547 |
|
1546 | |||
1548 | ERROR: test-cases-abc.t (case B) output changed |
|
1547 | ERROR: test-cases-abc.t (case B) output changed | |
1549 | !. |
|
1548 | !. | |
1550 | Failed test-cases-abc.t (case B): output changed |
|
1549 | Failed test-cases-abc.t (case B): output changed | |
1551 | # Ran 2 tests, 0 skipped, 1 failed. |
|
1550 | # Ran 2 tests, 0 skipped, 1 failed. | |
1552 | python hash seed: * (glob) |
|
1551 | python hash seed: * (glob) | |
1553 | [1] |
|
1552 | [1] | |
1554 |
|
1553 | |||
1555 | Test TESTCASE variable |
|
1554 | Test TESTCASE variable | |
1556 |
|
1555 | |||
1557 | $ cat > test-cases-ab.t <<'EOF' |
|
1556 | $ cat > test-cases-ab.t <<'EOF' | |
1558 | > $ dostuff() { |
|
1557 | > $ dostuff() { | |
1559 | > > echo "In case $TESTCASE" |
|
1558 | > > echo "In case $TESTCASE" | |
1560 | > > } |
|
1559 | > > } | |
1561 | > #testcases A B |
|
1560 | > #testcases A B | |
1562 | > #if A |
|
1561 | > #if A | |
1563 | > $ dostuff |
|
1562 | > $ dostuff | |
1564 | > In case A |
|
1563 | > In case A | |
1565 | > #endif |
|
1564 | > #endif | |
1566 | > #if B |
|
1565 | > #if B | |
1567 | > $ dostuff |
|
1566 | > $ dostuff | |
1568 | > In case B |
|
1567 | > In case B | |
1569 | > #endif |
|
1568 | > #endif | |
1570 | > EOF |
|
1569 | > EOF | |
1571 | $ rt test-cases-ab.t |
|
1570 | $ rt test-cases-ab.t | |
1572 | .. |
|
1571 | .. | |
1573 | # Ran 2 tests, 0 skipped, 0 failed. |
|
1572 | # Ran 2 tests, 0 skipped, 0 failed. | |
1574 |
|
1573 | |||
1575 | Test automatic pattern replacement |
|
1574 | Test automatic pattern replacement | |
1576 |
|
1575 | |||
1577 | $ cat << EOF >> common-pattern.py |
|
1576 | $ cat << EOF >> common-pattern.py | |
1578 | > substitutions = [ |
|
1577 | > substitutions = [ | |
1579 | > (br'foo-(.*)\\b', |
|
1578 | > (br'foo-(.*)\\b', | |
1580 | > br'\$XXX=\\1\$'), |
|
1579 | > br'\$XXX=\\1\$'), | |
1581 | > (br'bar\\n', |
|
1580 | > (br'bar\\n', | |
1582 | > br'\$YYY$\\n'), |
|
1581 | > br'\$YYY$\\n'), | |
1583 | > ] |
|
1582 | > ] | |
1584 | > EOF |
|
1583 | > EOF | |
1585 |
|
1584 | |||
1586 | $ cat << EOF >> test-substitution.t |
|
1585 | $ cat << EOF >> test-substitution.t | |
1587 | > $ echo foo-12 |
|
1586 | > $ echo foo-12 | |
1588 | > \$XXX=12$ |
|
1587 | > \$XXX=12$ | |
1589 | > $ echo foo-42 |
|
1588 | > $ echo foo-42 | |
1590 | > \$XXX=42$ |
|
1589 | > \$XXX=42$ | |
1591 | > $ echo bar prior |
|
1590 | > $ echo bar prior | |
1592 | > bar prior |
|
1591 | > bar prior | |
1593 | > $ echo lastbar |
|
1592 | > $ echo lastbar | |
1594 | > last\$YYY$ |
|
1593 | > last\$YYY$ | |
1595 | > $ echo foo-bar foo-baz |
|
1594 | > $ echo foo-bar foo-baz | |
1596 | > EOF |
|
1595 | > EOF | |
1597 |
|
1596 | |||
1598 | $ rt test-substitution.t |
|
1597 | $ rt test-substitution.t | |
1599 |
|
1598 | |||
1600 | --- $TESTTMP/anothertests/cases/test-substitution.t |
|
1599 | --- $TESTTMP/anothertests/cases/test-substitution.t | |
1601 | +++ $TESTTMP/anothertests/cases/test-substitution.t.err |
|
1600 | +++ $TESTTMP/anothertests/cases/test-substitution.t.err | |
1602 | @@ -7,3 +7,4 @@ |
|
1601 | @@ -7,3 +7,4 @@ | |
1603 | $ echo lastbar |
|
1602 | $ echo lastbar | |
1604 | last$YYY$ |
|
1603 | last$YYY$ | |
1605 | $ echo foo-bar foo-baz |
|
1604 | $ echo foo-bar foo-baz | |
1606 | + $XXX=bar foo-baz$ |
|
1605 | + $XXX=bar foo-baz$ | |
1607 |
|
1606 | |||
1608 | ERROR: test-substitution.t output changed |
|
1607 | ERROR: test-substitution.t output changed | |
1609 | ! |
|
1608 | ! | |
1610 | Failed test-substitution.t: output changed |
|
1609 | Failed test-substitution.t: output changed | |
1611 | # Ran 1 tests, 0 skipped, 1 failed. |
|
1610 | # Ran 1 tests, 0 skipped, 1 failed. | |
1612 | python hash seed: * (glob) |
|
1611 | python hash seed: * (glob) | |
1613 | [1] |
|
1612 | [1] | |
1614 |
|
1613 | |||
1615 | --extra-config-opt works |
|
1614 | --extra-config-opt works | |
1616 |
|
1615 | |||
1617 | $ cat << EOF >> test-config-opt.t |
|
1616 | $ cat << EOF >> test-config-opt.t | |
1618 | > $ hg init test-config-opt |
|
1617 | > $ hg init test-config-opt | |
1619 | > $ hg -R test-config-opt purge |
|
1618 | > $ hg -R test-config-opt purge | |
1620 | > EOF |
|
1619 | > EOF | |
1621 |
|
1620 | |||
1622 | $ rt --extra-config-opt extensions.purge= test-config-opt.t |
|
1621 | $ rt --extra-config-opt extensions.purge= test-config-opt.t | |
1623 | . |
|
1622 | . | |
1624 | # Ran 1 tests, 0 skipped, 0 failed. |
|
1623 | # Ran 1 tests, 0 skipped, 0 failed. |
@@ -1,101 +1,102 b'' | |||||
1 | #require serve |
|
1 | #require serve | |
2 |
|
2 | |||
3 | $ hgserve() |
|
3 | $ hgserve() | |
4 | > { |
|
4 | > { | |
5 | > hg serve -a localhost -d --pid-file=hg.pid -E errors.log -v $@ \ |
|
5 | > hg serve -a localhost -d --pid-file=hg.pid -E errors.log -v $@ \ | |
6 | > | sed -e "s/:$HGPORT1\\([^0-9]\\)/:HGPORT1\1/g" \ |
|
6 | > | sed -e "s/:$HGPORT1\\([^0-9]\\)/:HGPORT1\1/g" \ | |
7 | > -e "s/:$HGPORT2\\([^0-9]\\)/:HGPORT2\1/g" \ |
|
7 | > -e "s/:$HGPORT2\\([^0-9]\\)/:HGPORT2\1/g" \ | |
8 | > -e 's/http:\/\/[^/]*\//http:\/\/localhost\//' |
|
8 | > -e 's/http:\/\/[^/]*\//http:\/\/localhost\//' | |
9 | > cat hg.pid >> "$DAEMON_PIDS" |
|
9 | > if [ -f hg.pid ]; then | |
|
10 | > killdaemons.py hg.pid | |||
|
11 | > fi | |||
10 | > echo % errors |
|
12 | > echo % errors | |
11 | > cat errors.log |
|
13 | > cat errors.log | |
12 | > killdaemons.py hg.pid |
|
|||
13 | > } |
|
14 | > } | |
14 |
|
15 | |||
15 | $ hg init test |
|
16 | $ hg init test | |
16 | $ cd test |
|
17 | $ cd test | |
17 | $ echo '[web]' > .hg/hgrc |
|
18 | $ echo '[web]' > .hg/hgrc | |
18 | $ echo 'accesslog = access.log' >> .hg/hgrc |
|
19 | $ echo 'accesslog = access.log' >> .hg/hgrc | |
19 | $ echo "port = $HGPORT1" >> .hg/hgrc |
|
20 | $ echo "port = $HGPORT1" >> .hg/hgrc | |
20 |
|
21 | |||
21 | Without -v |
|
22 | Without -v | |
22 |
|
23 | |||
23 | $ hg serve -a localhost -p $HGPORT -d --pid-file=hg.pid -E errors.log |
|
24 | $ hg serve -a localhost -p $HGPORT -d --pid-file=hg.pid -E errors.log | |
24 | $ cat hg.pid >> "$DAEMON_PIDS" |
|
25 | $ cat hg.pid >> "$DAEMON_PIDS" | |
25 | $ if [ -f access.log ]; then |
|
26 | $ if [ -f access.log ]; then | |
26 | > echo 'access log created - .hg/hgrc respected' |
|
27 | > echo 'access log created - .hg/hgrc respected' | |
27 | > fi |
|
28 | > fi | |
28 | access log created - .hg/hgrc respected |
|
29 | access log created - .hg/hgrc respected | |
29 |
|
30 | |||
30 | errors |
|
31 | errors | |
31 |
|
32 | |||
32 | $ cat errors.log |
|
33 | $ cat errors.log | |
33 |
|
34 | |||
34 | With -v |
|
35 | With -v | |
35 |
|
36 | |||
36 | $ hgserve |
|
37 | $ hgserve | |
37 | listening at http://localhost/ (bound to *$LOCALIP*:HGPORT1) (glob) (?) |
|
38 | listening at http://localhost/ (bound to *$LOCALIP*:HGPORT1) (glob) (?) | |
38 | % errors |
|
39 | % errors | |
39 |
|
40 | |||
40 | With -v and -p HGPORT2 |
|
41 | With -v and -p HGPORT2 | |
41 |
|
42 | |||
42 | $ hgserve -p "$HGPORT2" |
|
43 | $ hgserve -p "$HGPORT2" | |
43 | listening at http://localhost/ (bound to *$LOCALIP*:HGPORT2) (glob) (?) |
|
44 | listening at http://localhost/ (bound to *$LOCALIP*:HGPORT2) (glob) (?) | |
44 | % errors |
|
45 | % errors | |
45 |
|
46 | |||
46 | With -v and -p daytime (should fail because low port) |
|
47 | With -v and -p daytime (should fail because low port) | |
47 |
|
48 | |||
48 | #if no-root no-windows |
|
49 | #if no-root no-windows | |
49 | $ KILLQUIETLY=Y |
|
50 | $ KILLQUIETLY=Y | |
50 | $ hgserve -p daytime |
|
51 | $ hgserve -p daytime | |
51 | abort: cannot start server at 'localhost:13': Permission denied |
|
52 | abort: cannot start server at 'localhost:13': Permission denied | |
52 | abort: child process failed to start |
|
53 | abort: child process failed to start | |
53 | % errors |
|
54 | % errors | |
54 | $ KILLQUIETLY=N |
|
55 | $ KILLQUIETLY=N | |
55 | #endif |
|
56 | #endif | |
56 |
|
57 | |||
57 | With --prefix foo |
|
58 | With --prefix foo | |
58 |
|
59 | |||
59 | $ hgserve --prefix foo |
|
60 | $ hgserve --prefix foo | |
60 | listening at http://localhost/foo/ (bound to *$LOCALIP*:HGPORT1) (glob) (?) |
|
61 | listening at http://localhost/foo/ (bound to *$LOCALIP*:HGPORT1) (glob) (?) | |
61 | % errors |
|
62 | % errors | |
62 |
|
63 | |||
63 | With --prefix /foo |
|
64 | With --prefix /foo | |
64 |
|
65 | |||
65 | $ hgserve --prefix /foo |
|
66 | $ hgserve --prefix /foo | |
66 | listening at http://localhost/foo/ (bound to *$LOCALIP*:HGPORT1) (glob) (?) |
|
67 | listening at http://localhost/foo/ (bound to *$LOCALIP*:HGPORT1) (glob) (?) | |
67 | % errors |
|
68 | % errors | |
68 |
|
69 | |||
69 | With --prefix foo/ |
|
70 | With --prefix foo/ | |
70 |
|
71 | |||
71 | $ hgserve --prefix foo/ |
|
72 | $ hgserve --prefix foo/ | |
72 | listening at http://localhost/foo/ (bound to *$LOCALIP*:HGPORT1) (glob) (?) |
|
73 | listening at http://localhost/foo/ (bound to *$LOCALIP*:HGPORT1) (glob) (?) | |
73 | % errors |
|
74 | % errors | |
74 |
|
75 | |||
75 | With --prefix /foo/ |
|
76 | With --prefix /foo/ | |
76 |
|
77 | |||
77 | $ hgserve --prefix /foo/ |
|
78 | $ hgserve --prefix /foo/ | |
78 | listening at http://localhost/foo/ (bound to *$LOCALIP*:HGPORT1) (glob) (?) |
|
79 | listening at http://localhost/foo/ (bound to *$LOCALIP*:HGPORT1) (glob) (?) | |
79 | % errors |
|
80 | % errors | |
80 |
|
81 | |||
81 | $ $PYTHON $RUNTESTDIR/killdaemons.py $DAEMON_PIDS |
|
82 | $ $PYTHON $RUNTESTDIR/killdaemons.py $DAEMON_PIDS | |
82 |
|
83 | |||
83 | With out of bounds accesses |
|
84 | With out of bounds accesses | |
84 |
|
85 | |||
85 | $ rm access.log |
|
86 | $ rm access.log | |
86 | $ hg serve -a localhost -p $HGPORT -d --prefix some/dir \ |
|
87 | $ hg serve -a localhost -p $HGPORT -d --prefix some/dir \ | |
87 | > --pid-file=hg.pid -E errors.log |
|
88 | > --pid-file=hg.pid -E errors.log | |
88 | $ cat hg.pid >> "$DAEMON_PIDS" |
|
89 | $ cat hg.pid >> "$DAEMON_PIDS" | |
89 |
|
90 | |||
90 | $ hg id http://localhost:$HGPORT/some/dir7 |
|
91 | $ hg id http://localhost:$HGPORT/some/dir7 | |
91 | abort: HTTP Error 404: Not Found |
|
92 | abort: HTTP Error 404: Not Found | |
92 | [255] |
|
93 | [255] | |
93 | $ hg id http://localhost:$HGPORT/some |
|
94 | $ hg id http://localhost:$HGPORT/some | |
94 | abort: HTTP Error 404: Not Found |
|
95 | abort: HTTP Error 404: Not Found | |
95 | [255] |
|
96 | [255] | |
96 |
|
97 | |||
97 | $ cat access.log errors.log |
|
98 | $ cat access.log errors.log | |
98 | $LOCALIP - - [$LOGDATE$] "GET /some/dir7?cmd=capabilities HTTP/1.1" 404 - (glob) |
|
99 | $LOCALIP - - [$LOGDATE$] "GET /some/dir7?cmd=capabilities HTTP/1.1" 404 - (glob) | |
99 | $LOCALIP - - [$LOGDATE$] "GET /some?cmd=capabilities HTTP/1.1" 404 - (glob) |
|
100 | $LOCALIP - - [$LOGDATE$] "GET /some?cmd=capabilities HTTP/1.1" 404 - (glob) | |
100 |
|
101 | |||
101 | $ cd .. |
|
102 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now