tests/test-dirstate-race.t
author Matt Harbison <matt_harbison@yahoo.com>
Thu, 17 Jul 2014 20:17:17 -0400
changeset 21917 ac3b3a2d976d
parent 12279 28e2e3804f2e
child 32651 c850f0ed54c1
permissions -rw-r--r--
largefiles: avoid unnecessary creation of .hg/largefiles when opening lfdirstate Previously, the directory '.hg/largefiles' would always be created if it didn't exist when the lfdirstate was opened. If there were no standin files, no dirstate file would be created in the directory. The end result was that enabling the largefiles extension globally, but not explicitly adding a largefile would result in the repository eventually sprouting this directory. Creation of this directory effectively changes readonly operations like summary and status into operations that require write access. Without write access, commands that would succeed without the extension loaded would abort with a surprising error when the extension is loaded, but not actively used: $ hg sum -R /tmp/thg --config extensions.largefiles= parent: 16541:00dc703d5aed repowidget: specify incoming bundle by plain file path to avoid url parsing branch: default abort: Permission denied: '/tmp/thg/.hg/largefiles' This change is simpler than changing the callers of openlfdirstate() to use the 'create' parameter that was introduced in ae57920ac188, and probably how that should have been implemented in the first place.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 6327
diff changeset
     1
  $ hg init
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 6327
diff changeset
     2
  $ echo a > a
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 6327
diff changeset
     3
  $ hg add a
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 6327
diff changeset
     4
  $ hg commit -m test
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 6327
diff changeset
     5
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 6327
diff changeset
     6
Do we ever miss a sub-second change?:
6327
6d952dc2abc9 dirstate: refactor granularity code, add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
     7
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 6327
diff changeset
     8
  $ for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20; do
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 6327
diff changeset
     9
  >     hg co -qC 0
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 6327
diff changeset
    10
  >     echo b > a
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 6327
diff changeset
    11
  >     hg st
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 6327
diff changeset
    12
  > done
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 6327
diff changeset
    13
  M a
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 6327
diff changeset
    14
  M a
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 6327
diff changeset
    15
  M a
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 6327
diff changeset
    16
  M a
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 6327
diff changeset
    17
  M a
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 6327
diff changeset
    18
  M a
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 6327
diff changeset
    19
  M a
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 6327
diff changeset
    20
  M a
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 6327
diff changeset
    21
  M a
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 6327
diff changeset
    22
  M a
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 6327
diff changeset
    23
  M a
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 6327
diff changeset
    24
  M a
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 6327
diff changeset
    25
  M a
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 6327
diff changeset
    26
  M a
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 6327
diff changeset
    27
  M a
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 6327
diff changeset
    28
  M a
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 6327
diff changeset
    29
  M a
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 6327
diff changeset
    30
  M a
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 6327
diff changeset
    31
  M a
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 6327
diff changeset
    32
  M a
6327
6d952dc2abc9 dirstate: refactor granularity code, add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    33