Show More
@@ -72,11 +72,13 b' Create an extension to test bundle2 API' | |||||
72 | > def cmdunbundle2(ui, repo): |
|
72 | > def cmdunbundle2(ui, repo): | |
73 | > """process a bundle2 stream from stdin on the current repo""" |
|
73 | > """process a bundle2 stream from stdin on the current repo""" | |
74 | > try: |
|
74 | > try: | |
|
75 | > lock = repo.lock() | |||
75 | > try: |
|
76 | > try: | |
76 | > bundle2.processbundle(repo, sys.stdin) |
|
77 | > bundle2.processbundle(repo, sys.stdin) | |
77 | > except KeyError, exc: |
|
78 | > except KeyError, exc: | |
78 | > raise util.Abort('missing support for %s' % exc) |
|
79 | > raise util.Abort('missing support for %s' % exc) | |
79 | > finally: |
|
80 | > finally: | |
|
81 | > lock.release() | |||
80 | > remains = sys.stdin.read() |
|
82 | > remains = sys.stdin.read() | |
81 | > ui.write('%i unread bytes\n' % len(remains)) |
|
83 | > ui.write('%i unread bytes\n' % len(remains)) | |
82 | > |
|
84 | > |
General Comments 0
You need to be logged in to leave comments.
Login now