Mercurial > hg
annotate tests/test-record.t @ 43457:92e24a139ecc stable
py3: compare http server's command with a native string
The "command" attribute is an str, so comparing with a bytes would not
work on Python 3. This might solve issues in test-lfs-serve-access.t
that happens sometimes (especially in CI):
--- /hgwork/src/tests/test-lfs-serve-access.t
+++ /hgwork/src/tests/test-lfs-serve-access.t.err
@@ -163,11 +163,13 @@
$ cat $TESTTMP/access.log $TESTTMP/errors.log
$LOCALIP - - [$LOGDATE$] "POST /missing/objects/batch HTTP/1.1" 404 - (glob)
+ $LOCALIP - - [05/Nov/2019 16:32:34] "{"objects": [{"oid": "f03217a32529a28a42d03b1244fe09b6e0f9fd06d7b966d4d50567be2abe6c0e", "size": 20}], "operation": "download"}" HTTPStatus.BAD_REQUEST -
$LOCALIP - - [$LOGDATE$] "GET /subdir/mount/point?cmd=capabilities HTTP/1.1" 200 - (glob)
$LOCALIP - - [$LOGDATE$] "GET /subdir/mount/point?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
$LOCALIP - - [$LOGDATE$] "GET /subdir/mount/point?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&bundlecaps=HG20%2Cbundle2%3DHG20%250Abookmarks%250Achangegroup%253D01%252C02%252C03%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Aphases%253Dheads%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps%250Arev-branch-cache%250Astream%253Dv2&cg=1&common=0000000000000000000000000000000000000000&heads=525251863cad618e55d483555f3d00a2ca99597e&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
$LOCALIP - - [$LOGDATE$] "POST /subdir/mount/point/.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob)
$LOCALIP - - [$LOGDATE$] "GET /subdir/mount/point/.hg/lfs/objects/f03217a32529a28a42d03b1244fe09b6e0f9fd06d7b966d4d50567be2abe6c0e HTTP/1.1" 200 - (glob)
+ $LOCALIP - - [05/Nov/2019 16:32:34] code 400, message Bad request version ('"download"}')
Blobs that already exist in the usercache are linked into the repo store, even
though the client doesn't send the blob.
@@ -195,6 +197,7 @@
server2/.hg/store/lfs/objects/f0/3217a32529a28a42d03b1244fe09b6e0f9fd06d7b966d4d50567be2abe6c0e
$ "$PYTHON" $RUNTESTDIR/killdaemons.py $DAEMON_PIDS
$ cat $TESTTMP/errors.log
+ $LOCALIP - - [05/Nov/2019 16:32:34] code 400, message Bad request version ('"download"}')
$ cat >> $TESTTMP/lfsstoreerror.py <<EOF
> import errno
(from https://ci.hg.gregoryszorc.com/job-info/hg-committed-ca3dca416f8d5863ca6f5a4a6a6bb835dcd5feeb-debian10-cpython-3.7-0)
author | Denis Laxalde <denis.laxalde@logilab.fr> |
---|---|
date | Thu, 07 Nov 2019 08:58:26 +0100 |
parents | db72f9f6580e |
children | 8d72e29ad1e0 |
rev | line source |
---|---|
12328
b63f6422d2a7
tests: fix a bunch of pointless #s in unified tests
Matt Mackall <mpm@selenic.com>
parents:
12316
diff
changeset
|
1 Set up a repo |
5037
b2607267236d
Add record extension, giving darcs-like interactive hunk picking
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
2 |
23172
e955549cd045
tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents:
23054
diff
changeset
|
3 $ cat <<EOF >> $HGRCPATH |
e955549cd045
tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents:
23054
diff
changeset
|
4 > [ui] |
e955549cd045
tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents:
23054
diff
changeset
|
5 > interactive = true |
e955549cd045
tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents:
23054
diff
changeset
|
6 > [extensions] |
e955549cd045
tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents:
23054
diff
changeset
|
7 > record = |
e955549cd045
tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents:
23054
diff
changeset
|
8 > EOF |
5037
b2607267236d
Add record extension, giving darcs-like interactive hunk picking
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
9 |
12074
35c143e85b1b
tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
11238
diff
changeset
|
10 $ hg init a |
35c143e85b1b
tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
11238
diff
changeset
|
11 $ cd a |
5037
b2607267236d
Add record extension, giving darcs-like interactive hunk picking
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
12 |
24308
1725843a7644
record: remove duplicated tests
Laurent Charignon <lcharignon@fb.com>
parents:
24235
diff
changeset
|
13 Record help |
1725843a7644
record: remove duplicated tests
Laurent Charignon <lcharignon@fb.com>
parents:
24235
diff
changeset
|
14 |
1725843a7644
record: remove duplicated tests
Laurent Charignon <lcharignon@fb.com>
parents:
24235
diff
changeset
|
15 $ hg record -h |
1725843a7644
record: remove duplicated tests
Laurent Charignon <lcharignon@fb.com>
parents:
24235
diff
changeset
|
16 hg record [OPTION]... [FILE]... |
1725843a7644
record: remove duplicated tests
Laurent Charignon <lcharignon@fb.com>
parents:
24235
diff
changeset
|
17 |
1725843a7644
record: remove duplicated tests
Laurent Charignon <lcharignon@fb.com>
parents:
24235
diff
changeset
|
18 interactively select changes to commit |
1725843a7644
record: remove duplicated tests
Laurent Charignon <lcharignon@fb.com>
parents:
24235
diff
changeset
|
19 |
27729
58f8b29c37ff
minirst: change hgrole to use single quotes
timeless <timeless@mozdev.org>
parents:
25304
diff
changeset
|
20 If a list of files is omitted, all changes reported by 'hg status' will be |
24308
1725843a7644
record: remove duplicated tests
Laurent Charignon <lcharignon@fb.com>
parents:
24235
diff
changeset
|
21 candidates for recording. |
1725843a7644
record: remove duplicated tests
Laurent Charignon <lcharignon@fb.com>
parents:
24235
diff
changeset
|
22 |
27729
58f8b29c37ff
minirst: change hgrole to use single quotes
timeless <timeless@mozdev.org>
parents:
25304
diff
changeset
|
23 See 'hg help dates' for a list of formats valid for -d/--date. |
24308
1725843a7644
record: remove duplicated tests
Laurent Charignon <lcharignon@fb.com>
parents:
24235
diff
changeset
|
24 |
31065
7074589cf22a
record: update help to describe ui.interface
eloimorlaas <eloimorlaas@fb.com>
parents:
30158
diff
changeset
|
25 If using the text interface (see 'hg help config'), you will be prompted |
7074589cf22a
record: update help to describe ui.interface
eloimorlaas <eloimorlaas@fb.com>
parents:
30158
diff
changeset
|
26 for whether to record changes to each modified file, and for files with |
7074589cf22a
record: update help to describe ui.interface
eloimorlaas <eloimorlaas@fb.com>
parents:
30158
diff
changeset
|
27 multiple changes, for each change to use. For each query, the following |
7074589cf22a
record: update help to describe ui.interface
eloimorlaas <eloimorlaas@fb.com>
parents:
30158
diff
changeset
|
28 responses are possible: |
24308
1725843a7644
record: remove duplicated tests
Laurent Charignon <lcharignon@fb.com>
parents:
24235
diff
changeset
|
29 |
1725843a7644
record: remove duplicated tests
Laurent Charignon <lcharignon@fb.com>
parents:
24235
diff
changeset
|
30 y - record this change |
1725843a7644
record: remove duplicated tests
Laurent Charignon <lcharignon@fb.com>
parents:
24235
diff
changeset
|
31 n - skip this change |
1725843a7644
record: remove duplicated tests
Laurent Charignon <lcharignon@fb.com>
parents:
24235
diff
changeset
|
32 e - edit this change manually |
1725843a7644
record: remove duplicated tests
Laurent Charignon <lcharignon@fb.com>
parents:
24235
diff
changeset
|
33 |
1725843a7644
record: remove duplicated tests
Laurent Charignon <lcharignon@fb.com>
parents:
24235
diff
changeset
|
34 s - skip remaining changes to this file |
1725843a7644
record: remove duplicated tests
Laurent Charignon <lcharignon@fb.com>
parents:
24235
diff
changeset
|
35 f - record remaining changes to this file |
1725843a7644
record: remove duplicated tests
Laurent Charignon <lcharignon@fb.com>
parents:
24235
diff
changeset
|
36 |
1725843a7644
record: remove duplicated tests
Laurent Charignon <lcharignon@fb.com>
parents:
24235
diff
changeset
|
37 d - done, skip remaining changes and files |
1725843a7644
record: remove duplicated tests
Laurent Charignon <lcharignon@fb.com>
parents:
24235
diff
changeset
|
38 a - record all changes to all remaining files |
1725843a7644
record: remove duplicated tests
Laurent Charignon <lcharignon@fb.com>
parents:
24235
diff
changeset
|
39 q - quit, recording no changes |
1725843a7644
record: remove duplicated tests
Laurent Charignon <lcharignon@fb.com>
parents:
24235
diff
changeset
|
40 |
1725843a7644
record: remove duplicated tests
Laurent Charignon <lcharignon@fb.com>
parents:
24235
diff
changeset
|
41 ? - display help |
1725843a7644
record: remove duplicated tests
Laurent Charignon <lcharignon@fb.com>
parents:
24235
diff
changeset
|
42 |
1725843a7644
record: remove duplicated tests
Laurent Charignon <lcharignon@fb.com>
parents:
24235
diff
changeset
|
43 This command is not available when committing a merge. |
1725843a7644
record: remove duplicated tests
Laurent Charignon <lcharignon@fb.com>
parents:
24235
diff
changeset
|
44 |
29974
7109d5ddeb0c
help: use single quotes in use warning
timeless <timeless@mozdev.org>
parents:
28697
diff
changeset
|
45 (use 'hg help -e record' to show help for the record extension) |
28697
d001d6d27570
record: deprecate the extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
27729
diff
changeset
|
46 |
24308
1725843a7644
record: remove duplicated tests
Laurent Charignon <lcharignon@fb.com>
parents:
24235
diff
changeset
|
47 options ([+] can be repeated): |
1725843a7644
record: remove duplicated tests
Laurent Charignon <lcharignon@fb.com>
parents:
24235
diff
changeset
|
48 |
30152
d65e246100ed
help: backout f3c4edfd35e1 (mark boolean flags with [no-] in help) for now
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
30024
diff
changeset
|
49 -A --addremove mark new/missing files as added/removed before |
d65e246100ed
help: backout f3c4edfd35e1 (mark boolean flags with [no-] in help) for now
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
30024
diff
changeset
|
50 committing |
d65e246100ed
help: backout f3c4edfd35e1 (mark boolean flags with [no-] in help) for now
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
30024
diff
changeset
|
51 --close-branch mark a branch head as closed |
d65e246100ed
help: backout f3c4edfd35e1 (mark boolean flags with [no-] in help) for now
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
30024
diff
changeset
|
52 --amend amend the parent of the working directory |
d65e246100ed
help: backout f3c4edfd35e1 (mark boolean flags with [no-] in help) for now
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
30024
diff
changeset
|
53 -s --secret use the secret phase for committing |
d65e246100ed
help: backout f3c4edfd35e1 (mark boolean flags with [no-] in help) for now
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
30024
diff
changeset
|
54 -e --edit invoke editor on commit messages |
d65e246100ed
help: backout f3c4edfd35e1 (mark boolean flags with [no-] in help) for now
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
30024
diff
changeset
|
55 -I --include PATTERN [+] include names matching the given patterns |
d65e246100ed
help: backout f3c4edfd35e1 (mark boolean flags with [no-] in help) for now
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
30024
diff
changeset
|
56 -X --exclude PATTERN [+] exclude names matching the given patterns |
d65e246100ed
help: backout f3c4edfd35e1 (mark boolean flags with [no-] in help) for now
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
30024
diff
changeset
|
57 -m --message TEXT use text as commit message |
d65e246100ed
help: backout f3c4edfd35e1 (mark boolean flags with [no-] in help) for now
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
30024
diff
changeset
|
58 -l --logfile FILE read commit message from file |
d65e246100ed
help: backout f3c4edfd35e1 (mark boolean flags with [no-] in help) for now
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
30024
diff
changeset
|
59 -d --date DATE record the specified date as commit date |
d65e246100ed
help: backout f3c4edfd35e1 (mark boolean flags with [no-] in help) for now
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
30024
diff
changeset
|
60 -u --user USER record the specified user as committer |
d65e246100ed
help: backout f3c4edfd35e1 (mark boolean flags with [no-] in help) for now
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
30024
diff
changeset
|
61 -S --subrepos recurse into subrepositories |
d65e246100ed
help: backout f3c4edfd35e1 (mark boolean flags with [no-] in help) for now
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
30024
diff
changeset
|
62 -w --ignore-all-space ignore white space when comparing lines |
d65e246100ed
help: backout f3c4edfd35e1 (mark boolean flags with [no-] in help) for now
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
30024
diff
changeset
|
63 -b --ignore-space-change ignore changes in the amount of white space |
d65e246100ed
help: backout f3c4edfd35e1 (mark boolean flags with [no-] in help) for now
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
30024
diff
changeset
|
64 -B --ignore-blank-lines ignore changes whose lines are all blank |
34013
da07367d683b
mdiff: add a --ignore-space-at-eol option
David Soria Parra <davidsp@fb.com>
parents:
31065
diff
changeset
|
65 -Z --ignore-space-at-eol ignore changes in whitespace at EOL |
24308
1725843a7644
record: remove duplicated tests
Laurent Charignon <lcharignon@fb.com>
parents:
24235
diff
changeset
|
66 |
1725843a7644
record: remove duplicated tests
Laurent Charignon <lcharignon@fb.com>
parents:
24235
diff
changeset
|
67 (some details hidden, use --verbose to show complete help) |
1725843a7644
record: remove duplicated tests
Laurent Charignon <lcharignon@fb.com>
parents:
24235
diff
changeset
|
68 |
12074
35c143e85b1b
tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
11238
diff
changeset
|
69 Select no files |
5037
b2607267236d
Add record extension, giving darcs-like interactive hunk picking
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
70 |
12074
35c143e85b1b
tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
11238
diff
changeset
|
71 $ touch empty-rw |
35c143e85b1b
tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
11238
diff
changeset
|
72 $ hg add empty-rw |
5037
b2607267236d
Add record extension, giving darcs-like interactive hunk picking
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
73 |
12074
35c143e85b1b
tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
11238
diff
changeset
|
74 $ hg record empty-rw<<EOF |
35c143e85b1b
tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
11238
diff
changeset
|
75 > n |
35c143e85b1b
tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
11238
diff
changeset
|
76 > EOF |
35c143e85b1b
tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
11238
diff
changeset
|
77 diff --git a/empty-rw b/empty-rw |
35c143e85b1b
tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
11238
diff
changeset
|
78 new file mode 100644 |
42071
db72f9f6580e
interactive: do not prompt about files given in command line
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
34013
diff
changeset
|
79 abort: empty commit message |
db72f9f6580e
interactive: do not prompt about files given in command line
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
34013
diff
changeset
|
80 [255] |
12074
35c143e85b1b
tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
11238
diff
changeset
|
81 |
35c143e85b1b
tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
11238
diff
changeset
|
82 $ hg tip -p |
35c143e85b1b
tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
11238
diff
changeset
|
83 changeset: -1:000000000000 |
35c143e85b1b
tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
11238
diff
changeset
|
84 tag: tip |
35c143e85b1b
tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
11238
diff
changeset
|
85 user: |
35c143e85b1b
tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
11238
diff
changeset
|
86 date: Thu Jan 01 00:00:00 1970 +0000 |
35c143e85b1b
tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
11238
diff
changeset
|
87 |
35c143e85b1b
tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
11238
diff
changeset
|
88 |
35c143e85b1b
tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
11238
diff
changeset
|
89 |
5037
b2607267236d
Add record extension, giving darcs-like interactive hunk picking
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
90 |