Show More
@@ -14,6 +14,19 b' propertycache = util.propertycache' | |||||
14 |
|
14 | |||
15 | nullstate = ('', '', 'empty') |
|
15 | nullstate = ('', '', 'empty') | |
16 |
|
16 | |||
|
17 | ||||
|
18 | def _getstorehashcachename(remotepath): | |||
|
19 | '''get a unique filename for the store hash cache of a remote repository''' | |||
|
20 | return util.sha1(remotepath).hexdigest()[0:12] | |||
|
21 | ||||
|
22 | def _calcfilehash(filename): | |||
|
23 | data = '' | |||
|
24 | if os.path.exists(filename): | |||
|
25 | fd = open(filename) | |||
|
26 | data = fd.read() | |||
|
27 | fd.close() | |||
|
28 | return util.sha1(data).hexdigest() | |||
|
29 | ||||
17 | class SubrepoAbort(error.Abort): |
|
30 | class SubrepoAbort(error.Abort): | |
18 | """Exception class used to avoid handling a subrepo error more than once""" |
|
31 | """Exception class used to avoid handling a subrepo error more than once""" | |
19 | def __init__(self, *args, **kw): |
|
32 | def __init__(self, *args, **kw): |
General Comments 0
You need to be logged in to leave comments.
Login now