Show More
@@ -172,6 +172,11 b' def removelargefiles(ui, repo, *pats, **' | |||
|
172 | 172 | finally: |
|
173 | 173 | wlock.release() |
|
174 | 174 | |
|
175 | # For overriding mercurial.hgweb.webcommands so that largefiles will | |
|
176 | # appear at their right place in the manifests. | |
|
177 | def decodepath(orig, path): | |
|
178 | return lfutil.splitstandin(path) or path | |
|
179 | ||
|
175 | 180 | # -- Wrappers: modify existing commands -------------------------------- |
|
176 | 181 | |
|
177 | 182 | # Add works by going through the files that the user wanted to add and |
@@ -11,7 +11,7 b'' | |||
|
11 | 11 | from mercurial import archival, cmdutil, commands, extensions, filemerge, hg, \ |
|
12 | 12 | httprepo, localrepo, merge, sshrepo, sshserver, wireproto |
|
13 | 13 | from mercurial.i18n import _ |
|
14 | from mercurial.hgweb import hgweb_mod, protocol | |
|
14 | from mercurial.hgweb import hgweb_mod, protocol, webcommands | |
|
15 | 15 | |
|
16 | 16 | import overrides |
|
17 | 17 | import proto |
@@ -109,6 +109,8 b' def uisetup(ui):' | |||
|
109 | 109 | hgweb_mod.perms['getlfile'] = 'pull' |
|
110 | 110 | hgweb_mod.perms['statlfile'] = 'pull' |
|
111 | 111 | |
|
112 | extensions.wrapfunction(webcommands, 'decodepath', overrides.decodepath) | |
|
113 | ||
|
112 | 114 | # the hello wireproto command uses wireproto.capabilities, so it won't see |
|
113 | 115 | # our largefiles capability unless we replace the actual function as well. |
|
114 | 116 | proto.capabilitiesorig = wireproto.capabilities |
@@ -127,6 +127,29 b' Test moving largefiles and verify that n' | |||
|
127 | 127 | $ cat sub/large4 |
|
128 | 128 | large22 |
|
129 | 129 | |
|
130 | Test display of largefiles in hgweb | |
|
131 | ||
|
132 | $ hg serve -d -p $HGPORT --pid-file ../hg.pid | |
|
133 | $ cat ../hg.pid >> $DAEMON_PIDS | |
|
134 | $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/file/tip/?style=raw' | |
|
135 | 200 Script output follows | |
|
136 | ||
|
137 | ||
|
138 | drwxr-xr-x sub | |
|
139 | -rw-r--r-- 41 large3 | |
|
140 | -rw-r--r-- 9 normal3 | |
|
141 | ||
|
142 | ||
|
143 | $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/file/tip/sub/?style=raw' | |
|
144 | 200 Script output follows | |
|
145 | ||
|
146 | ||
|
147 | -rw-r--r-- 41 large4 | |
|
148 | -rw-r--r-- 9 normal4 | |
|
149 | ||
|
150 | ||
|
151 | $ "$TESTDIR/killdaemons.py" | |
|
152 | ||
|
130 | 153 | Test archiving the various revisions. These hit corner cases known with |
|
131 | 154 | archiving. |
|
132 | 155 |
General Comments 0
You need to be logged in to leave comments.
Login now