tests/test-simple-update.t
author Matt Harbison <matt_harbison@yahoo.com>
Thu, 17 Jul 2014 20:17:17 -0400
changeset 21917 ac3b3a2d976d
parent 16913 f2719b387380
child 31117 92bca12328d1
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:
13956
ffb5c09ba822 tests: remove redundant mkdir
Martin Geisler <mg@lazybytes.net>
parents: 12365
diff changeset
     1
  $ hg init test
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
     2
  $ cd test
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
     3
  $ echo foo>foo
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
     4
  $ hg addremove
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
     5
  adding foo
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
     6
  $ hg commit -m "1"
331
55f63f3b6a54 Add a simple testing framework
mpm@selenic.com
parents:
diff changeset
     7
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
     8
  $ hg verify
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
     9
  checking changesets
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
    10
  checking manifests
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
    11
  crosschecking files in changesets and manifests
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
    12
  checking files
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
    13
  1 files, 1 changesets, 1 total revisions
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
    14
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
    15
  $ hg clone . ../branch
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
    16
  updating to branch default
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
    17
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
    18
  $ cd ../branch
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
    19
  $ hg co
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
    20
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
    21
  $ echo bar>>foo
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
    22
  $ hg commit -m "2"
331
55f63f3b6a54 Add a simple testing framework
mpm@selenic.com
parents:
diff changeset
    23
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
    24
  $ cd ../test
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
    25
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
    26
  $ hg pull ../branch
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
    27
  pulling from ../branch
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
    28
  searching for changes
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
    29
  adding changesets
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
    30
  adding manifests
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
    31
  adding file changes
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
    32
  added 1 changesets with 1 changes to 1 files
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
    33
  (run 'hg update' to get a working copy)
331
55f63f3b6a54 Add a simple testing framework
mpm@selenic.com
parents:
diff changeset
    34
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
    35
  $ hg verify
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
    36
  checking changesets
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
    37
  checking manifests
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
    38
  crosschecking files in changesets and manifests
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
    39
  checking files
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
    40
  1 files, 2 changesets, 2 total revisions
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
    41
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
    42
  $ hg co
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
    43
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
    44
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
    45
  $ cat foo
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
    46
  foo
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
    47
  bar
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
    48
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
    49
  $ hg manifest --debug
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
    50
  6f4310b00b9a147241b071a60c28a650827fb03d 644   foo
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
    51
13960
190e5f2043d9 update: fix check for no rev when a date is given
Idan Kamara <idankk86@gmail.com>
parents: 13956
diff changeset
    52
update to rev 0 with a date
190e5f2043d9 update: fix check for no rev when a date is given
Idan Kamara <idankk86@gmail.com>
parents: 13956
diff changeset
    53
190e5f2043d9 update: fix check for no rev when a date is given
Idan Kamara <idankk86@gmail.com>
parents: 13956
diff changeset
    54
  $ hg upd -d foo 0
190e5f2043d9 update: fix check for no rev when a date is given
Idan Kamara <idankk86@gmail.com>
parents: 13956
diff changeset
    55
  abort: you can't specify a revision and a date
190e5f2043d9 update: fix check for no rev when a date is given
Idan Kamara <idankk86@gmail.com>
parents: 13956
diff changeset
    56
  [255]
16913
f2719b387380 tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents: 13960
diff changeset
    57
f2719b387380 tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents: 13960
diff changeset
    58
  $ cd ..