We use a list of fixers from past.translation. This is just a
list of strings pointing to fixers to import. Currently this is
```
['libfuturize.fixes.fix_absolute_import',
'libfuturize.fixes.fix_print_with_import',
'libfuturize.fixes.fix_raise',
'libfuturize.fixes.fix_next_call',
'lib2to3.fixes.fix_reduce',
'lib2to3.fixes.fix_sys_exc',
'lib2to3.fixes.fix_throw',
'lib2to3.fixes.fix_tuple_params',
'lib2to3.fixes.fix_exec',
'lib2to3.fixes.fix_standarderror',
'lib2to3.fixes.fix_apply',
'lib2to3.fixes.fix_paren',
'lib2to3.fixes.fix_types',
'lib2to3.fixes.fix_methodattrs',
'lib2to3.fixes.fix_renames',
'lib2to3.fixes.fix_ws_comma',
'lib2to3.fixes.fix_repr',
'lib2to3.fixes.fix_intern',
'lib2to3.fixes.fix_numliterals',
'lib2to3.fixes.fix_funcattrs',
'lib2to3.fixes.fix_ne',
'lib2to3.fixes.fix_exitfunc',
'lib2to3.fixes.fix_has_key',
'lib2to3.fixes.fix_isinstance',
'lib2to3.fixes.fix_idioms',
'lib2to3.fixes.fix_xreadlines',
'lib2to3.fixes.fix_except',
'libfuturize.fixes.fix_execfile',
'libfuturize.fixes.fix_future_standard_library',
'libfuturize.fixes.fix_metaclass',
'libfuturize.fixes.fix_future_builtins',
'libpasteurize.fixes.fix_newstyle',
'libfuturize.fixes.fix_basestring',
'libfuturize.fixes.fix_future_standard_library_urllib',
'libfuturize.fixes.fix_xrange_with_import',
'libfuturize.fixes.fix_cmp',
'libfuturize.fixes.fix_unicode_keep_u',
'libfuturize.fixes.fix_division_safe',
'libfuturize.fixes.fix_object',
'lib2to3.fixes.fix_input',
'lib2to3.fixes.fix_operator',
'lib2to3.fixes.fix_zip',
'lib2to3.fixes.fix_dict',
'lib2to3.fixes.fix_next',
'lib2to3.fixes.fix_filter',
'lib2to3.fixes.fix_raw_input',
'lib2to3.fixes.fix_getcwdu',
'lib2to3.fixes.fix_itertools_imports',
'lib2to3.fixes.fix_nonzero',
'lib2to3.fixes.fix_itertools',
'lib2to3.fixes.fix_long',
'lib2to3.fixes.fix_map']
```
And then we drop pasterurize, which we don't need for our purposes.
Now if we could figure out the exact position in the template source
where a NotFound error is raised we could replace `$variable`
with `variable` and add `#variable = $variable` just before the failing
statement.
Previously it would copy the collection but not the elements, so if the original HDAs were deleted or purged they'd be deleted in the new history as well. This was not the behavior of the "Copy Datasets" page for instance that would do a deep copy.
There are downsides of doing it this way but this is probably the most intuitive behavior for the GUI for now. Fixes#7493.