Show More
@@ -183,15 +183,11 b' def parthandler(parttype):' | |||||
183 | return func |
|
183 | return func | |
184 | return _decorator |
|
184 | return _decorator | |
185 |
|
185 | |||
186 |
def processbundle(repo, |
|
186 | def processbundle(repo, unbundler): | |
187 | """This function process a bundle, apply effect to/from a repo |
|
187 | """This function process a bundle, apply effect to/from a repo | |
188 |
|
188 | |||
189 | Currently it: |
|
189 | It iterates over each part then searches for and uses the proper handling | |
190 | - parse a stream into an unbundle20 object |
|
190 | code to process the part. Parts are processed in order. | |
191 | - iterate over each parts then search and use the proper handling code to |
|
|||
192 | process the part. |
|
|||
193 |
|
||||
194 | Parts are processes in order. |
|
|||
195 |
|
191 | |||
196 | This is very early version of this function that will be strongly reworked |
|
192 | This is very early version of this function that will be strongly reworked | |
197 | before final usage. |
|
193 | before final usage. | |
@@ -199,11 +195,6 b' def processbundle(repo, stream):' | |||||
199 | Unknown Mandatory part will abort the process. |
|
195 | Unknown Mandatory part will abort the process. | |
200 | """ |
|
196 | """ | |
201 | ui = repo.ui |
|
197 | ui = repo.ui | |
202 | # Extraction of the unbundler object will most likely change. It may be |
|
|||
203 | # done outside of this function, the unbundler would be passed as argument. |
|
|||
204 | # in all case the unbundler will eventually be created by a |
|
|||
205 | # `changegroup.readbundle` style function. |
|
|||
206 | unbundler = unbundle20(ui, stream) |
|
|||
207 | # todo: |
|
198 | # todo: | |
208 | # - replace this is a init function soon. |
|
199 | # - replace this is a init function soon. | |
209 | # - exception catching |
|
200 | # - exception catching |
@@ -74,7 +74,8 b' Create an extension to test bundle2 API' | |||||
74 | > try: |
|
74 | > try: | |
75 | > lock = repo.lock() |
|
75 | > lock = repo.lock() | |
76 | > try: |
|
76 | > try: | |
77 |
> bundle2. |
|
77 | > unbundler = bundle2.unbundle20(ui, sys.stdin) | |
|
78 | > bundle2.processbundle(repo, unbundler) | |||
78 | > except KeyError, exc: |
|
79 | > except KeyError, exc: | |
79 | > raise util.Abort('missing support for %s' % exc) |
|
80 | > raise util.Abort('missing support for %s' % exc) | |
80 | > finally: |
|
81 | > finally: |
General Comments 0
You need to be logged in to leave comments.
Login now