Show More
@@ -17,12 +17,17 b' def addrev(text, renamed=False):' | |||||
17 | else: |
|
17 | else: | |
18 | meta = {} |
|
18 | meta = {} | |
19 |
|
19 | |||
20 | t = repo.transaction('commit') |
|
20 | lock = t = None | |
21 | try: |
|
21 | try: | |
|
22 | lock = repo.lock() | |||
|
23 | t = repo.transaction('commit') | |||
22 | node = fl.add(text, meta, t, 0, nullid, nullid) |
|
24 | node = fl.add(text, meta, t, 0, nullid, nullid) | |
23 | return node |
|
25 | return node | |
24 | finally: |
|
26 | finally: | |
25 |
|
|
27 | if t: | |
|
28 | t.close() | |||
|
29 | if lock: | |||
|
30 | lock.release() | |||
26 |
|
31 | |||
27 | def error(text): |
|
32 | def error(text): | |
28 | print 'ERROR: ' + text |
|
33 | print 'ERROR: ' + text |
General Comments 0
You need to be logged in to leave comments.
Login now