275 |
275 |
276 Raise an exception to highlight the fact that no transaction was expected |
276 Raise an exception to highlight the fact that no transaction was expected |
277 to be created""" |
277 to be created""" |
278 raise TransactionUnavailable() |
278 raise TransactionUnavailable() |
279 |
279 |
280 def processbundle(repo, unbundler, transactiongetter=_notransaction): |
280 def processbundle(repo, unbundler, transactiongetter=None): |
281 """This function process a bundle, apply effect to/from a repo |
281 """This function process a bundle, apply effect to/from a repo |
282 |
282 |
283 It iterates over each part then searches for and uses the proper handling |
283 It iterates over each part then searches for and uses the proper handling |
284 code to process the part. Parts are processed in order. |
284 code to process the part. Parts are processed in order. |
285 |
285 |
286 This is very early version of this function that will be strongly reworked |
286 This is very early version of this function that will be strongly reworked |
287 before final usage. |
287 before final usage. |
288 |
288 |
289 Unknown Mandatory part will abort the process. |
289 Unknown Mandatory part will abort the process. |
290 """ |
290 """ |
|
291 if transactiongetter is None: |
|
292 transactiongetter = _notransaction |
291 op = bundleoperation(repo, transactiongetter) |
293 op = bundleoperation(repo, transactiongetter) |
292 # todo: |
294 # todo: |
293 # - replace this is a init function soon. |
295 # - replace this is a init function soon. |
294 # - exception catching |
296 # - exception catching |
295 unbundler.params |
297 unbundler.params |