diff hgext/fetch.py @ 5827:0c29977bd7db

record: refactor record into generic record driver rationale --------- I'd like to make MQ version of record -- qrecord. >From the first glance it seemed to be easy -- the task in essence would be to change call to cmdutil.commit() to something like mq.qrefresh(). As it turned out queue.refresh() and cmdutil.commit() have different semantics -- cmdutil.commit() first scans for changes and then delegate the actual commit to lowlevel func. On the other hand queue.refresh() do it all in once, and I am a bit scary to change it. Maybe the right way would be to first refactor queue.refresh() to use cmdutil.commit() machinery, and then trivially adjust record, but I feel I'm not competent for the task right now. Instead, I propose we refactor record to be some sort of high-level driver, or like a high-level decorator one can say, which will first interactively filter changes, and then delegate commit job to high-level commiter, e.g. 'commit' or 'qrefresh' So, this patch does just that -- refactor record to be generic driver, and update 'hg record' code to use the driver. 'hg qrecord' will follow.
author Kirill Smelkov <kirr@mns.spb.ru>
date Thu, 10 Jan 2008 12:07:13 +0300
parents 86f5d8f608b7
children 989467e8e3a9
line wrap: on
line diff