##// END OF EJS Templates
histedit: move makedesc function near other rules related function...
Pierre-Yves David -
r17643:64e0f0cf default
parent child Browse files
Show More
@@ -282,20 +282,6 b' def message(ui, repo, ctx, ha, opts):'
282 # We didn't make an edit, so just indicate no replaced nodes
282 # We didn't make an edit, so just indicate no replaced nodes
283 return newctx, [new], [], []
283 return newctx, [new], [], []
284
284
285
286 def makedesc(c):
287 """build a initial action line for a ctx `c`
288
289 line are in the form:
290
291 pick <hash> <rev> <summary>
292 """
293 summary = ''
294 if c.description():
295 summary = c.description().splitlines()[0]
296 line = 'pick %s %d %s' % (c.hex()[:12], c.rev(), summary)
297 return line[:80] # trim to 80 chars so it's not stupidly wide in my editor
298
299 actiontable = {'p': pick,
285 actiontable = {'p': pick,
300 'pick': pick,
286 'pick': pick,
301 'e': edit,
287 'e': edit,
@@ -641,6 +627,19 b' def readstate(repo):'
641 return pickle.load(fp)
627 return pickle.load(fp)
642
628
643
629
630 def makedesc(c):
631 """build a initial action line for a ctx `c`
632
633 line are in the form:
634
635 pick <hash> <rev> <summary>
636 """
637 summary = ''
638 if c.description():
639 summary = c.description().splitlines()[0]
640 line = 'pick %s %d %s' % (c.hex()[:12], c.rev(), summary)
641 return line[:80] # trim to 80 chars so it's not stupidly wide in my editor
642
644 def verifyrules(rules, repo, ctxs):
643 def verifyrules(rules, repo, ctxs):
645 """Verify that there exists exactly one edit rule per given changeset.
644 """Verify that there exists exactly one edit rule per given changeset.
646
645
General Comments 0
You need to be logged in to leave comments. Login now