Mercurial > hg
annotate tests/test-largefiles-cache.t @ 24847:b705e5ab3b07 stable
bundle2: capture transaction rollback message output (issue4614)
The output from the transaction rollback was not included into the reply bundle.
It was eventually caught by the usual 'unbundle' output capture and sent to the
client but the result was out of order on the client side. We now capture the
output for the transaction release and transmit it the same way as all other
output.
We should probably rethink the whole output capture things but this would not be
appropriate for stable.
The is still multiple cases were output failed to be properly capture, they will
be fixed in later changesets.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Thu, 23 Apr 2015 14:20:36 +0100 |
parents | 2a3f24786d09 |
children | d881c072050a |
rev | line source |
---|---|
15472
6a7e874390b0
largefiles: treat status of cache missed largefiles as "missing" correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff
changeset
|
1 Create user cache directory |
6a7e874390b0
largefiles: treat status of cache missed largefiles as "missing" correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff
changeset
|
2 |
6a7e874390b0
largefiles: treat status of cache missed largefiles as "missing" correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff
changeset
|
3 $ USERCACHE=`pwd`/cache; export USERCACHE |
6a7e874390b0
largefiles: treat status of cache missed largefiles as "missing" correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff
changeset
|
4 $ cat <<EOF >> ${HGRCPATH} |
6a7e874390b0
largefiles: treat status of cache missed largefiles as "missing" correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff
changeset
|
5 > [extensions] |
6a7e874390b0
largefiles: treat status of cache missed largefiles as "missing" correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff
changeset
|
6 > hgext.largefiles= |
6a7e874390b0
largefiles: treat status of cache missed largefiles as "missing" correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff
changeset
|
7 > [largefiles] |
6a7e874390b0
largefiles: treat status of cache missed largefiles as "missing" correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff
changeset
|
8 > usercache=${USERCACHE} |
6a7e874390b0
largefiles: treat status of cache missed largefiles as "missing" correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff
changeset
|
9 > EOF |
6a7e874390b0
largefiles: treat status of cache missed largefiles as "missing" correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff
changeset
|
10 $ mkdir -p ${USERCACHE} |
6a7e874390b0
largefiles: treat status of cache missed largefiles as "missing" correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff
changeset
|
11 |
6a7e874390b0
largefiles: treat status of cache missed largefiles as "missing" correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff
changeset
|
12 Create source repo, and commit adding largefile. |
6a7e874390b0
largefiles: treat status of cache missed largefiles as "missing" correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff
changeset
|
13 |
6a7e874390b0
largefiles: treat status of cache missed largefiles as "missing" correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff
changeset
|
14 $ hg init src |
6a7e874390b0
largefiles: treat status of cache missed largefiles as "missing" correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff
changeset
|
15 $ cd src |
6a7e874390b0
largefiles: treat status of cache missed largefiles as "missing" correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff
changeset
|
16 $ echo large > large |
6a7e874390b0
largefiles: treat status of cache missed largefiles as "missing" correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff
changeset
|
17 $ hg add --large large |
6a7e874390b0
largefiles: treat status of cache missed largefiles as "missing" correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff
changeset
|
18 $ hg commit -m 'add largefile' |
18723
e56f7cd8c67b
tests: don't rely on broken behaviour in test-largefiles-cache.t
Mads Kiilerich <madski@unity3d.com>
parents:
18461
diff
changeset
|
19 $ hg rm large |
e56f7cd8c67b
tests: don't rely on broken behaviour in test-largefiles-cache.t
Mads Kiilerich <madski@unity3d.com>
parents:
18461
diff
changeset
|
20 $ hg commit -m 'branchhead without largefile' |
e56f7cd8c67b
tests: don't rely on broken behaviour in test-largefiles-cache.t
Mads Kiilerich <madski@unity3d.com>
parents:
18461
diff
changeset
|
21 $ hg up -qr 0 |
15472
6a7e874390b0
largefiles: treat status of cache missed largefiles as "missing" correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff
changeset
|
22 $ cd .. |
6a7e874390b0
largefiles: treat status of cache missed largefiles as "missing" correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff
changeset
|
23 |
6a7e874390b0
largefiles: treat status of cache missed largefiles as "missing" correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff
changeset
|
24 Discard all cached largefiles in USERCACHE |
6a7e874390b0
largefiles: treat status of cache missed largefiles as "missing" correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff
changeset
|
25 |
6a7e874390b0
largefiles: treat status of cache missed largefiles as "missing" correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff
changeset
|
26 $ rm -rf ${USERCACHE} |
6a7e874390b0
largefiles: treat status of cache missed largefiles as "missing" correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff
changeset
|
27 |
15478
f8a0c7925496
tests: fix trailing whitespace
Matt Mackall <mpm@selenic.com>
parents:
15472
diff
changeset
|
28 Create mirror repo, and pull from source without largefile: |
15472
6a7e874390b0
largefiles: treat status of cache missed largefiles as "missing" correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff
changeset
|
29 "pull" is used instead of "clone" for suppression of (1) updating to |
21024
7731a2281cf0
spelling: fixes from spell checker
Mads Kiilerich <madski@unity3d.com>
parents:
20471
diff
changeset
|
30 tip (= caching largefile from source repo), and (2) recording source |
15472
6a7e874390b0
largefiles: treat status of cache missed largefiles as "missing" correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff
changeset
|
31 repo as "default" path in .hg/hgrc. |
6a7e874390b0
largefiles: treat status of cache missed largefiles as "missing" correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff
changeset
|
32 |
6a7e874390b0
largefiles: treat status of cache missed largefiles as "missing" correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff
changeset
|
33 $ hg init mirror |
6a7e874390b0
largefiles: treat status of cache missed largefiles as "missing" correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff
changeset
|
34 $ cd mirror |
6a7e874390b0
largefiles: treat status of cache missed largefiles as "missing" correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff
changeset
|
35 $ hg pull ../src |
6a7e874390b0
largefiles: treat status of cache missed largefiles as "missing" correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff
changeset
|
36 pulling from ../src |
6a7e874390b0
largefiles: treat status of cache missed largefiles as "missing" correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff
changeset
|
37 requesting all changes |
6a7e874390b0
largefiles: treat status of cache missed largefiles as "missing" correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff
changeset
|
38 adding changesets |
6a7e874390b0
largefiles: treat status of cache missed largefiles as "missing" correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff
changeset
|
39 adding manifests |
6a7e874390b0
largefiles: treat status of cache missed largefiles as "missing" correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff
changeset
|
40 adding file changes |
18723
e56f7cd8c67b
tests: don't rely on broken behaviour in test-largefiles-cache.t
Mads Kiilerich <madski@unity3d.com>
parents:
18461
diff
changeset
|
41 added 2 changesets with 1 changes to 1 files |
15472
6a7e874390b0
largefiles: treat status of cache missed largefiles as "missing" correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff
changeset
|
42 (run 'hg update' to get a working copy) |
6a7e874390b0
largefiles: treat status of cache missed largefiles as "missing" correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff
changeset
|
43 |
6a7e874390b0
largefiles: treat status of cache missed largefiles as "missing" correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff
changeset
|
44 Update working directory to "tip", which requires largefile("large"), |
6a7e874390b0
largefiles: treat status of cache missed largefiles as "missing" correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff
changeset
|
45 but there is no cache file for it. So, hg must treat it as |
6a7e874390b0
largefiles: treat status of cache missed largefiles as "missing" correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff
changeset
|
46 "missing"(!) file. |
6a7e874390b0
largefiles: treat status of cache missed largefiles as "missing" correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff
changeset
|
47 |
18723
e56f7cd8c67b
tests: don't rely on broken behaviour in test-largefiles-cache.t
Mads Kiilerich <madski@unity3d.com>
parents:
18461
diff
changeset
|
48 $ hg update -r0 |
15472
6a7e874390b0
largefiles: treat status of cache missed largefiles as "missing" correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff
changeset
|
49 getting changed largefiles |
20471
ea005e754c9c
tests: lines with largefile .* file://$TESTTMP also match on windows
Simon Heimberg <simohe@besonet.ch>
parents:
19950
diff
changeset
|
50 large: largefile 7f7097b041ccf68cc5561e9600da4655d21c6d18 not available from file:/*/$TESTTMP/mirror (glob) |
15472
6a7e874390b0
largefiles: treat status of cache missed largefiles as "missing" correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff
changeset
|
51 0 largefiles updated, 0 removed |
18459
c9db897d5a43
largefiles: fix largefiles+subrepo update (issue3752)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
18159
diff
changeset
|
52 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
15472
6a7e874390b0
largefiles: treat status of cache missed largefiles as "missing" correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff
changeset
|
53 $ hg status |
6a7e874390b0
largefiles: treat status of cache missed largefiles as "missing" correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff
changeset
|
54 ! large |
6a7e874390b0
largefiles: treat status of cache missed largefiles as "missing" correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff
changeset
|
55 |
6a7e874390b0
largefiles: treat status of cache missed largefiles as "missing" correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff
changeset
|
56 Update working directory to null: this cleanup .hg/largefiles/dirstate |
6a7e874390b0
largefiles: treat status of cache missed largefiles as "missing" correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff
changeset
|
57 |
6a7e874390b0
largefiles: treat status of cache missed largefiles as "missing" correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff
changeset
|
58 $ hg update null |
6a7e874390b0
largefiles: treat status of cache missed largefiles as "missing" correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff
changeset
|
59 getting changed largefiles |
6a7e874390b0
largefiles: treat status of cache missed largefiles as "missing" correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff
changeset
|
60 0 largefiles updated, 0 removed |
18459
c9db897d5a43
largefiles: fix largefiles+subrepo update (issue3752)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
18159
diff
changeset
|
61 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
15472
6a7e874390b0
largefiles: treat status of cache missed largefiles as "missing" correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff
changeset
|
62 |
6a7e874390b0
largefiles: treat status of cache missed largefiles as "missing" correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff
changeset
|
63 Update working directory to tip, again. |
6a7e874390b0
largefiles: treat status of cache missed largefiles as "missing" correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff
changeset
|
64 |
18723
e56f7cd8c67b
tests: don't rely on broken behaviour in test-largefiles-cache.t
Mads Kiilerich <madski@unity3d.com>
parents:
18461
diff
changeset
|
65 $ hg update -r0 |
15472
6a7e874390b0
largefiles: treat status of cache missed largefiles as "missing" correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff
changeset
|
66 getting changed largefiles |
20471
ea005e754c9c
tests: lines with largefile .* file://$TESTTMP also match on windows
Simon Heimberg <simohe@besonet.ch>
parents:
19950
diff
changeset
|
67 large: largefile 7f7097b041ccf68cc5561e9600da4655d21c6d18 not available from file:/*/$TESTTMP/mirror (glob) |
15472
6a7e874390b0
largefiles: treat status of cache missed largefiles as "missing" correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff
changeset
|
68 0 largefiles updated, 0 removed |
18459
c9db897d5a43
largefiles: fix largefiles+subrepo update (issue3752)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
18159
diff
changeset
|
69 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
15472
6a7e874390b0
largefiles: treat status of cache missed largefiles as "missing" correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff
changeset
|
70 $ hg status |
6a7e874390b0
largefiles: treat status of cache missed largefiles as "missing" correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
diff
changeset
|
71 ! large |
16986
79902f7e27df
tests: convert some hghave unix-permissions to #if
Mads Kiilerich <mads@kiilerich.com>
parents:
16928
diff
changeset
|
72 $ cd .. |
79902f7e27df
tests: convert some hghave unix-permissions to #if
Mads Kiilerich <mads@kiilerich.com>
parents:
16928
diff
changeset
|
73 |
18724
894a5897a9dd
largefiles: getstandinmatcher should not depend on existence of directories
Mads Kiilerich <madski@unity3d.com>
parents:
18723
diff
changeset
|
74 Verify that largefiles from pulled branchheads are fetched, also to an empty repo |
894a5897a9dd
largefiles: getstandinmatcher should not depend on existence of directories
Mads Kiilerich <madski@unity3d.com>
parents:
18723
diff
changeset
|
75 |
894a5897a9dd
largefiles: getstandinmatcher should not depend on existence of directories
Mads Kiilerich <madski@unity3d.com>
parents:
18723
diff
changeset
|
76 $ hg init mirror2 |
894a5897a9dd
largefiles: getstandinmatcher should not depend on existence of directories
Mads Kiilerich <madski@unity3d.com>
parents:
18723
diff
changeset
|
77 $ hg -R mirror2 pull src -r0 |
894a5897a9dd
largefiles: getstandinmatcher should not depend on existence of directories
Mads Kiilerich <madski@unity3d.com>
parents:
18723
diff
changeset
|
78 pulling from src |
894a5897a9dd
largefiles: getstandinmatcher should not depend on existence of directories
Mads Kiilerich <madski@unity3d.com>
parents:
18723
diff
changeset
|
79 adding changesets |
894a5897a9dd
largefiles: getstandinmatcher should not depend on existence of directories
Mads Kiilerich <madski@unity3d.com>
parents:
18723
diff
changeset
|
80 adding manifests |
894a5897a9dd
largefiles: getstandinmatcher should not depend on existence of directories
Mads Kiilerich <madski@unity3d.com>
parents:
18723
diff
changeset
|
81 adding file changes |
894a5897a9dd
largefiles: getstandinmatcher should not depend on existence of directories
Mads Kiilerich <madski@unity3d.com>
parents:
18723
diff
changeset
|
82 added 1 changesets with 1 changes to 1 files |
894a5897a9dd
largefiles: getstandinmatcher should not depend on existence of directories
Mads Kiilerich <madski@unity3d.com>
parents:
18723
diff
changeset
|
83 (run 'hg update' to get a working copy) |
894a5897a9dd
largefiles: getstandinmatcher should not depend on existence of directories
Mads Kiilerich <madski@unity3d.com>
parents:
18723
diff
changeset
|
84 |
16986
79902f7e27df
tests: convert some hghave unix-permissions to #if
Mads Kiilerich <mads@kiilerich.com>
parents:
16928
diff
changeset
|
85 #if unix-permissions |
16153
05197f9fd1f3
largefiles: use repo.store.createmode for new files in .hg/largefiles
Martin Geisler <mg@aragost.com>
parents:
15916
diff
changeset
|
86 |
05197f9fd1f3
largefiles: use repo.store.createmode for new files in .hg/largefiles
Martin Geisler <mg@aragost.com>
parents:
15916
diff
changeset
|
87 Portable way to print file permissions: |
05197f9fd1f3
largefiles: use repo.store.createmode for new files in .hg/largefiles
Martin Geisler <mg@aragost.com>
parents:
15916
diff
changeset
|
88 |
05197f9fd1f3
largefiles: use repo.store.createmode for new files in .hg/largefiles
Martin Geisler <mg@aragost.com>
parents:
15916
diff
changeset
|
89 $ cat > ls-l.py <<EOF |
05197f9fd1f3
largefiles: use repo.store.createmode for new files in .hg/largefiles
Martin Geisler <mg@aragost.com>
parents:
15916
diff
changeset
|
90 > #!/usr/bin/env python |
05197f9fd1f3
largefiles: use repo.store.createmode for new files in .hg/largefiles
Martin Geisler <mg@aragost.com>
parents:
15916
diff
changeset
|
91 > import sys, os |
05197f9fd1f3
largefiles: use repo.store.createmode for new files in .hg/largefiles
Martin Geisler <mg@aragost.com>
parents:
15916
diff
changeset
|
92 > path = sys.argv[1] |
05197f9fd1f3
largefiles: use repo.store.createmode for new files in .hg/largefiles
Martin Geisler <mg@aragost.com>
parents:
15916
diff
changeset
|
93 > print '%03o' % (os.lstat(path).st_mode & 0777) |
05197f9fd1f3
largefiles: use repo.store.createmode for new files in .hg/largefiles
Martin Geisler <mg@aragost.com>
parents:
15916
diff
changeset
|
94 > EOF |
05197f9fd1f3
largefiles: use repo.store.createmode for new files in .hg/largefiles
Martin Geisler <mg@aragost.com>
parents:
15916
diff
changeset
|
95 $ chmod +x ls-l.py |
05197f9fd1f3
largefiles: use repo.store.createmode for new files in .hg/largefiles
Martin Geisler <mg@aragost.com>
parents:
15916
diff
changeset
|
96 |
05197f9fd1f3
largefiles: use repo.store.createmode for new files in .hg/largefiles
Martin Geisler <mg@aragost.com>
parents:
15916
diff
changeset
|
97 Test that files in .hg/largefiles inherit mode from .hg/store, not |
05197f9fd1f3
largefiles: use repo.store.createmode for new files in .hg/largefiles
Martin Geisler <mg@aragost.com>
parents:
15916
diff
changeset
|
98 from file in working copy: |
05197f9fd1f3
largefiles: use repo.store.createmode for new files in .hg/largefiles
Martin Geisler <mg@aragost.com>
parents:
15916
diff
changeset
|
99 |
05197f9fd1f3
largefiles: use repo.store.createmode for new files in .hg/largefiles
Martin Geisler <mg@aragost.com>
parents:
15916
diff
changeset
|
100 $ cd src |
05197f9fd1f3
largefiles: use repo.store.createmode for new files in .hg/largefiles
Martin Geisler <mg@aragost.com>
parents:
15916
diff
changeset
|
101 $ chmod 750 .hg/store |
05197f9fd1f3
largefiles: use repo.store.createmode for new files in .hg/largefiles
Martin Geisler <mg@aragost.com>
parents:
15916
diff
changeset
|
102 $ chmod 660 large |
05197f9fd1f3
largefiles: use repo.store.createmode for new files in .hg/largefiles
Martin Geisler <mg@aragost.com>
parents:
15916
diff
changeset
|
103 $ echo change >> large |
05197f9fd1f3
largefiles: use repo.store.createmode for new files in .hg/largefiles
Martin Geisler <mg@aragost.com>
parents:
15916
diff
changeset
|
104 $ hg commit -m change |
18723
e56f7cd8c67b
tests: don't rely on broken behaviour in test-largefiles-cache.t
Mads Kiilerich <madski@unity3d.com>
parents:
18461
diff
changeset
|
105 created new head |
16153
05197f9fd1f3
largefiles: use repo.store.createmode for new files in .hg/largefiles
Martin Geisler <mg@aragost.com>
parents:
15916
diff
changeset
|
106 $ ../ls-l.py .hg/largefiles/e151b474069de4ca6898f67ce2f2a7263adf8fea |
05197f9fd1f3
largefiles: use repo.store.createmode for new files in .hg/largefiles
Martin Geisler <mg@aragost.com>
parents:
15916
diff
changeset
|
107 640 |
16154
9b072a5f8f92
largefiles: respect store.createmode in basestore.get
Martin Geisler <mg@aragost.com>
parents:
16153
diff
changeset
|
108 |
9b072a5f8f92
largefiles: respect store.createmode in basestore.get
Martin Geisler <mg@aragost.com>
parents:
16153
diff
changeset
|
109 Test permission of with files in .hg/largefiles created by update: |
9b072a5f8f92
largefiles: respect store.createmode in basestore.get
Martin Geisler <mg@aragost.com>
parents:
16153
diff
changeset
|
110 |
9b072a5f8f92
largefiles: respect store.createmode in basestore.get
Martin Geisler <mg@aragost.com>
parents:
16153
diff
changeset
|
111 $ cd ../mirror |
9b072a5f8f92
largefiles: respect store.createmode in basestore.get
Martin Geisler <mg@aragost.com>
parents:
16153
diff
changeset
|
112 $ rm -r "$USERCACHE" .hg/largefiles # avoid links |
9b072a5f8f92
largefiles: respect store.createmode in basestore.get
Martin Geisler <mg@aragost.com>
parents:
16153
diff
changeset
|
113 $ chmod 750 .hg/store |
9b072a5f8f92
largefiles: respect store.createmode in basestore.get
Martin Geisler <mg@aragost.com>
parents:
16153
diff
changeset
|
114 $ hg pull ../src --update -q |
9b072a5f8f92
largefiles: respect store.createmode in basestore.get
Martin Geisler <mg@aragost.com>
parents:
16153
diff
changeset
|
115 $ ../ls-l.py .hg/largefiles/e151b474069de4ca6898f67ce2f2a7263adf8fea |
9b072a5f8f92
largefiles: respect store.createmode in basestore.get
Martin Geisler <mg@aragost.com>
parents:
16153
diff
changeset
|
116 640 |
16155
1b2b42e866be
largefiles: respect store.createmode and avoid extra file copy
Martin Geisler <mg@aragost.com>
parents:
16154
diff
changeset
|
117 |
1b2b42e866be
largefiles: respect store.createmode and avoid extra file copy
Martin Geisler <mg@aragost.com>
parents:
16154
diff
changeset
|
118 Test permission of files created by push: |
1b2b42e866be
largefiles: respect store.createmode and avoid extra file copy
Martin Geisler <mg@aragost.com>
parents:
16154
diff
changeset
|
119 |
1b2b42e866be
largefiles: respect store.createmode and avoid extra file copy
Martin Geisler <mg@aragost.com>
parents:
16154
diff
changeset
|
120 $ hg serve -R ../src -d -p $HGPORT --pid-file hg.pid \ |
1b2b42e866be
largefiles: respect store.createmode and avoid extra file copy
Martin Geisler <mg@aragost.com>
parents:
16154
diff
changeset
|
121 > --config "web.allow_push=*" --config web.push_ssl=no |
1b2b42e866be
largefiles: respect store.createmode and avoid extra file copy
Martin Geisler <mg@aragost.com>
parents:
16154
diff
changeset
|
122 $ cat hg.pid >> $DAEMON_PIDS |
1b2b42e866be
largefiles: respect store.createmode and avoid extra file copy
Martin Geisler <mg@aragost.com>
parents:
16154
diff
changeset
|
123 |
1b2b42e866be
largefiles: respect store.createmode and avoid extra file copy
Martin Geisler <mg@aragost.com>
parents:
16154
diff
changeset
|
124 $ echo change >> large |
1b2b42e866be
largefiles: respect store.createmode and avoid extra file copy
Martin Geisler <mg@aragost.com>
parents:
16154
diff
changeset
|
125 $ hg commit -m change |
1b2b42e866be
largefiles: respect store.createmode and avoid extra file copy
Martin Geisler <mg@aragost.com>
parents:
16154
diff
changeset
|
126 |
1b2b42e866be
largefiles: respect store.createmode and avoid extra file copy
Martin Geisler <mg@aragost.com>
parents:
16154
diff
changeset
|
127 $ rm -r "$USERCACHE" |
1b2b42e866be
largefiles: respect store.createmode and avoid extra file copy
Martin Geisler <mg@aragost.com>
parents:
16154
diff
changeset
|
128 |
1b2b42e866be
largefiles: respect store.createmode and avoid extra file copy
Martin Geisler <mg@aragost.com>
parents:
16154
diff
changeset
|
129 $ hg push -q http://localhost:$HGPORT/ |
1b2b42e866be
largefiles: respect store.createmode and avoid extra file copy
Martin Geisler <mg@aragost.com>
parents:
16154
diff
changeset
|
130 |
1b2b42e866be
largefiles: respect store.createmode and avoid extra file copy
Martin Geisler <mg@aragost.com>
parents:
16154
diff
changeset
|
131 $ ../ls-l.py ../src/.hg/largefiles/b734e14a0971e370408ab9bce8d56d8485e368a9 |
1b2b42e866be
largefiles: respect store.createmode and avoid extra file copy
Martin Geisler <mg@aragost.com>
parents:
16154
diff
changeset
|
132 640 |
16913
f2719b387380
tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents:
16155
diff
changeset
|
133 |
f2719b387380
tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents:
16155
diff
changeset
|
134 $ cd .. |
16986
79902f7e27df
tests: convert some hghave unix-permissions to #if
Mads Kiilerich <mads@kiilerich.com>
parents:
16928
diff
changeset
|
135 |
79902f7e27df
tests: convert some hghave unix-permissions to #if
Mads Kiilerich <mads@kiilerich.com>
parents:
16928
diff
changeset
|
136 #endif |
23618
9dd5dfeaab4c
largefiles: fix a spurious missing file warning with 'remove -A' (issue4053)
Matt Harbison <matt_harbison@yahoo.com>
parents:
21024
diff
changeset
|
137 |
9dd5dfeaab4c
largefiles: fix a spurious missing file warning with 'remove -A' (issue4053)
Matt Harbison <matt_harbison@yahoo.com>
parents:
21024
diff
changeset
|
138 Test issue 4053 (remove --after on a deleted, uncommitted file shouldn't say |
24180
d8e0c591781c
spelling: fixes from proofreading of spell checker issues
Mads Kiilerich <madski@unity3d.com>
parents:
23619
diff
changeset
|
139 it is missing, but a remove on a nonexistent unknown file still should. Same |
23619
70afc58c32d3
largefiles: fix a spurious missing file warning with forget (issue4053)
Matt Harbison <matt_harbison@yahoo.com>
parents:
23618
diff
changeset
|
140 for a forget.) |
23618
9dd5dfeaab4c
largefiles: fix a spurious missing file warning with 'remove -A' (issue4053)
Matt Harbison <matt_harbison@yahoo.com>
parents:
21024
diff
changeset
|
141 |
9dd5dfeaab4c
largefiles: fix a spurious missing file warning with 'remove -A' (issue4053)
Matt Harbison <matt_harbison@yahoo.com>
parents:
21024
diff
changeset
|
142 $ cd src |
9dd5dfeaab4c
largefiles: fix a spurious missing file warning with 'remove -A' (issue4053)
Matt Harbison <matt_harbison@yahoo.com>
parents:
21024
diff
changeset
|
143 $ touch x |
9dd5dfeaab4c
largefiles: fix a spurious missing file warning with 'remove -A' (issue4053)
Matt Harbison <matt_harbison@yahoo.com>
parents:
21024
diff
changeset
|
144 $ hg add x |
9dd5dfeaab4c
largefiles: fix a spurious missing file warning with 'remove -A' (issue4053)
Matt Harbison <matt_harbison@yahoo.com>
parents:
21024
diff
changeset
|
145 $ mv x y |
9dd5dfeaab4c
largefiles: fix a spurious missing file warning with 'remove -A' (issue4053)
Matt Harbison <matt_harbison@yahoo.com>
parents:
21024
diff
changeset
|
146 $ hg remove -A x y ENOENT |
9dd5dfeaab4c
largefiles: fix a spurious missing file warning with 'remove -A' (issue4053)
Matt Harbison <matt_harbison@yahoo.com>
parents:
21024
diff
changeset
|
147 ENOENT: * (glob) |
9dd5dfeaab4c
largefiles: fix a spurious missing file warning with 'remove -A' (issue4053)
Matt Harbison <matt_harbison@yahoo.com>
parents:
21024
diff
changeset
|
148 not removing y: file is untracked |
9dd5dfeaab4c
largefiles: fix a spurious missing file warning with 'remove -A' (issue4053)
Matt Harbison <matt_harbison@yahoo.com>
parents:
21024
diff
changeset
|
149 [1] |
23619
70afc58c32d3
largefiles: fix a spurious missing file warning with forget (issue4053)
Matt Harbison <matt_harbison@yahoo.com>
parents:
23618
diff
changeset
|
150 $ hg add y |
70afc58c32d3
largefiles: fix a spurious missing file warning with forget (issue4053)
Matt Harbison <matt_harbison@yahoo.com>
parents:
23618
diff
changeset
|
151 $ mv y z |
70afc58c32d3
largefiles: fix a spurious missing file warning with forget (issue4053)
Matt Harbison <matt_harbison@yahoo.com>
parents:
23618
diff
changeset
|
152 $ hg forget y z ENOENT |
70afc58c32d3
largefiles: fix a spurious missing file warning with forget (issue4053)
Matt Harbison <matt_harbison@yahoo.com>
parents:
23618
diff
changeset
|
153 ENOENT: * (glob) |
70afc58c32d3
largefiles: fix a spurious missing file warning with forget (issue4053)
Matt Harbison <matt_harbison@yahoo.com>
parents:
23618
diff
changeset
|
154 not removing z: file is already untracked |
70afc58c32d3
largefiles: fix a spurious missing file warning with forget (issue4053)
Matt Harbison <matt_harbison@yahoo.com>
parents:
23618
diff
changeset
|
155 [1] |
24631
2a3f24786d09
largefiles: use the share source as the primary local store (issue4471)
Matt Harbison <matt_harbison@yahoo.com>
parents:
24180
diff
changeset
|
156 |
2a3f24786d09
largefiles: use the share source as the primary local store (issue4471)
Matt Harbison <matt_harbison@yahoo.com>
parents:
24180
diff
changeset
|
157 Largefiles are accessible from the share's store |
2a3f24786d09
largefiles: use the share source as the primary local store (issue4471)
Matt Harbison <matt_harbison@yahoo.com>
parents:
24180
diff
changeset
|
158 $ cd .. |
2a3f24786d09
largefiles: use the share source as the primary local store (issue4471)
Matt Harbison <matt_harbison@yahoo.com>
parents:
24180
diff
changeset
|
159 $ hg share -q src share_dst --config extensions.share= |
2a3f24786d09
largefiles: use the share source as the primary local store (issue4471)
Matt Harbison <matt_harbison@yahoo.com>
parents:
24180
diff
changeset
|
160 $ hg -R share_dst update -r0 |
2a3f24786d09
largefiles: use the share source as the primary local store (issue4471)
Matt Harbison <matt_harbison@yahoo.com>
parents:
24180
diff
changeset
|
161 getting changed largefiles |
2a3f24786d09
largefiles: use the share source as the primary local store (issue4471)
Matt Harbison <matt_harbison@yahoo.com>
parents:
24180
diff
changeset
|
162 1 largefiles updated, 0 removed |
2a3f24786d09
largefiles: use the share source as the primary local store (issue4471)
Matt Harbison <matt_harbison@yahoo.com>
parents:
24180
diff
changeset
|
163 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
2a3f24786d09
largefiles: use the share source as the primary local store (issue4471)
Matt Harbison <matt_harbison@yahoo.com>
parents:
24180
diff
changeset
|
164 |
2a3f24786d09
largefiles: use the share source as the primary local store (issue4471)
Matt Harbison <matt_harbison@yahoo.com>
parents:
24180
diff
changeset
|
165 $ echo modified > share_dst/large |
2a3f24786d09
largefiles: use the share source as the primary local store (issue4471)
Matt Harbison <matt_harbison@yahoo.com>
parents:
24180
diff
changeset
|
166 $ hg -R share_dst ci -m modified |
2a3f24786d09
largefiles: use the share source as the primary local store (issue4471)
Matt Harbison <matt_harbison@yahoo.com>
parents:
24180
diff
changeset
|
167 created new head |
2a3f24786d09
largefiles: use the share source as the primary local store (issue4471)
Matt Harbison <matt_harbison@yahoo.com>
parents:
24180
diff
changeset
|
168 |
2a3f24786d09
largefiles: use the share source as the primary local store (issue4471)
Matt Harbison <matt_harbison@yahoo.com>
parents:
24180
diff
changeset
|
169 Only dirstate is in the local store for the share, and the largefile is in the |
2a3f24786d09
largefiles: use the share source as the primary local store (issue4471)
Matt Harbison <matt_harbison@yahoo.com>
parents:
24180
diff
changeset
|
170 share source's local store. Avoid the extra largefiles added in the unix |
2a3f24786d09
largefiles: use the share source as the primary local store (issue4471)
Matt Harbison <matt_harbison@yahoo.com>
parents:
24180
diff
changeset
|
171 conditional above. |
2a3f24786d09
largefiles: use the share source as the primary local store (issue4471)
Matt Harbison <matt_harbison@yahoo.com>
parents:
24180
diff
changeset
|
172 $ hash=`hg -R share_dst cat share_dst/.hglf/large` |
2a3f24786d09
largefiles: use the share source as the primary local store (issue4471)
Matt Harbison <matt_harbison@yahoo.com>
parents:
24180
diff
changeset
|
173 $ echo $hash |
2a3f24786d09
largefiles: use the share source as the primary local store (issue4471)
Matt Harbison <matt_harbison@yahoo.com>
parents:
24180
diff
changeset
|
174 e2fb5f2139d086ded2cb600d5a91a196e76bf020 |
2a3f24786d09
largefiles: use the share source as the primary local store (issue4471)
Matt Harbison <matt_harbison@yahoo.com>
parents:
24180
diff
changeset
|
175 |
2a3f24786d09
largefiles: use the share source as the primary local store (issue4471)
Matt Harbison <matt_harbison@yahoo.com>
parents:
24180
diff
changeset
|
176 $ find share_dst/.hg/largefiles/* | sort |
2a3f24786d09
largefiles: use the share source as the primary local store (issue4471)
Matt Harbison <matt_harbison@yahoo.com>
parents:
24180
diff
changeset
|
177 share_dst/.hg/largefiles/dirstate |
2a3f24786d09
largefiles: use the share source as the primary local store (issue4471)
Matt Harbison <matt_harbison@yahoo.com>
parents:
24180
diff
changeset
|
178 |
2a3f24786d09
largefiles: use the share source as the primary local store (issue4471)
Matt Harbison <matt_harbison@yahoo.com>
parents:
24180
diff
changeset
|
179 $ find src/.hg/largefiles/* | egrep "(dirstate|$hash)" | sort |
2a3f24786d09
largefiles: use the share source as the primary local store (issue4471)
Matt Harbison <matt_harbison@yahoo.com>
parents:
24180
diff
changeset
|
180 src/.hg/largefiles/dirstate |
2a3f24786d09
largefiles: use the share source as the primary local store (issue4471)
Matt Harbison <matt_harbison@yahoo.com>
parents:
24180
diff
changeset
|
181 src/.hg/largefiles/e2fb5f2139d086ded2cb600d5a91a196e76bf020 |