##// END OF EJS Templates
drawdag: inline transaction() function...
Martin von Zweigbergk -
r33169:0830c841 default
parent child Browse files
Show More
@@ -83,7 +83,6 b' Some special comments could have side ef'
83 83 from __future__ import absolute_import, print_function
84 84
85 85 import collections
86 import contextlib
87 86 import itertools
88 87
89 88 from mercurial.i18n import _
@@ -277,13 +276,6 b' def _walkgraph(edges):'
277 276 if leaf in v:
278 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 279 @command('debugdrawdag', [])
288 280 def debugdrawdag(ui, repo, **opts):
289 281 """read an ASCII graph from stdin and create changesets
@@ -332,7 +324,7 b' def debugdrawdag(ui, repo, **opts):'
332 324 local=True)
333 325
334 326 # handle special comments
335 with transaction(repo):
327 with repo.wlock(), repo.lock(), repo.transaction('drawdag'):
336 328 getctx = lambda x: repo.unfiltered()[committed[x.strip()]]
337 329 for line in text.splitlines():
338 330 if ' # ' not in line:
General Comments 0
You need to be logged in to leave comments. Login now