tests/phabricator/phabread-conduit-error.json
author Boris Feld <boris.feld@octobus.net>
Wed, 10 Oct 2018 00:50:35 +0200
changeset 40694 8a0136f69027
parent 39651 a641fd1a1196
permissions -rw-r--r--
context: introduce an `isintroducedafter` method and use it in copies Right now, copy tracing make effort to not traverse the graph too much to save performance. It uses a "limit" acting as a floor revision past which data are no longer relevant to the current copy tracing. However, to enforce this limit, it does a call to `filectx.rev()` and that call can trigger a graph traversal on its own. That extra graph traversal is unaware of the current limit and can become very expensive. That cost is increased by the nature of work done in adjust link rev, we are not only walking down the graph, we are also checking the affected file for each revision we walk through. Something significantly more expensive than the walk itself. To work around this we need to make the `filectx` operation aware of the current limit. The first step is to introduce a dedicated method: `isintroducedafter`. We'll then rework that method logic to stop traversal as soon as possible.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
39651
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
     1
{
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
     2
    "interactions": [
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
     3
        {
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
     4
            "response": {
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
     5
                "body": {
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
     6
                    "string": "{\"result\":null,\"error_code\":\"ERR-INVALID-AUTH\",\"error_info\":\"API token \\\"cli-notavalidtoken\\\" has the wrong length. API tokens should be 32 characters long.\"}"
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
     7
                }, 
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
     8
                "headers": {
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
     9
                    "expires": [
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    10
                        "Sat, 01 Jan 2000 00:00:00 GMT"
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    11
                    ], 
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    12
                    "x-content-type-options": [
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    13
                        "nosniff"
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    14
                    ], 
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    15
                    "set-cookie": [
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    16
                        "phsid=A%2F6jvmizfvgaa6bkls264secsim5nlgid4vj55jpe6; expires=Thu, 14-Sep-2023 04:38:21 GMT; Max-Age=157680000; path=/; domain=phab.mercurial-scm.org; secure; httponly"
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    17
                    ], 
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    18
                    "x-xss-protection": [
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    19
                        "1; mode=block"
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    20
                    ], 
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    21
                    "content-type": [
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    22
                        "application/json"
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    23
                    ], 
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    24
                    "cache-control": [
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    25
                        "no-store"
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    26
                    ], 
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    27
                    "date": [
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    28
                        "Sat, 15 Sep 2018 04:38:21 GMT"
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    29
                    ], 
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    30
                    "strict-transport-security": [
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    31
                        "max-age=0; includeSubdomains; preload"
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    32
                    ], 
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    33
                    "server": [
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    34
                        "Apache/2.4.10 (Debian)"
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    35
                    ], 
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    36
                    "x-frame-options": [
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    37
                        "Deny"
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    38
                    ]
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    39
                }, 
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    40
                "status": {
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    41
                    "message": "OK", 
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    42
                    "code": 200
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    43
                }
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    44
            }, 
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    45
            "request": {
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    46
                "body": "api.token=cli-notavalidtoken&ids%5B0%5D=4480", 
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    47
                "headers": {
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    48
                    "content-type": [
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    49
                        "application/x-www-form-urlencoded"
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    50
                    ], 
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    51
                    "content-length": [
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    52
                        "44"
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    53
                    ], 
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    54
                    "user-agent": [
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    55
                        "mercurial/proto-1.0 (Mercurial 4.7.1+861-aa7e312375cf)"
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    56
                    ], 
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    57
                    "accept": [
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    58
                        "application/mercurial-0.1"
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    59
                    ], 
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    60
                    "host": [
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    61
                        "phab.mercurial-scm.org"
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    62
                    ]
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    63
                }, 
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    64
                "method": "POST", 
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    65
                "uri": "https://phab.mercurial-scm.org//api/differential.query"
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    66
            }
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    67
        }
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    68
    ], 
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    69
    "version": 1
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    70
}