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