##// END OF EJS Templates
import: get rid of ui.backupconfig
Jun Wu -
r31457:707f9fd2 default
parent child Browse files
Show More
@@ -971,20 +971,18 b' def tryimportone(ui, repo, hunk, parents'
971 editor = None
971 editor = None
972 else:
972 else:
973 editor = getcommiteditor(editform=editform, **opts)
973 editor = getcommiteditor(editform=editform, **opts)
974 allowemptyback = repo.ui.backupconfig('ui', 'allowemptycommit')
975 extra = {}
974 extra = {}
976 for idfunc in extrapreimport:
975 for idfunc in extrapreimport:
977 extrapreimportmap[idfunc](repo, extractdata, extra, opts)
976 extrapreimportmap[idfunc](repo, extractdata, extra, opts)
978 try:
977 overrides = {}
979 if partial:
978 if partial:
980 repo.ui.setconfig('ui', 'allowemptycommit', True)
979 overrides[('ui', 'allowemptycommit')] = True
980 with repo.ui.configoverride(overrides, 'import'):
981 n = repo.commit(message, user,
981 n = repo.commit(message, user,
982 date, match=m,
982 date, match=m,
983 editor=editor, extra=extra)
983 editor=editor, extra=extra)
984 for idfunc in extrapostimport:
984 for idfunc in extrapostimport:
985 extrapostimportmap[idfunc](repo[n])
985 extrapostimportmap[idfunc](repo[n])
986 finally:
987 repo.ui.restoreconfig(allowemptyback)
988 else:
986 else:
989 if opts.get('exact') or importbranch:
987 if opts.get('exact') or importbranch:
990 branch = branch or 'default'
988 branch = branch or 'default'
General Comments 0
You need to be logged in to leave comments. Login now