rename files with txx extension to hxx
Summary
OTB followed since the beginning the ITK convention and use .txx extension for all template classes. Nevertheless, some development tools do not recognize .txx file extension. Other tool like GitHub can't do in-browser syntax highlighting for txx files I think.
Rationale
The root problem is the use of the txx which should be changed to hxx (or hpp).
In 2011, after an in-depth discussion near April 20, 2011 on the Insight-Developers mailing list, ITK rename all txx files to hxx (and event prevent the push of .txx files with a pre-commit hook). It happens is major release v4.
You can find some arguments in the discussion about the change and also in other projects related to ITK which applied the same modification, see for instance VXL:
https://github.com/vxl/vxl/issues/209
This commit apply now the same modification for OTB.
I understand that it will change some habit for developers and don't bring new features but I think that in general it is better to stay align with ITK guidelines.
In my opinion, it always facilitate the use of OTB and ITK together if we share when we can the same code architecture, directory organization, naming conventions...
Implementation Details
bash script which apply the modification is attached.txx_to_hxx.sh
Additional notes
Copyright
The copyright owner is CNES and has signed the ORFEO ToolBox Contributor License Agreement.
Check before merging:
-
All discussions are resolved
-
At least 2
votes from core developers, no vote. -
The feature branch is (reasonably) up-to-date with the base branch
-
Dashboard is green
-
Copyright owner has signed the ORFEO ToolBox Contributor License Agreement
Merge request reports
Activity
Third attempt (I've attached the bash script)
I've separated the MR in 2 separate commits (one which rename the other one which change txx to hxx in sources).
I think that the history is preserved anyway as you can do git log --follow on hxx files and you'll have all the history (including commits related to the txx file). Indeed git/gitlab did not show the renaming of the file in the diff by default. As @poughov (git guru) suggests you can tell git to detect the renaming when you look at the diff by setting the "rename detection threshold":
One more hidden option of our favorite version control system.
Note also that I've removed the bash script from the commit comment in this MR. I suspect that it was the reason for the strange git mv command that @lnicola pointed in the seconf MR.
added 4 commits
-
7fe54ded...01f22368 - 3 commits from branch
develop
- 11d9f46f - Merge branch 'develop' into txx_to_hxx
-
7fe54ded...01f22368 - 3 commits from branch
mentioned in commit b3e93bf9