tests/test-racy-mutations.t
author Dan Villiom Podlaski Christiansen <danchr@gmail.com>
Mon, 18 Nov 2024 15:42:09 +0100
changeset 52314 33d8cb64e9da
parent 52194 16b300e30139
permissions -rw-r--r--
rust: fix darwin build
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
46607
e9901d01d135 revlog: add a mechanism to verify expected file position before appending
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
     1
#testcases skip-detection fail-if-detected
e9901d01d135 revlog: add a mechanism to verify expected file position before appending
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
     2
e9901d01d135 revlog: add a mechanism to verify expected file position before appending
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
     3
Test situations that "should" only be reproducible:
e9901d01d135 revlog: add a mechanism to verify expected file position before appending
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
     4
- on networked filesystems, or
e9901d01d135 revlog: add a mechanism to verify expected file position before appending
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
     5
- user using `hg debuglocks` to eliminate the lock file, or
e9901d01d135 revlog: add a mechanism to verify expected file position before appending
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
     6
- something (that doesn't respect the lock file) writing to the .hg directory
e9901d01d135 revlog: add a mechanism to verify expected file position before appending
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
     7
while we're running
e9901d01d135 revlog: add a mechanism to verify expected file position before appending
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
     8
49991
3997c64eff8b test: use a more direct approach to test racy mutation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49047
diff changeset
     9
3997c64eff8b test: use a more direct approach to test racy mutation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49047
diff changeset
    10
Initial setup
3997c64eff8b test: use a more direct approach to test racy mutation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49047
diff changeset
    11
-------------
3997c64eff8b test: use a more direct approach to test racy mutation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49047
diff changeset
    12
3997c64eff8b test: use a more direct approach to test racy mutation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49047
diff changeset
    13
  $ hg init base-repo
3997c64eff8b test: use a more direct approach to test racy mutation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49047
diff changeset
    14
  $ cd base-repo
46607
e9901d01d135 revlog: add a mechanism to verify expected file position before appending
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    15
49047
c827bb7b5806 run-tests: introduce "forward-slash" version of everything on windows
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49046
diff changeset
    16
  $ cat > "$TESTTMP_FORWARD_SLASH/waitlock_editor.sh" <<EOF
46607
e9901d01d135 revlog: add a mechanism to verify expected file position before appending
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    17
  >     [ -n "\${WAITLOCK_ANNOUNCE:-}" ] && touch "\${WAITLOCK_ANNOUNCE}"
e9901d01d135 revlog: add a mechanism to verify expected file position before appending
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    18
  >     f="\${WAITLOCK_FILE}"
e9901d01d135 revlog: add a mechanism to verify expected file position before appending
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    19
  >     start=\`date +%s\`
52194
16b300e30139 tests: bump the wait timeouts in test-racy-mutations.t
Matt Harbison <matt_harbison@yahoo.com>
parents: 52193
diff changeset
    20
  >     timeout=20
49047
c827bb7b5806 run-tests: introduce "forward-slash" version of everything on windows
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49046
diff changeset
    21
  >     "$RUNTESTDIR_FORWARD_SLASH/testlib/wait-on-file" "\$timeout" "\$f"
46607
e9901d01d135 revlog: add a mechanism to verify expected file position before appending
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    22
  >     if [ \$# -gt 1 ]; then
e9901d01d135 revlog: add a mechanism to verify expected file position before appending
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    23
  >         cat "\$@"
e9901d01d135 revlog: add a mechanism to verify expected file position before appending
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    24
  >     fi
e9901d01d135 revlog: add a mechanism to verify expected file position before appending
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    25
  > EOF
e9901d01d135 revlog: add a mechanism to verify expected file position before appending
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    26
e9901d01d135 revlog: add a mechanism to verify expected file position before appending
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    27
Things behave differently if we don't already have a 00changelog.i file when
e9901d01d135 revlog: add a mechanism to verify expected file position before appending
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    28
this all starts, so let's make one.
e9901d01d135 revlog: add a mechanism to verify expected file position before appending
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    29
e9901d01d135 revlog: add a mechanism to verify expected file position before appending
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    30
  $ echo r0 > r0
e9901d01d135 revlog: add a mechanism to verify expected file position before appending
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    31
  $ hg commit -qAm 'r0'
e9901d01d135 revlog: add a mechanism to verify expected file position before appending
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    32
49991
3997c64eff8b test: use a more direct approach to test racy mutation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49047
diff changeset
    33
  $ cd ..
3997c64eff8b test: use a more direct approach to test racy mutation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49047
diff changeset
    34
  $ cp -R base-repo main-client
3997c64eff8b test: use a more direct approach to test racy mutation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49047
diff changeset
    35
  $ cp -R base-repo racing-client
3997c64eff8b test: use a more direct approach to test racy mutation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49047
diff changeset
    36
3997c64eff8b test: use a more direct approach to test racy mutation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49047
diff changeset
    37
  $ mkdir sync
3997c64eff8b test: use a more direct approach to test racy mutation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49047
diff changeset
    38
  $ EDITOR_STARTED="$TESTTMP_FORWARD_SLASH/sync/.editor_started"
3997c64eff8b test: use a more direct approach to test racy mutation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49047
diff changeset
    39
  $ MISCHIEF_MANAGED="$TESTTMP_FORWARD_SLASH/sync/.mischief_managed"
3997c64eff8b test: use a more direct approach to test racy mutation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49047
diff changeset
    40
  $ JOBS_FINISHED="$TESTTMP_FORWARD_SLASH/sync/.jobs_finished"
3997c64eff8b test: use a more direct approach to test racy mutation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49047
diff changeset
    41
3997c64eff8b test: use a more direct approach to test racy mutation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49047
diff changeset
    42
Actual test
3997c64eff8b test: use a more direct approach to test racy mutation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49047
diff changeset
    43
-----------
3997c64eff8b test: use a more direct approach to test racy mutation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49047
diff changeset
    44
46607
e9901d01d135 revlog: add a mechanism to verify expected file position before appending
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    45
Start an hg commit that will take a while
49991
3997c64eff8b test: use a more direct approach to test racy mutation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49047
diff changeset
    46
3997c64eff8b test: use a more direct approach to test racy mutation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49047
diff changeset
    47
  $ cd main-client
46607
e9901d01d135 revlog: add a mechanism to verify expected file position before appending
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    48
e9901d01d135 revlog: add a mechanism to verify expected file position before appending
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    49
#if fail-if-detected
49991
3997c64eff8b test: use a more direct approach to test racy mutation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49047
diff changeset
    50
  $ cat >> $HGRCPATH << EOF
46607
e9901d01d135 revlog: add a mechanism to verify expected file position before appending
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    51
  > [debug]
e9901d01d135 revlog: add a mechanism to verify expected file position before appending
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    52
  > revlog.verifyposition.changelog = fail
e9901d01d135 revlog: add a mechanism to verify expected file position before appending
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    53
  > EOF
e9901d01d135 revlog: add a mechanism to verify expected file position before appending
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    54
#endif
e9901d01d135 revlog: add a mechanism to verify expected file position before appending
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    55
e9901d01d135 revlog: add a mechanism to verify expected file position before appending
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    56
  $ echo foo > foo
49991
3997c64eff8b test: use a more direct approach to test racy mutation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49047
diff changeset
    57
  $ (
3997c64eff8b test: use a more direct approach to test racy mutation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49047
diff changeset
    58
  >    unset HGEDITOR;
3997c64eff8b test: use a more direct approach to test racy mutation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49047
diff changeset
    59
  >    WAITLOCK_ANNOUNCE="${EDITOR_STARTED}" \
3997c64eff8b test: use a more direct approach to test racy mutation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49047
diff changeset
    60
  >    WAITLOCK_FILE="${MISCHIEF_MANAGED}" \
3997c64eff8b test: use a more direct approach to test racy mutation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49047
diff changeset
    61
  >    hg commit -qAm 'r1 (foo)' --edit foo \
51954
b6ce567d5bea tests: fix lock file path mangling in `test-racy-mutations.t` on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 51181
diff changeset
    62
  >    --config ui.editor="sh $TESTTMP/waitlock_editor.sh" \
49991
3997c64eff8b test: use a more direct approach to test racy mutation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49047
diff changeset
    63
  >    > .foo_commit_out 2>&1 ;\
3997c64eff8b test: use a more direct approach to test racy mutation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49047
diff changeset
    64
  >    touch "${JOBS_FINISHED}"
3997c64eff8b test: use a more direct approach to test racy mutation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49047
diff changeset
    65
  > ) &
46607
e9901d01d135 revlog: add a mechanism to verify expected file position before appending
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    66
e9901d01d135 revlog: add a mechanism to verify expected file position before appending
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    67
Wait for the "editor" to actually start
52194
16b300e30139 tests: bump the wait timeouts in test-racy-mutations.t
Matt Harbison <matt_harbison@yahoo.com>
parents: 52193
diff changeset
    68
  $ sh "$RUNTESTDIR_FORWARD_SLASH/testlib/wait-on-file" 20 "${EDITOR_STARTED}"
46607
e9901d01d135 revlog: add a mechanism to verify expected file position before appending
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    69
49991
3997c64eff8b test: use a more direct approach to test racy mutation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49047
diff changeset
    70
Do a concurrent edition
3997c64eff8b test: use a more direct approach to test racy mutation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49047
diff changeset
    71
  $ cd ../racing-client
3997c64eff8b test: use a more direct approach to test racy mutation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49047
diff changeset
    72
  $ touch ../pre-race
52194
16b300e30139 tests: bump the wait timeouts in test-racy-mutations.t
Matt Harbison <matt_harbison@yahoo.com>
parents: 52193
diff changeset
    73
  $ sleep 10
46607
e9901d01d135 revlog: add a mechanism to verify expected file position before appending
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    74
  $ echo bar > bar
49991
3997c64eff8b test: use a more direct approach to test racy mutation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49047
diff changeset
    75
  $ hg --repository ../racing-client commit -qAm 'r2 (bar)' bar
3997c64eff8b test: use a more direct approach to test racy mutation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49047
diff changeset
    76
  $ hg --repository ../racing-client debugrevlogindex -c
46607
e9901d01d135 revlog: add a mechanism to verify expected file position before appending
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    77
     rev linkrev nodeid       p1           p2
e9901d01d135 revlog: add a mechanism to verify expected file position before appending
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    78
       0       0 222799e2f90b 000000000000 000000000000
e9901d01d135 revlog: add a mechanism to verify expected file position before appending
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    79
       1       1 6f124f6007a0 222799e2f90b 000000000000
52193
bda065f37f64 tests: add a "missing" tests for manifest content in test-racy-mutations.t
Matt Harbison <matt_harbison@yahoo.com>
parents: 52192
diff changeset
    80
  $ hg --repository ../racing-client debugrevlogindex -m
bda065f37f64 tests: add a "missing" tests for manifest content in test-racy-mutations.t
Matt Harbison <matt_harbison@yahoo.com>
parents: 52192
diff changeset
    81
     rev linkrev nodeid       p1           p2
bda065f37f64 tests: add a "missing" tests for manifest content in test-racy-mutations.t
Matt Harbison <matt_harbison@yahoo.com>
parents: 52192
diff changeset
    82
       0       0 7b7020262a56 000000000000 000000000000
bda065f37f64 tests: add a "missing" tests for manifest content in test-racy-mutations.t
Matt Harbison <matt_harbison@yahoo.com>
parents: 52192
diff changeset
    83
       1       1 ad3fe36d86d9 7b7020262a56 000000000000
bda065f37f64 tests: add a "missing" tests for manifest content in test-racy-mutations.t
Matt Harbison <matt_harbison@yahoo.com>
parents: 52192
diff changeset
    84
46607
e9901d01d135 revlog: add a mechanism to verify expected file position before appending
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    85
49991
3997c64eff8b test: use a more direct approach to test racy mutation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49047
diff changeset
    86
We simulate an network FS race by overwriting raced repo content with the new
3997c64eff8b test: use a more direct approach to test racy mutation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49047
diff changeset
    87
content of the files changed in the racing repository
3997c64eff8b test: use a more direct approach to test racy mutation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49047
diff changeset
    88
3997c64eff8b test: use a more direct approach to test racy mutation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49047
diff changeset
    89
  $ for x in `find . -type f -newer ../pre-race`; do
3997c64eff8b test: use a more direct approach to test racy mutation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49047
diff changeset
    90
  >    cp $x ../main-client/$x
3997c64eff8b test: use a more direct approach to test racy mutation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49047
diff changeset
    91
  > done
3997c64eff8b test: use a more direct approach to test racy mutation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49047
diff changeset
    92
  $ cd ../main-client
3997c64eff8b test: use a more direct approach to test racy mutation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49047
diff changeset
    93
46607
e9901d01d135 revlog: add a mechanism to verify expected file position before appending
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    94
Awaken the editor from that first commit
e9901d01d135 revlog: add a mechanism to verify expected file position before appending
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    95
  $ touch "${MISCHIEF_MANAGED}"
e9901d01d135 revlog: add a mechanism to verify expected file position before appending
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    96
And wait for it to finish
49047
c827bb7b5806 run-tests: introduce "forward-slash" version of everything on windows
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49046
diff changeset
    97
  $ WAITLOCK_FILE="${JOBS_FINISHED}" sh "$TESTTMP_FORWARD_SLASH/waitlock_editor.sh"
46607
e9901d01d135 revlog: add a mechanism to verify expected file position before appending
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    98
e9901d01d135 revlog: add a mechanism to verify expected file position before appending
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    99
#if skip-detection
e9901d01d135 revlog: add a mechanism to verify expected file position before appending
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
   100
(Ensure there was no output)
e9901d01d135 revlog: add a mechanism to verify expected file position before appending
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
   101
  $ cat .foo_commit_out
e9901d01d135 revlog: add a mechanism to verify expected file position before appending
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
   102
And observe a corrupted repository -- rev 2's linkrev is 1, which should never
e9901d01d135 revlog: add a mechanism to verify expected file position before appending
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
   103
happen for the changelog (the linkrev should always refer to itself).
e9901d01d135 revlog: add a mechanism to verify expected file position before appending
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
   104
  $ hg debugrevlogindex -c
e9901d01d135 revlog: add a mechanism to verify expected file position before appending
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
   105
     rev linkrev nodeid       p1           p2
e9901d01d135 revlog: add a mechanism to verify expected file position before appending
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
   106
       0       0 222799e2f90b 000000000000 000000000000
e9901d01d135 revlog: add a mechanism to verify expected file position before appending
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
   107
       1       1 6f124f6007a0 222799e2f90b 000000000000
e9901d01d135 revlog: add a mechanism to verify expected file position before appending
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
   108
       2       1 ac80e6205bb2 222799e2f90b 000000000000
52193
bda065f37f64 tests: add a "missing" tests for manifest content in test-racy-mutations.t
Matt Harbison <matt_harbison@yahoo.com>
parents: 52192
diff changeset
   109
bda065f37f64 tests: add a "missing" tests for manifest content in test-racy-mutations.t
Matt Harbison <matt_harbison@yahoo.com>
parents: 52192
diff changeset
   110
TODO: Figure out why the middle entry is missing on Windows.
bda065f37f64 tests: add a "missing" tests for manifest content in test-racy-mutations.t
Matt Harbison <matt_harbison@yahoo.com>
parents: 52192
diff changeset
   111
  $ hg debugrevlogindex -m
bda065f37f64 tests: add a "missing" tests for manifest content in test-racy-mutations.t
Matt Harbison <matt_harbison@yahoo.com>
parents: 52192
diff changeset
   112
     rev linkrev nodeid       p1           p2
bda065f37f64 tests: add a "missing" tests for manifest content in test-racy-mutations.t
Matt Harbison <matt_harbison@yahoo.com>
parents: 52192
diff changeset
   113
       0       0 7b7020262a56 000000000000 000000000000
bda065f37f64 tests: add a "missing" tests for manifest content in test-racy-mutations.t
Matt Harbison <matt_harbison@yahoo.com>
parents: 52192
diff changeset
   114
       1       1 ad3fe36d86d9 7b7020262a56 000000000000 (no-windows !)
bda065f37f64 tests: add a "missing" tests for manifest content in test-racy-mutations.t
Matt Harbison <matt_harbison@yahoo.com>
parents: 52192
diff changeset
   115
       2       1 d93163bb8ce3 7b7020262a56 000000000000 (no-windows !)
bda065f37f64 tests: add a "missing" tests for manifest content in test-racy-mutations.t
Matt Harbison <matt_harbison@yahoo.com>
parents: 52192
diff changeset
   116
       1       1 d93163bb8ce3 7b7020262a56 000000000000 (windows !)
bda065f37f64 tests: add a "missing" tests for manifest content in test-racy-mutations.t
Matt Harbison <matt_harbison@yahoo.com>
parents: 52192
diff changeset
   117
46607
e9901d01d135 revlog: add a mechanism to verify expected file position before appending
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
   118
#endif
e9901d01d135 revlog: add a mechanism to verify expected file position before appending
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
   119
e9901d01d135 revlog: add a mechanism to verify expected file position before appending
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
   120
#if fail-if-detected
e9901d01d135 revlog: add a mechanism to verify expected file position before appending
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
   121
  $ cat .foo_commit_out
50029
28dfb2df4ab9 commit: use `dirstate.change_files` to scope the associated `addremove`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49991
diff changeset
   122
  note: commit message saved in .hg/last-message.txt
28dfb2df4ab9 commit: use `dirstate.change_files` to scope the associated `addremove`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49991
diff changeset
   123
  note: use 'hg commit --logfile .hg/last-message.txt --edit' to reuse it
46607
e9901d01d135 revlog: add a mechanism to verify expected file position before appending
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
   124
  transaction abort!
e9901d01d135 revlog: add a mechanism to verify expected file position before appending
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
   125
  rollback completed
51181
dcaa2df1f688 changelog: never inline changelog
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50029
diff changeset
   126
  abort: 00changelog.i: file cursor at position 128, expected 64
46607
e9901d01d135 revlog: add a mechanism to verify expected file position before appending
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
   127
And no corruption in the changelog.
e9901d01d135 revlog: add a mechanism to verify expected file position before appending
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
   128
  $ hg debugrevlogindex -c
e9901d01d135 revlog: add a mechanism to verify expected file position before appending
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
   129
     rev linkrev nodeid       p1           p2
e9901d01d135 revlog: add a mechanism to verify expected file position before appending
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
   130
       0       0 222799e2f90b 000000000000 000000000000
47214
906a7bcaac86 revlog: introduce a mandatory `_writing` context to update revlog content
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47065
diff changeset
   131
       1       1 6f124f6007a0 222799e2f90b 000000000000 (missing-correct-output !)
52192
54be3c9bc81f tests: conditionalize missing output in test-racy-mutations.t on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 51954
diff changeset
   132
46607
e9901d01d135 revlog: add a mechanism to verify expected file position before appending
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
   133
And, because of transactions, there's none in the manifestlog either.
52192
54be3c9bc81f tests: conditionalize missing output in test-racy-mutations.t on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 51954
diff changeset
   134
54be3c9bc81f tests: conditionalize missing output in test-racy-mutations.t on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 51954
diff changeset
   135
TODO: Figure out why this is different on Windows.
46607
e9901d01d135 revlog: add a mechanism to verify expected file position before appending
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
   136
  $ hg debugrevlogindex -m
e9901d01d135 revlog: add a mechanism to verify expected file position before appending
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
   137
     rev linkrev nodeid       p1           p2
e9901d01d135 revlog: add a mechanism to verify expected file position before appending
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
   138
       0       0 7b7020262a56 000000000000 000000000000
52192
54be3c9bc81f tests: conditionalize missing output in test-racy-mutations.t on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 51954
diff changeset
   139
       1       1 ad3fe36d86d9 7b7020262a56 000000000000 (no-windows !)
54be3c9bc81f tests: conditionalize missing output in test-racy-mutations.t on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 51954
diff changeset
   140
       1       1 ad3fe36d86d9 7b7020262a56 000000000000 (missing-correct-output windows !)
46607
e9901d01d135 revlog: add a mechanism to verify expected file position before appending
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
   141
#endif
e9901d01d135 revlog: add a mechanism to verify expected file position before appending
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
   142