##// 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 'commit')
68 'commit')
69
69
70 opts["interactive"] = True
70 opts["interactive"] = True
71 backup = ui.backupconfig('experimental', 'crecord')
71 overrides = {('experimental', 'crecord'): False}
72 try:
72 with ui.configoverride(overrides, 'record'):
73 ui.setconfig('experimental', 'crecord', False, 'record')
74 return commands.commit(ui, repo, *pats, **opts)
73 return commands.commit(ui, repo, *pats, **opts)
75 finally:
76 ui.restoreconfig(backup)
77
74
78 def qrefresh(origfn, ui, repo, *pats, **opts):
75 def qrefresh(origfn, ui, repo, *pats, **opts):
79 if not opts['interactive']:
76 if not opts['interactive']:
@@ -117,13 +114,10 def _qrecord(cmdsuggest, ui, repo, patch
117 opts['checkname'] = False
114 opts['checkname'] = False
118 mq.new(ui, repo, patch, *pats, **opts)
115 mq.new(ui, repo, patch, *pats, **opts)
119
116
120 backup = ui.backupconfig('experimental', 'crecord')
117 overrides = {('experimental', 'crecord'): False}
121 try:
118 with ui.configoverride(overrides, 'record'):
122 ui.setconfig('experimental', 'crecord', False, 'record')
123 cmdutil.dorecord(ui, repo, committomq, cmdsuggest, False,
119 cmdutil.dorecord(ui, repo, committomq, cmdsuggest, False,
124 cmdutil.recordfilter, *pats, **opts)
120 cmdutil.recordfilter, *pats, **opts)
125 finally:
126 ui.restoreconfig(backup)
127
121
128 def qnew(origfn, ui, repo, patch, *args, **opts):
122 def qnew(origfn, ui, repo, patch, *args, **opts):
129 if opts['interactive']:
123 if opts['interactive']:
General Comments 0
You need to be logged in to leave comments. Login now