--- a/mercurial/cmdutil.py Mon Mar 16 15:30:33 2015 -0700
+++ b/mercurial/cmdutil.py Mon Mar 16 15:35:50 2015 -0700
@@ -34,10 +34,8 @@
setattr(ui, 'write', wrap)
return oldwrite
-def recordfilter(ui, originalhunks):
- usecurses = ui.configbool('experimental', 'crecord', False)
+def filterchunks(ui, originalhunks, usecurses, testfile):
if usecurses:
- testfile = ui.config('experimental', 'crecordtest', None)
if testfile:
recordfn = crecordmod.testdecorator(testfile,
crecordmod.testchunkselector)
@@ -49,6 +47,12 @@
else:
return patch.filterpatch(ui, originalhunks)
+def recordfilter(ui, originalhunks):
+ usecurses = ui.configbool('experimental', 'crecord', False)
+ testfile = ui.config('experimental', 'crecordtest', None)
+ newchunks = filterchunks(ui, originalhunks, usecurses, testfile)
+ return newchunks
+
def dorecord(ui, repo, commitfunc, cmdsuggest, backupall,
filterfn, *pats, **opts):
import merge as mergemod