Show More
@@ -83,7 +83,6 b' Some special comments could have side ef' | |||||
83 | from __future__ import absolute_import, print_function |
|
83 | from __future__ import absolute_import, print_function | |
84 |
|
84 | |||
85 | import collections |
|
85 | import collections | |
86 | import contextlib |
|
|||
87 | import itertools |
|
86 | import itertools | |
88 |
|
87 | |||
89 | from mercurial.i18n import _ |
|
88 | from mercurial.i18n import _ | |
@@ -277,13 +276,6 b' def _walkgraph(edges):' | |||||
277 | if leaf in v: |
|
276 | if leaf in v: | |
278 | v.remove(leaf) |
|
277 | v.remove(leaf) | |
279 |
|
278 | |||
280 | @contextlib.contextmanager |
|
|||
281 | def transaction(repo): |
|
|||
282 | with repo.wlock(): |
|
|||
283 | with repo.lock(): |
|
|||
284 | with repo.transaction('drawdag'): |
|
|||
285 | yield |
|
|||
286 |
|
||||
287 | @command('debugdrawdag', []) |
|
279 | @command('debugdrawdag', []) | |
288 | def debugdrawdag(ui, repo, **opts): |
|
280 | def debugdrawdag(ui, repo, **opts): | |
289 | """read an ASCII graph from stdin and create changesets |
|
281 | """read an ASCII graph from stdin and create changesets | |
@@ -332,7 +324,7 b' def debugdrawdag(ui, repo, **opts):' | |||||
332 | local=True) |
|
324 | local=True) | |
333 |
|
325 | |||
334 | # handle special comments |
|
326 | # handle special comments | |
335 | with transaction(repo): |
|
327 | with repo.wlock(), repo.lock(), repo.transaction('drawdag'): | |
336 | getctx = lambda x: repo.unfiltered()[committed[x.strip()]] |
|
328 | getctx = lambda x: repo.unfiltered()[committed[x.strip()]] | |
337 | for line in text.splitlines(): |
|
329 | for line in text.splitlines(): | |
338 | if ' # ' not in line: |
|
330 | if ' # ' not in line: |
General Comments 0
You need to be logged in to leave comments.
Login now