Show More
@@ -296,12 +296,31 b' class bundleoperation(object):' | |||||
296 | self.repo = repo |
|
296 | self.repo = repo | |
297 | self.ui = repo.ui |
|
297 | self.ui = repo.ui | |
298 | self.records = unbundlerecords() |
|
298 | self.records = unbundlerecords() | |
299 | self.gettransaction = transactiongetter |
|
|||
300 | self.reply = None |
|
299 | self.reply = None | |
301 | self.captureoutput = captureoutput |
|
300 | self.captureoutput = captureoutput | |
302 | self.hookargs = {} |
|
301 | self.hookargs = {} | |
|
302 | self._gettransaction = transactiongetter | |||
|
303 | ||||
|
304 | def gettransaction(self): | |||
|
305 | transaction = self._gettransaction() | |||
|
306 | ||||
|
307 | if self.hookargs is not None: | |||
|
308 | # the ones added to the transaction supercede those added | |||
|
309 | # to the operation. | |||
|
310 | self.hookargs.update(transaction.hookargs) | |||
|
311 | transaction.hookargs = self.hookargs | |||
|
312 | ||||
|
313 | # mark the hookargs as flushed. further attempts to add to | |||
|
314 | # hookargs will result in an abort. | |||
|
315 | self.hookargs = None | |||
|
316 | ||||
|
317 | return transaction | |||
303 |
|
318 | |||
304 | def addhookargs(self, hookargs): |
|
319 | def addhookargs(self, hookargs): | |
|
320 | if self.hookargs is None: | |||
|
321 | raise error.Abort( | |||
|
322 | _('attempted to add hooks to operation after transaction ' | |||
|
323 | 'started')) | |||
305 | self.hookargs.update(hookargs) |
|
324 | self.hookargs.update(hookargs) | |
306 |
|
325 | |||
307 | class TransactionUnavailable(RuntimeError): |
|
326 | class TransactionUnavailable(RuntimeError): |
@@ -120,7 +120,7 b' Extension disabled for lack of a hook' | |||||
120 | bundle2-output-bundle: "HG20", 2 parts total |
|
120 | bundle2-output-bundle: "HG20", 2 parts total | |
121 | bundle2-output-part: "reply:changegroup" (advisory) (params: 0 advisory) empty payload |
|
121 | bundle2-output-part: "reply:changegroup" (advisory) (params: 0 advisory) empty payload | |
122 | bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload |
|
122 | bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload | |
123 |
bundle2-input-bundle: |
|
123 | bundle2-input-bundle: with-transaction | |
124 | bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported |
|
124 | bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported | |
125 | bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported |
|
125 | bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported | |
126 | bundle2-input-bundle: 1 parts total |
|
126 | bundle2-input-bundle: 1 parts total | |
@@ -184,7 +184,7 b' Extension disabled for lack of acl.sourc' | |||||
184 | bundle2-output-bundle: "HG20", 2 parts total |
|
184 | bundle2-output-bundle: "HG20", 2 parts total | |
185 | bundle2-output-part: "reply:changegroup" (advisory) (params: 0 advisory) empty payload |
|
185 | bundle2-output-part: "reply:changegroup" (advisory) (params: 0 advisory) empty payload | |
186 | bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload |
|
186 | bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload | |
187 |
bundle2-input-bundle: |
|
187 | bundle2-input-bundle: with-transaction | |
188 | bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported |
|
188 | bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported | |
189 | bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported |
|
189 | bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported | |
190 | bundle2-input-bundle: 1 parts total |
|
190 | bundle2-input-bundle: 1 parts total | |
@@ -259,7 +259,7 b' No [acl.allow]/[acl.deny]' | |||||
259 | bundle2-output-bundle: "HG20", 2 parts total |
|
259 | bundle2-output-bundle: "HG20", 2 parts total | |
260 | bundle2-output-part: "reply:changegroup" (advisory) (params: 0 advisory) empty payload |
|
260 | bundle2-output-part: "reply:changegroup" (advisory) (params: 0 advisory) empty payload | |
261 | bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload |
|
261 | bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload | |
262 |
bundle2-input-bundle: |
|
262 | bundle2-input-bundle: with-transaction | |
263 | bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported |
|
263 | bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported | |
264 | bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported |
|
264 | bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported | |
265 | bundle2-input-bundle: 1 parts total |
|
265 | bundle2-input-bundle: 1 parts total | |
@@ -742,7 +742,7 b' barney is allowed everywhere' | |||||
742 | bundle2-output-bundle: "HG20", 2 parts total |
|
742 | bundle2-output-bundle: "HG20", 2 parts total | |
743 | bundle2-output-part: "reply:changegroup" (advisory) (params: 0 advisory) empty payload |
|
743 | bundle2-output-part: "reply:changegroup" (advisory) (params: 0 advisory) empty payload | |
744 | bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload |
|
744 | bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload | |
745 |
bundle2-input-bundle: |
|
745 | bundle2-input-bundle: with-transaction | |
746 | bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported |
|
746 | bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported | |
747 | bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported |
|
747 | bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported | |
748 | bundle2-input-bundle: 1 parts total |
|
748 | bundle2-input-bundle: 1 parts total | |
@@ -1056,7 +1056,7 b' acl.config can set only [acl.allow]/[acl' | |||||
1056 | bundle2-output-bundle: "HG20", 2 parts total |
|
1056 | bundle2-output-bundle: "HG20", 2 parts total | |
1057 | bundle2-output-part: "reply:changegroup" (advisory) (params: 0 advisory) empty payload |
|
1057 | bundle2-output-part: "reply:changegroup" (advisory) (params: 0 advisory) empty payload | |
1058 | bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload |
|
1058 | bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload | |
1059 |
bundle2-input-bundle: |
|
1059 | bundle2-input-bundle: with-transaction | |
1060 | bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported |
|
1060 | bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported | |
1061 | bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported |
|
1061 | bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported | |
1062 | bundle2-input-bundle: 1 parts total |
|
1062 | bundle2-input-bundle: 1 parts total | |
@@ -1141,7 +1141,7 b' fred is always allowed' | |||||
1141 | bundle2-output-bundle: "HG20", 2 parts total |
|
1141 | bundle2-output-bundle: "HG20", 2 parts total | |
1142 | bundle2-output-part: "reply:changegroup" (advisory) (params: 0 advisory) empty payload |
|
1142 | bundle2-output-part: "reply:changegroup" (advisory) (params: 0 advisory) empty payload | |
1143 | bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload |
|
1143 | bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload | |
1144 |
bundle2-input-bundle: |
|
1144 | bundle2-input-bundle: with-transaction | |
1145 | bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported |
|
1145 | bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported | |
1146 | bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported |
|
1146 | bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported | |
1147 | bundle2-input-bundle: 1 parts total |
|
1147 | bundle2-input-bundle: 1 parts total | |
@@ -1298,7 +1298,7 b' OS-level groups' | |||||
1298 | bundle2-output-bundle: "HG20", 2 parts total |
|
1298 | bundle2-output-bundle: "HG20", 2 parts total | |
1299 | bundle2-output-part: "reply:changegroup" (advisory) (params: 0 advisory) empty payload |
|
1299 | bundle2-output-part: "reply:changegroup" (advisory) (params: 0 advisory) empty payload | |
1300 | bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload |
|
1300 | bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload | |
1301 |
bundle2-input-bundle: |
|
1301 | bundle2-input-bundle: with-transaction | |
1302 | bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported |
|
1302 | bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported | |
1303 | bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported |
|
1303 | bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported | |
1304 | bundle2-input-bundle: 1 parts total |
|
1304 | bundle2-input-bundle: 1 parts total | |
@@ -1502,7 +1502,7 b' No branch acls specified' | |||||
1502 | bundle2-output-part: "reply:changegroup" (advisory) (params: 0 advisory) empty payload |
|
1502 | bundle2-output-part: "reply:changegroup" (advisory) (params: 0 advisory) empty payload | |
1503 | bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload |
|
1503 | bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload | |
1504 | bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload |
|
1504 | bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload | |
1505 |
bundle2-input-bundle: |
|
1505 | bundle2-input-bundle: with-transaction | |
1506 | bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported |
|
1506 | bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported | |
1507 | bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported |
|
1507 | bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported | |
1508 | bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported |
|
1508 | bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported | |
@@ -1798,7 +1798,7 b' Branch acl allow other' | |||||
1798 | bundle2-output-part: "reply:changegroup" (advisory) (params: 0 advisory) empty payload |
|
1798 | bundle2-output-part: "reply:changegroup" (advisory) (params: 0 advisory) empty payload | |
1799 | bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload |
|
1799 | bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload | |
1800 | bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload |
|
1800 | bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload | |
1801 |
bundle2-input-bundle: |
|
1801 | bundle2-input-bundle: with-transaction | |
1802 | bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported |
|
1802 | bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported | |
1803 | bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported |
|
1803 | bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported | |
1804 | bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported |
|
1804 | bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported | |
@@ -1891,7 +1891,7 b' push foobar into the remote' | |||||
1891 | bundle2-output-part: "reply:changegroup" (advisory) (params: 0 advisory) empty payload |
|
1891 | bundle2-output-part: "reply:changegroup" (advisory) (params: 0 advisory) empty payload | |
1892 | bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload |
|
1892 | bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload | |
1893 | bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload |
|
1893 | bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload | |
1894 |
bundle2-input-bundle: |
|
1894 | bundle2-input-bundle: with-transaction | |
1895 | bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported |
|
1895 | bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported | |
1896 | bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported |
|
1896 | bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported | |
1897 | bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported |
|
1897 | bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported | |
@@ -2052,7 +2052,7 b" User 'astro' must not be denied" | |||||
2052 | bundle2-output-part: "reply:changegroup" (advisory) (params: 0 advisory) empty payload |
|
2052 | bundle2-output-part: "reply:changegroup" (advisory) (params: 0 advisory) empty payload | |
2053 | bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload |
|
2053 | bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload | |
2054 | bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload |
|
2054 | bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload | |
2055 |
bundle2-input-bundle: |
|
2055 | bundle2-input-bundle: with-transaction | |
2056 | bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported |
|
2056 | bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported | |
2057 | bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported |
|
2057 | bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported | |
2058 | bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported |
|
2058 | bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported |
General Comments 0
You need to be logged in to leave comments.
Login now