Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Anyone familiar with Git?
Message
From
10/03/2016 17:23:47
Mike Yearwood
Toronto, Ontario, Canada
 
 
To
07/03/2016 12:06:46
Lutz Scheffler (Online)
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
General information
Forum:
Visual FoxPro
Category:
Git
Miscellaneous
Thread ID:
01632456
Message ID:
01632816
Views:
68
>I hope I see what you mean. You refering to generation of text for changed classes only?
>
>So you use the timestamp to see what is changed at a given moment.
>
>My code just look what is changed (by simply storing the old timestamp outside the vcx). My problem is that the change must not be from a nearby date. I just have to figure out any change. Stupid me might just commit a change from january 2014. So I just test for not identical timestamp for a given classlib/class

Yes. I've got to find a way to generate text for changed classes only.

>
>>Hi Lutz
>>
>>I've been looking for a way to handle a really large vcx I inherited. What I'm wishing to find is a method to determine which classes changed across all vcxs, generate the text for each of these classes - and not the entire set of classes in the vcx - basically pretending that only the classes are changing, and disregarding the vcx itself.
>>
>>To that end,
>>
>>I modified Calvin Hsia's decodetimestamp procedure (so it does not have to be stored in a library) below and use a SQL to find the classes like so
>>
>>
SELECT ;
>>LEFT(objname,80) as classname,;
>>decodetimestamp(timestamp) as tUpdated ;
>>FROM monsterlibrary.vcx ;
>>WHERE ;
>>!EMPTY(monsterlibrary.timestamp) AND ;
>>YEAR(decodetimestamp(monsterlibrary.timestamp))=2016 ;
>>ORDER BY 1 ;
>>INTO CURSOR NEWclasses
>>
>>
>>*PROCEDURE DecodeTimeStamp(nTimestamp as Number) as Datetime && see http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/filetimetodosdatetime.asp
>>LPARAMETERS nTimeStamp
>>IF m.nTimeStamp = 0
>> RETURN {/:}
>>ENDIF
>>
>>nDate=BITRSHIFT(m.nTimestamp,16)
>>nTime=BITAND(m.nTimestamp,2^16-1)
>>
>>nYear=BITAND(BITRSHIFT(m.nDate,9),2^8-1)+1980
>>nMonth=BITAND(BITRSHIFT(m.nDate,5),2^4-1)
>>nDay=BITAND(m.nDate,2^5-1)
>>
>>nHr=BITAND(BITRSHIFT(m.nTime,11),2^5-1)
>>nMin=BITAND(BITRSHIFT(m.nTime,5),2^6-1)
>>nSec=BITAND(m.nTime,2^5-1)
>>
>>RETURN DATETIME(m.nYear,m.nMonth,m.nDay,m.nHr,m.nMin,m.nSec)
>>
>>
>>>Alejandro,
>>>
>>>let me be a bit selfish. http://vfpx.codeplex.com/releases/view/614943 offers a tool that will include in VFP IDE. It let's you regenerate, as Fernando names it, the binaries with FoxBin2Prg from VFP IDE.
>>>
>>>It's assigned to
>>>-quickly create text versions and commit changes (what is the main goal)
>>>-create binaries from text representation
>>>
>>>My approach is as follows:
>>>
>>>+ FoxBin2Prg creates file-per-class. Much easier to merge and search.
>>>+ commit text where usefull
>>>- this will store pictures and other binary resources as binary, but they rarely change
>>>- dbf, dbc that belong to the project as binary (there is no use in having them as text, yet)
>>>+ Using the tool above
>>>- with FoxBin2PRG to create text and recreate binaries on PJX level from IDE
>>>- to commit changes to current branch
>>>- to raise git history (gitk)
>>>- to raise git shell (git-bash)
>>>+ do any git related work except straight, backup like commits on bash
>>>+ Sometimes there is some forward / backward movement on the git side of the problem. If this is finished, I can regenerate the binaries, I do not need it inbetween. For that I do not use git hooks, I rather start it from VFP menu. So automation for regeneration is not my prefered way.
>>>- OTOH sometimes, when I look for a code snippet, I just do
>>># generate text, commit
>>># check out old code
>>># open the related vc2 file
>>># copy the code snippet
>>># paste into vcx
>>># checkout recent branch
>>># create text and commit
>>>-- this is not the most sophisticated way, but much faster then two times binary regeneration
>>>
>>>
>>>>Thank you for the answers Lutz and Craig,0
>>>>
>>>>If the binaries are not stored they need to be regenerated when you check out a branch, but only if the associated text file changes during the checkout. Do you know a trick to automate this step? Perhaps git has a hook that makes this easy.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform