--- a/mercurial/cmdutil.py Fri Mar 13 10:51:25 2015 -0700
+++ b/mercurial/cmdutil.py Thu Mar 12 14:24:48 2015 -0700
@@ -16,12 +16,25 @@
import encoding
import crecord as crecordmod
import lock as lockmod
+import crecord as crecordmod
def parsealiases(cmd):
return cmd.lstrip("^").split("|")
def recordfilter(ui, originalhunks):
- return patch.filterpatch(ui, originalhunks)
+ usecurses = ui.configbool('experimental', 'crecord', False)
+ if usecurses:
+ testfile = ui.config('experimental', 'crecordtest', None)
+ if testfile:
+ recordfn = crecordmod.testdecorator(testfile,
+ crecordmod.testchunkselector)
+ else:
+ recordfn = crecordmod.chunkselector
+
+ return crecordmod.filterpatch(ui, originalhunks, recordfn)
+
+ else:
+ return patch.filterpatch(ui, originalhunks)
def dorecord(ui, repo, commitfunc, cmdsuggest, backupall,
filterfn, *pats, **opts):