I need to split a number of files and I’m looking for options to retain the full file history in the split-off files.
Background…
I’ve inherited a project containing lots of Oracle PL/SQL packages with the package spec and the package body all stored in a single “.sql” file. I’d prefer to have the package specification and package body in separate files.
i.e.
Starting with: myfile.sql
I’d like to split this file so that the first bit (package specification) goes in:
myfile.pks
and the last bit (package body) goes in:
myfile.pkb
I’ve no issues doing the separation itself, but I was wondering if anyone had any ideas how I could retain show the file history of myfile.sql both in myfile.pks and myfile.pkb.
Splitting files can be modelled by
hg renameandhg copyto retain the history:The edit the *.pks and *.pkb file to remove the half that doesn’t belong there.
After the edit commit it all.
To see the copies and renames you have to use git format of diffs:
Since this is very useful its often set as default in the
.hgrcfile by adding: