##// END OF EJS Templates
record: get rid of ui.backupconfig
Jun Wu -
r31458:2017b5a5 default
parent child Browse files
Show More
@@ -68,12 +68,9 def record(ui, repo, *pats, **opts):
68 68 'commit')
69 69
70 70 opts["interactive"] = True
71 backup = ui.backupconfig('experimental', 'crecord')
72 try:
73 ui.setconfig('experimental', 'crecord', False, 'record')
71 overrides = {('experimental', 'crecord'): False}
72 with ui.configoverride(overrides, 'record'):
74 73 return commands.commit(ui, repo, *pats, **opts)
75 finally:
76 ui.restoreconfig(backup)
77 74
78 75 def qrefresh(origfn, ui, repo, *pats, **opts):
79 76 if not opts['interactive']:
@@ -117,13 +114,10 def _qrecord(cmdsuggest, ui, repo, patch
117 114 opts['checkname'] = False
118 115 mq.new(ui, repo, patch, *pats, **opts)
119 116
120 backup = ui.backupconfig('experimental', 'crecord')
121 try:
122 ui.setconfig('experimental', 'crecord', False, 'record')
117 overrides = {('experimental', 'crecord'): False}
118 with ui.configoverride(overrides, 'record'):
123 119 cmdutil.dorecord(ui, repo, committomq, cmdsuggest, False,
124 120 cmdutil.recordfilter, *pats, **opts)
125 finally:
126 ui.restoreconfig(backup)
127 121
128 122 def qnew(origfn, ui, repo, patch, *args, **opts):
129 123 if opts['interactive']:
General Comments 0
You need to be logged in to leave comments. Login now