##// END OF EJS Templates
graft: extract creation of progress report line in a function...
marmoute -
r53400:cef86c1d default
parent child Browse files
Show More
@@ -219,6 +219,18 def _process_args(
219 219 return "GRAFT", graftstate, (statedata, revs, editor, cont, dry_run, tool)
220 220
221 221
222 def _build_progress(ui, repo, ctx):
223 rev_sum = b'%d:%s "%s"' % (
224 ctx.rev(),
225 ctx,
226 ctx.description().split(b'\n', 1)[0],
227 )
228 names = repo.nodetags(ctx.node()) + repo.nodebookmarks(ctx.node())
229 if names:
230 rev_sum += b' (%s)' % b' '.join(names)
231 return _(b'grafting %s\n') % rev_sum
232
233
222 234 def _graft_revisions(
223 235 ui,
224 236 repo,
@@ -232,15 +244,7 def _graft_revisions(
232 244 ):
233 245 """actually graft some revisions"""
234 246 for pos, ctx in enumerate(repo.set(b"%ld", revs)):
235 desc = b'%d:%s "%s"' % (
236 ctx.rev(),
237 ctx,
238 ctx.description().split(b'\n', 1)[0],
239 )
240 names = repo.nodetags(ctx.node()) + repo.nodebookmarks(ctx.node())
241 if names:
242 desc += b' (%s)' % b' '.join(names)
243 ui.status(_(b'grafting %s\n') % desc)
247 ui.status(_build_progress(ui, repo, ctx))
244 248 if dry_run:
245 249 continue
246 250
General Comments 0
You need to be logged in to leave comments. Login now