Reputation: 18084
Is there an established method to tell the SCM, mercurial in my case, that files of the pattern foobaz_1_2_3.csv
should all be considered versions of foobaz.csv
?
In my application I rely on data tables from an external source that put the version number in the filename. The importance of tracking changes across their versions was made painfully sharp recently when I spend days troubleshooting a bug on my side of the fence, only to discover it was because they changed some data content and notification of said change did not reach me.
If the filename was constant Hg would have informed me immediately of the internal change and I could have responded appropriately in an hour or two, with very little stress. I could just adopt the habit of renaming foobaz_2_3_4 to foobaz myself before checking in, or running diff old new
and one or both of those is likely what I'll do from now on.
The whole experience has me wondering though if there might be other methods I've not thought of that don't mess with the external file. (for example what of I have a downstream user who doesn't use SCM and relies on the filename+version number, which I've thrown away?)
Upvotes: 0
Views: 179
Reputation: 97282
If you get data in file with permanently changed name and (possibly) changeable data, you can:
hg addremove -s nnn
(Check Manual hg help addremove
) will detect possible rename and include new file in history of oldUpvotes: 1