Uniface and git experiences
Author: luis.vila@uniface.es (luis.vila)
Hi all I am testing with git nowadays using a silly Uniface form to export all modified components since last time. It is a nice way to review every modification done by the team and, of course, to have control version. The main problem is UTIMESTAMP and UCOMPSTAMP (I have understood version 10.3 will remove this inconvenient). The experiment, and the reason I am sharing this, consists in using git filters to remove both fields. It's a way to filter files from/to repository to indent, remove, alter or whatever files before entering in. Configuration is quite simple. From repository just get the file as is (through command cat)
git config filter.no_timestamps.smudge "cat"
But when commit, remove all UTIMESTAMP and UCOMPSTAMP tags (It should be "U....STAMP" but I have some troubles with quotation marks)
git config filter.no_timestamps.clean "sed -e 's/<DAT name=.U....STAMP.>....-..-..T..:..:.....<\\/DAT>//'"
And adding this line to .gitattributes will force every XML file to pass through defined filter:
*.xml filter=no_timestamps
As result, every xml file committed to repository skips UTIMESTAMP & UCOMPSTAMP lines. So if you open and compile a component it will not be considered as a modification anymore. They are in your working copy but never reach repository. And when import these altered files, Uniface has no problems at all and considers these fields are empty. Do you have any experience with this? Any improvement? Best regards
) I think it is great that you have found a way to filter out the time stamps. It is a very useful way of working with Uniface and git until the Work Area Support becomes available. (wish I had seen this option when I was experimenting with git, would have saved me a lot of merging) Regards, Theo