record and crecord: proposal to merge into core

Laurent Charignon lcharignon at fb.com
Mon Mar 9 17:21:41 UTC 2015


Hello,

My name is Laurent Charignon and this is my first email to this list; I go by lcharignon on the IRC channel.
I have been working on moving record and crecord to core.
I wanted to have your feedback on the way to proceed.

Why moving record and crecord to core?
     - Add interactive selection of hunks to core commands without monkeypatching
     - Reduce code duplication
     - Provide both curses and non curses UI because not every user has curses

How?
     Step 1 Moving record to core:
          - Moving the header class from record to patch.py<http://patch.py/> (1 patch)
          - Moving the hunk class from record to patch.py<http://patch.py/> (1 patch)
          - Moving the scanpatch function from record to patch.py<http://patch.py/> (1 patch)
          - Moving the parsepatch function from record patch.py<http://patch.py/> (1 patch)
          - Moving the filterpatch function from record to patch.py (1 patch)
          - Moving the dorecord function from record to cmdutil (1 patch)
          - Moving record's mq functions to mq related code in core (1 patch)
          - Consolidate the two hunks classes in patch.py (the one that exists today and the one from record) into one (1 patch)
          - Add -i to commit to commit interactively, this will also give us amend -i (1 patch)

     Step 2 Moving crecord in core:
          - Reuse code moved from record to core in crecord (about 5 to 10 patches)
          - Move the crecord specific code (essentially UI code) to a new module in core (1 patch)
          - Add an option to select record or crecord while running interactive modifications (1 patch)

     Step 3 Add interactive selection to other existing command
          - Any suggestion here?

Does that sound reasonable?
What would you do differently?

Thanks!

Laurent Charignon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20150309/f0b02633/attachment.html>


More information about the Mercurial-devel mailing list