tests/test-update-renames.t
author Augie Fackler <augie@google.com>
Tue, 30 Jun 2015 19:19:17 -0400
changeset 25708 d3d32643c060
parent 16911 39d38f16a3f7
child 26614 ef1eb6df7071
permissions -rw-r--r--
wireproto: correctly escape batched args and responses (issue4739) This issue appears to be as old as wireproto batching itself: I can reproduce the failure as far back as 08ef6b5f3715 trivially by rebasing the test changes in this patch, which was back in the 1.9 era. I didn't test before that change, because prior to that the testfile has a different name and I'm lazy. Note that the test thought it was checking this case, but it actually wasn't: it put a literal ; in the arg and response for its greet command, but the mangle/unmangle step defined in the test meant that instead of "Fo, =;o" going over the wire, "Gp-!><p" went instead, which doesn't contain any special characters (those being [.=;]) and thus not exercising the escaping. The test has been updated to use pre-unmangled special characters, so the request is now "Fo+<:o", which mangles to "Gp,=;p". I have confirmed that the test fails without the adjustment to the escaping rules in wireproto.py. No existing clients of RPC batching were depending on the old behavior in any way. The only *actual* users of batchable RPCs in core were: 1) largefiles, wherein it batches up many statlfile calls. It sends hexlified hashes over the wire and gets a 0, 1, or 2 back as a response. No risk of special characters. 2) setdiscovery, which was using heads() and known(), both of which communicate via hexlified nodes. Again, no risk of special characters. Since the escaping functionality has been completely broken since it was introduced, we know that it has no users. As such, we can change the escaping mechanism without having to worry about backwards compatibility issues. For the curious, this was detected by chance: it happens that the lz4-compressed text of a test file for remotefilelog compressed to something containing a ;, which then caused the failure when I moved remotefilelog to using batching for file content fetching.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12328
b63f6422d2a7 tests: fix a bunch of pointless #s in unified tests
Matt Mackall <mpm@selenic.com>
parents: 12316
diff changeset
     1
Test update logic when there are renames
10874
4f11978ae45d copies: properly visit file context ancestors on working file contexts
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
     2
12328
b63f6422d2a7 tests: fix a bunch of pointless #s in unified tests
Matt Mackall <mpm@selenic.com>
parents: 12316
diff changeset
     3
Update with local changes across a file rename
12299
a73684df0f8a tests: unify test-update-renames
Adrian Buehlmann <adrian@cadifra.com>
parents: 10874
diff changeset
     4
a73684df0f8a tests: unify test-update-renames
Adrian Buehlmann <adrian@cadifra.com>
parents: 10874
diff changeset
     5
  $ hg init
a73684df0f8a tests: unify test-update-renames
Adrian Buehlmann <adrian@cadifra.com>
parents: 10874
diff changeset
     6
a73684df0f8a tests: unify test-update-renames
Adrian Buehlmann <adrian@cadifra.com>
parents: 10874
diff changeset
     7
  $ echo a > a
a73684df0f8a tests: unify test-update-renames
Adrian Buehlmann <adrian@cadifra.com>
parents: 10874
diff changeset
     8
  $ hg add a
a73684df0f8a tests: unify test-update-renames
Adrian Buehlmann <adrian@cadifra.com>
parents: 10874
diff changeset
     9
  $ hg ci -m a
a73684df0f8a tests: unify test-update-renames
Adrian Buehlmann <adrian@cadifra.com>
parents: 10874
diff changeset
    10
a73684df0f8a tests: unify test-update-renames
Adrian Buehlmann <adrian@cadifra.com>
parents: 10874
diff changeset
    11
  $ hg mv a b
a73684df0f8a tests: unify test-update-renames
Adrian Buehlmann <adrian@cadifra.com>
parents: 10874
diff changeset
    12
  $ hg ci -m rename
a73684df0f8a tests: unify test-update-renames
Adrian Buehlmann <adrian@cadifra.com>
parents: 10874
diff changeset
    13
a73684df0f8a tests: unify test-update-renames
Adrian Buehlmann <adrian@cadifra.com>
parents: 10874
diff changeset
    14
  $ echo b > b
a73684df0f8a tests: unify test-update-renames
Adrian Buehlmann <adrian@cadifra.com>
parents: 10874
diff changeset
    15
  $ hg ci -m change
a73684df0f8a tests: unify test-update-renames
Adrian Buehlmann <adrian@cadifra.com>
parents: 10874
diff changeset
    16
a73684df0f8a tests: unify test-update-renames
Adrian Buehlmann <adrian@cadifra.com>
parents: 10874
diff changeset
    17
  $ hg up -q 0
a73684df0f8a tests: unify test-update-renames
Adrian Buehlmann <adrian@cadifra.com>
parents: 10874
diff changeset
    18
a73684df0f8a tests: unify test-update-renames
Adrian Buehlmann <adrian@cadifra.com>
parents: 10874
diff changeset
    19
  $ echo c > a
a73684df0f8a tests: unify test-update-renames
Adrian Buehlmann <adrian@cadifra.com>
parents: 10874
diff changeset
    20
a73684df0f8a tests: unify test-update-renames
Adrian Buehlmann <adrian@cadifra.com>
parents: 10874
diff changeset
    21
  $ hg up
a73684df0f8a tests: unify test-update-renames
Adrian Buehlmann <adrian@cadifra.com>
parents: 10874
diff changeset
    22
  merging a and b to b
a73684df0f8a tests: unify test-update-renames
Adrian Buehlmann <adrian@cadifra.com>
parents: 10874
diff changeset
    23
  warning: conflicts during merge.
15501
2371f4aea665 merge: give a special message for internal:merge failure (issue3105)
Matt Mackall <mpm@selenic.com>
parents: 12328
diff changeset
    24
  merging b incomplete! (edit conflicts, then use 'hg resolve --mark')
12299
a73684df0f8a tests: unify test-update-renames
Adrian Buehlmann <adrian@cadifra.com>
parents: 10874
diff changeset
    25
  0 files updated, 0 files merged, 0 files removed, 1 files unresolved
a73684df0f8a tests: unify test-update-renames
Adrian Buehlmann <adrian@cadifra.com>
parents: 10874
diff changeset
    26
  use 'hg resolve' to retry unresolved file merges
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12299
diff changeset
    27
  [1]