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 |
|
|
977 | overrides = {} | |
979 |
|
|
978 | if partial: | |
980 |
|
|
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