ODM2 / ODM2PythonAPI

A set of Python functions that provides data read/write access to an ODM2 database by leveraging SQLAlchemy.
http://odm2.github.io/ODM2PythonAPI/
BSD 3-Clause "New" or "Revised" License
4 stars 13 forks source link

Fix git histories for module-hierarchy reorganized files #159

Closed emiliom closed 5 years ago

emiliom commented 5 years ago

It looks like the module files that were moved as part of the removal of the ODM2 module hierarchy lost their git history. Instead, the git history is attached to the files that will eventually be removed, in the old module hierarchy. eg: https://github.com/ODM2/ODM2PythonAPI/blob/master/odm2api/models.py vs https://github.com/ODM2/ODM2PythonAPI/blob/master/odm2api/ODM2/models.py

The module-hierarchy reorg (completed in release 0.7.1) was tracked in issue #146, that I left open for future reference once we're ready to remove the backwards-compatibility old hierarchy.

This specific issue (preserving git history in the files at the new hierarchy) was discussed in https://github.com/ODM2/ODM2PythonAPI/pull/145#issuecomment-365402349. See the specific steps/approach I had proposed there. We'll need to test that these steps get the job done.

emiliom commented 5 years ago

It's looking like this might be a non-issue, ultimately. The challenge apparently is in whether a git log viewing tool (like gitkraken, or github) can detect the link between the old file path and the new file path, specially with git log --follow or its analog. Based on a small test where I took the master branch as of today (4/27/2019), created a new branch from it, then did git rm odm2api/ODM2/models.py, the moved models.py (at odm2api/models.py) does have the complete history available if the viewer tool is smart enough (as is gitkraken) or using git log --follow <file-at-new-path>. I also did another test with ODM2/services/readService.py, and that was "successful" too.