comparison tests/test-largefiles-cache.t @ 18731:c2d079387b2c

merge with stable
author Mads Kiilerich <madski@unity3d.com>
date Thu, 28 Feb 2013 14:51:59 +0100
parents d69585a5c5c0 0ac00315875f
children 9d33d6e0d442
comparison
equal deleted inserted replaced
18720:0ade08dcb3c3 18731:c2d079387b2c
14 $ hg init src 14 $ hg init src
15 $ cd src 15 $ cd src
16 $ echo large > large 16 $ echo large > large
17 $ hg add --large large 17 $ hg add --large large
18 $ hg commit -m 'add largefile' 18 $ hg commit -m 'add largefile'
19 $ hg rm large
20 $ hg commit -m 'branchhead without largefile'
21 $ hg up -qr 0
19 $ cd .. 22 $ cd ..
20 23
21 Discard all cached largefiles in USERCACHE 24 Discard all cached largefiles in USERCACHE
22 25
23 $ rm -rf ${USERCACHE} 26 $ rm -rf ${USERCACHE}
33 pulling from ../src 36 pulling from ../src
34 requesting all changes 37 requesting all changes
35 adding changesets 38 adding changesets
36 adding manifests 39 adding manifests
37 adding file changes 40 adding file changes
38 added 1 changesets with 1 changes to 1 files 41 added 2 changesets with 1 changes to 1 files
39 (run 'hg update' to get a working copy) 42 (run 'hg update' to get a working copy)
40 43
41 Update working directory to "tip", which requires largefile("large"), 44 Update working directory to "tip", which requires largefile("large"),
42 but there is no cache file for it. So, hg must treat it as 45 but there is no cache file for it. So, hg must treat it as
43 "missing"(!) file. 46 "missing"(!) file.
44 47
45 $ hg update 48 $ hg update -r0
46 getting changed largefiles 49 getting changed largefiles
47 error getting id 7f7097b041ccf68cc5561e9600da4655d21c6d18 from url file:$TESTTMP/mirror for file large: can't get file locally (glob) 50 error getting id 7f7097b041ccf68cc5561e9600da4655d21c6d18 from url file:$TESTTMP/mirror for file large: can't get file locally (glob)
48 0 largefiles updated, 0 removed 51 0 largefiles updated, 0 removed
49 1 files updated, 0 files merged, 0 files removed, 0 files unresolved 52 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
50 $ hg status 53 $ hg status
57 0 largefiles updated, 0 removed 60 0 largefiles updated, 0 removed
58 0 files updated, 0 files merged, 1 files removed, 0 files unresolved 61 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
59 62
60 Update working directory to tip, again. 63 Update working directory to tip, again.
61 64
62 $ hg update 65 $ hg update -r0
63 getting changed largefiles 66 getting changed largefiles
64 error getting id 7f7097b041ccf68cc5561e9600da4655d21c6d18 from url file:$TESTTMP/mirror for file large: can't get file locally (glob) 67 error getting id 7f7097b041ccf68cc5561e9600da4655d21c6d18 from url file:$TESTTMP/mirror for file large: can't get file locally (glob)
65 0 largefiles updated, 0 removed 68 0 largefiles updated, 0 removed
66 1 files updated, 0 files merged, 0 files removed, 0 files unresolved 69 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
67 $ hg status 70 $ hg status
68 ! large 71 ! large
69 $ cd .. 72 $ cd ..
73
74 Verify that largefiles from pulled branchheads are fetched, also to an empty repo
75
76 $ hg init mirror2
77 $ hg -R mirror2 pull src -r0
78 pulling from src
79 adding changesets
80 adding manifests
81 adding file changes
82 added 1 changesets with 1 changes to 1 files
83 (run 'hg update' to get a working copy)
70 84
71 #if unix-permissions 85 #if unix-permissions
72 86
73 Portable way to print file permissions: 87 Portable way to print file permissions:
74 88
86 $ cd src 100 $ cd src
87 $ chmod 750 .hg/store 101 $ chmod 750 .hg/store
88 $ chmod 660 large 102 $ chmod 660 large
89 $ echo change >> large 103 $ echo change >> large
90 $ hg commit -m change 104 $ hg commit -m change
105 created new head
91 $ ../ls-l.py .hg/largefiles/e151b474069de4ca6898f67ce2f2a7263adf8fea 106 $ ../ls-l.py .hg/largefiles/e151b474069de4ca6898f67ce2f2a7263adf8fea
92 640 107 640
93 108
94 Test permission of with files in .hg/largefiles created by update: 109 Test permission of with files in .hg/largefiles created by update:
95 110