Show More
@@ -199,4 +199,4 b' def _openstore(repo, remote=None, put=Fa' | |||||
199 | except lfutil.storeprotonotcapable: |
|
199 | except lfutil.storeprotonotcapable: | |
200 | pass |
|
200 | pass | |
201 |
|
201 | |||
202 | raise util.Abort(_('%s does not appear to be a lfile store'), path) |
|
202 | raise util.Abort(_('%s does not appear to be a largefile store'), path) |
@@ -345,8 +345,8 b' def uploadlfiles(ui, rsrc, rdst, files):' | |||||
345 | total=len(files)) |
|
345 | total=len(files)) | |
346 | source = lfutil.findfile(rsrc, hash) |
|
346 | source = lfutil.findfile(rsrc, hash) | |
347 | if not source: |
|
347 | if not source: | |
348 |
raise util.Abort(_(' |
|
348 | raise util.Abort(_('largefile %s missing from store' | |
349 | % hash) |
|
349 | ' (needs to be uploaded)') % hash) | |
350 | # XXX check for errors here |
|
350 | # XXX check for errors here | |
351 | store.put(source, hash) |
|
351 | store.put(source, hash) | |
352 | at += 1 |
|
352 | at += 1 |
@@ -91,7 +91,7 b' def systemcachepath(ui, hash):' | |||||
91 | elif os.name == 'posix': |
|
91 | elif os.name == 'posix': | |
92 | path = os.path.join(os.getenv('HOME'), '.' + longname, hash) |
|
92 | path = os.path.join(os.getenv('HOME'), '.' + longname, hash) | |
93 | else: |
|
93 | else: | |
94 |
raise util.Abort(_(' |
|
94 | raise util.Abort(_('unknown operating system: %s\n') % os.name) | |
95 | return path |
|
95 | return path | |
96 |
|
96 | |||
97 | def insystemcache(ui, hash): |
|
97 | def insystemcache(ui, hash): |
@@ -50,9 +50,10 b' class remotestore(basestore.basestore):' | |||||
50 | def _getfile(self, tmpfile, filename, hash): |
|
50 | def _getfile(self, tmpfile, filename, hash): | |
51 | # quit if the largefile isn't there |
|
51 | # quit if the largefile isn't there | |
52 | stat = self._stat(hash) |
|
52 | stat = self._stat(hash) | |
53 | if stat: |
|
53 | if stat == 1: | |
54 |
raise util.Abort(_('remotestore: largefile %s is |
|
54 | raise util.Abort(_('remotestore: largefile %s is invalid') % hash) | |
55 | (hash, stat == 1 and 'invalid' or 'missing')) |
|
55 | elif stat == 2: | |
|
56 | raise util.Abort(_('remotestore: largefile %s is missing') % hash) | |||
56 |
|
57 | |||
57 | try: |
|
58 | try: | |
58 | length, infile = self._get(hash) |
|
59 | length, infile = self._get(hash) | |
@@ -64,7 +65,7 b' class remotestore(basestore.basestore):' | |||||
64 | # This usually indicates a connection problem, so don't |
|
65 | # This usually indicates a connection problem, so don't | |
65 | # keep trying with the other files... they will probably |
|
66 | # keep trying with the other files... they will probably | |
66 | # all fail too. |
|
67 | # all fail too. | |
67 |
raise util.Abort('%s: %s' % (self.url, |
|
68 | raise util.Abort('%s: %s' % (self.url, e.reason)) | |
68 | except IOError, e: |
|
69 | except IOError, e: | |
69 | raise basestore.StoreError(filename, hash, self.url, str(e)) |
|
70 | raise basestore.StoreError(filename, hash, self.url, str(e)) | |
70 |
|
71 | |||
@@ -101,5 +102,5 b' class remotestore(basestore.basestore):' | |||||
101 | % (cset, filename)) |
|
102 | % (cset, filename)) | |
102 | return True # failed |
|
103 | return True # failed | |
103 | else: |
|
104 | else: | |
104 |
raise |
|
105 | raise RuntimeError('verify failed: unexpected response from ' | |
105 |
'statlfile |
|
106 | 'statlfile (%r)' % stat) |
@@ -287,10 +287,11 b' def reposetup(ui, repo):' | |||||
287 | return orig(text=text, user=user, date=date, match=match, |
|
287 | return orig(text=text, user=user, date=date, match=match, | |
288 | force=force, editor=editor, extra=extra) |
|
288 | force=force, editor=editor, extra=extra) | |
289 |
|
289 | |||
290 |
for f |
|
290 | for f in match.files(): | |
291 |
if lfutil.isstandin(f |
|
291 | if lfutil.isstandin(f): | |
292 | raise util.Abort( |
|
292 | raise util.Abort( | |
293 |
" |
|
293 | _('file "%s" is a largefile standin') % f, | |
|
294 | hint=('commit the largefile itself instead')) | |||
294 |
|
295 | |||
295 | # Case 2: user calls commit with specified patterns: refresh |
|
296 | # Case 2: user calls commit with specified patterns: refresh | |
296 | # any matching big files. |
|
297 | # any matching big files. |
@@ -172,7 +172,8 b' Check that committing standins is not al' | |||||
172 | $ cd .. |
|
172 | $ cd .. | |
173 | $ echo large3 > large3 |
|
173 | $ echo large3 > large3 | |
174 | $ hg commit .hglf/large3 -m "try to commit standin" |
|
174 | $ hg commit .hglf/large3 -m "try to commit standin" | |
175 | abort: Don't commit largefile standin. Commit largefile. |
|
175 | abort: file ".hglf/large3" is a largefile standin | |
|
176 | (commit the largefile itself instead) | |||
176 | [255] |
|
177 | [255] | |
177 |
|
178 | |||
178 | Test some cornercases for adding largefiles. |
|
179 | Test some cornercases for adding largefiles. |
General Comments 0
You need to be logged in to leave comments.
Login now