Show More
@@ -34,7 +34,7 b' from rhodecode.lib.base import bootstrap' | |||
|
34 | 34 | from rhodecode.lib import hooks_base |
|
35 | 35 | from rhodecode.lib.utils2 import AttributeDict |
|
36 | 36 | from rhodecode.lib.ext_json import json |
|
37 | ||
|
37 | from rhodecode.lib import rc_cache | |
|
38 | 38 | |
|
39 | 39 | log = logging.getLogger(__name__) |
|
40 | 40 | |
@@ -45,10 +45,9 b' class HooksHttpHandler(BaseHTTPRequestHa' | |||
|
45 | 45 | method, extras = self._read_request() |
|
46 | 46 | txn_id = getattr(self.server, 'txn_id', None) |
|
47 | 47 | if txn_id: |
|
48 | from rhodecode.lib.caches import compute_key_from_params | |
|
49 | 48 | log.debug('Computing TXN_ID based on `%s`:`%s`', |
|
50 | 49 | extras['repository'], extras['txn_id']) |
|
51 | computed_txn_id = compute_key_from_params( | |
|
50 | computed_txn_id = rc_cache.utils.compute_key_from_params( | |
|
52 | 51 | extras['repository'], extras['txn_id']) |
|
53 | 52 | if txn_id != computed_txn_id: |
|
54 | 53 | raise Exception( |
@@ -86,7 +86,7 b' class SimpleSvnApp(object):' | |||
|
86 | 86 | |
|
87 | 87 | if response.headers.get('SVN-Txn-name'): |
|
88 | 88 | svn_tx_id = response.headers.get('SVN-Txn-name') |
|
89 | txn_id = rc_cache.compute_key_from_params( | |
|
89 | txn_id = rc_cache.utils.compute_key_from_params( | |
|
90 | 90 | self.config['repository'], svn_tx_id) |
|
91 | 91 | port = safe_int(self.rc_extras['hooks_uri'].split(':')[-1]) |
|
92 | 92 | store_txn_id_data(txn_id, {'port': port}) |
@@ -64,7 +64,7 b' log = logging.getLogger(__name__)' | |||
|
64 | 64 | |
|
65 | 65 | def extract_svn_txn_id(acl_repo_name, data): |
|
66 | 66 | """ |
|
67 | Helper method for extraction of svn txn_id from submited XML data during | |
|
67 | Helper method for extraction of svn txn_id from submitted XML data during | |
|
68 | 68 | POST operations |
|
69 | 69 | """ |
|
70 | 70 | try: |
@@ -77,7 +77,7 b' def extract_svn_txn_id(acl_repo_name, da' | |||
|
77 | 77 | match = pat.search(sub_el.text) |
|
78 | 78 | if match: |
|
79 | 79 | svn_tx_id = match.groupdict()['txn_id'] |
|
80 | txn_id = rc_cache.compute_key_from_params( | |
|
80 | txn_id = rc_cache.utils.compute_key_from_params( | |
|
81 | 81 | acl_repo_name, svn_tx_id) |
|
82 | 82 | return txn_id |
|
83 | 83 | except Exception: |
General Comments 0
You need to be logged in to leave comments.
Login now