Mercurial > hg
annotate tests/test-simple-update.t @ 22097:7d1eac06ab2b
largefiles: drop orphan entries from lfdristat at "hg rollback"
Before this patch, newly added (but not yet committed) largefiles
aren't treated as unknown ("?") after "hg rollback".
After "hg rollback", lfdirstate still contains "A" status entries for
such largefiles, even though corresponding entries for standins are
already dropped from dirstate.
Such "orphan" entries in lfdirstate prevent unknown (large)files in
the working directory from being listed up in "unknown" list. The code
path in "if working" route of "lfilesrepo.status" below drops
largefiles tracked in lfdirstate from "unknown" list:
lfiles = set(lfdirstate._map)
# Unknown files
result[4] = set(result[4]).difference(lfiles)
This patch drops orphan entries from lfdristate at "hg rollback".
This is a temporary way to fix with less changes. For fundamental
resolution of this kind of problems in the future, lfdirstate should
be rollback-ed as a part of transaction, as same as dirstate.
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Mon, 11 Aug 2014 22:29:43 +0900 |
parents | f2719b387380 |
children | 92bca12328d1 |
rev | line source |
---|---|
13956
ffb5c09ba822
tests: remove redundant mkdir
Martin Geisler <mg@lazybytes.net>
parents:
12365
diff
changeset
|
1 $ hg init test |
12279 | 2 $ cd test |
3 $ echo foo>foo | |
4 $ hg addremove | |
5 adding foo | |
6 $ hg commit -m "1" | |
331 | 7 |
12279 | 8 $ hg verify |
9 checking changesets | |
10 checking manifests | |
11 crosschecking files in changesets and manifests | |
12 checking files | |
13 1 files, 1 changesets, 1 total revisions | |
14 | |
15 $ hg clone . ../branch | |
16 updating to branch default | |
17 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
18 $ cd ../branch | |
19 $ hg co | |
20 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
21 $ echo bar>>foo | |
22 $ hg commit -m "2" | |
331 | 23 |
12279 | 24 $ cd ../test |
25 | |
26 $ hg pull ../branch | |
27 pulling from ../branch | |
28 searching for changes | |
29 adding changesets | |
30 adding manifests | |
31 adding file changes | |
32 added 1 changesets with 1 changes to 1 files | |
33 (run 'hg update' to get a working copy) | |
331 | 34 |
12279 | 35 $ hg verify |
36 checking changesets | |
37 checking manifests | |
38 crosschecking files in changesets and manifests | |
39 checking files | |
40 1 files, 2 changesets, 2 total revisions | |
41 | |
42 $ hg co | |
43 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
44 | |
45 $ cat foo | |
46 foo | |
47 bar | |
48 | |
49 $ hg manifest --debug | |
50 6f4310b00b9a147241b071a60c28a650827fb03d 644 foo | |
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 .. |