Diff Parameters - when 12390.1828 and when myform.sca passed
Moderator: SourceGear
Diff Parameters - when 12390.1828 and when myform.sca passed
VFP IDE, latest version of Vault. I know the IDE is not supported but questions have to do with historical copies of files and files used for diff programs.
I am using GKK Compare for the diff program in Vault. I can now call the GKKCompare.EXE fine and Vault passes the left and right filenames to it. I can load both files.
My question is related to the type of file Vault passes to the diff program. For example, if it is a form I am comparing, the working copy of the form contains two files: the .scx and the .sct files (for example: myform.scx and myform.sct).
When I check out the form, both files are checked out as they should be. The backup files in _sgvault for previous versions could be named anything though such as 190982.1238 and 234388.1234 I cannot determine how the backup files are related/associated to other files. In other words, if the form is myform.scx/myform.sct, how do I know that when vault passes 108235.180184 for the filename of the backup of the .scx that the associated file I need to also open is 110278.155867 as the .sct? Is there anywhere to easily determine that myform.scx is 108235.180184 and myform.sct is 110278.155867?
Next question: when EXACTLY and WHY is an .sca created? It appears that an .SCA is only created when a new form is added. Is that true? Is there anyway to have vault always create a corresponding .sca file and pass that filename to the diff program for comparison? I can convert an .sca to a sct and an scx for comparison purposes as an alternative.
It appears that a .vca is created for every class (vcx/vct files), but not an .sca for every form (scx/sct files).
Thanks in advance,
Tracy
When I check out a from from the VFP IDE, both files are checked out as they should be.
I am using GKK Compare for the diff program in Vault. I can now call the GKKCompare.EXE fine and Vault passes the left and right filenames to it. I can load both files.
My question is related to the type of file Vault passes to the diff program. For example, if it is a form I am comparing, the working copy of the form contains two files: the .scx and the .sct files (for example: myform.scx and myform.sct).
When I check out the form, both files are checked out as they should be. The backup files in _sgvault for previous versions could be named anything though such as 190982.1238 and 234388.1234 I cannot determine how the backup files are related/associated to other files. In other words, if the form is myform.scx/myform.sct, how do I know that when vault passes 108235.180184 for the filename of the backup of the .scx that the associated file I need to also open is 110278.155867 as the .sct? Is there anywhere to easily determine that myform.scx is 108235.180184 and myform.sct is 110278.155867?
Next question: when EXACTLY and WHY is an .sca created? It appears that an .SCA is only created when a new form is added. Is that true? Is there anyway to have vault always create a corresponding .sca file and pass that filename to the diff program for comparison? I can convert an .sca to a sct and an scx for comparison purposes as an alternative.
It appears that a .vca is created for every class (vcx/vct files), but not an .sca for every form (scx/sct files).
Thanks in advance,
Tracy
When I check out a from from the VFP IDE, both files are checked out as they should be.
Re: Diff Parameters - when 12390.1828 and when myform.sca pa
These files are baseline files, not backup files. They are controlled object IDs used by the client to quickly identify a file or version. If you've configured another diff tool, make sure it can take arguments, and the Vault client will pass the file names to the tool when invoked.holzert wrote:When I check out the form, both files are checked out as they should be. The backup files in _sgvault for previous versions could be named anything though such as 190982.1238 and 234388.1234 I cannot determine how the backup files are related/associated to other files. In other words, if the form is myform.scx/myform.sct, how do I know that when vault passes 108235.180184 for the filename of the backup of the .scx that the associated file I need to also open is 110278.155867 as the .sct? Is there anywhere to easily determine that myform.scx is 108235.180184 and myform.sct is 110278.155867?
You're going to have to track this one down on the VFP circuit, as Vault itself would not create the files.holzert wrote:Next question: when EXACTLY and WHY is an .sca created? It appears that an .SCA is only created when a new form is added. Is that true? Is there anyway to have vault always create a corresponding .sca file and pass that filename to the diff program for comparison? I can convert an .sca to a sct and an scx for comparison purposes as an alternative.
It appears that a .vca is created for every class (vcx/vct files), but not an .sca for every form (scx/sct files).
Jeff Clausius
SourceGear
SourceGear
Thank you. I was not aware that VFP was creating the .vca and the .sca not Vault.
One question still remains though:
The diff tool does except parameters and I am tracking what parameters are passed to it. Vault only passes the name of the baseline file for one of the files.
For example, when I click on differences for a form, vault will pass: 107654.180359 to the diff tool. That file is only the baseline for the form's .scx. The form's corresponding .sct has a baseline file as well and I need to know what that filename is. If in Vault, I rollback a form, Vault correctly rolls back both the .scx and .sct so Vault knows what the corresponding .sct baseline file is (what two files are linked). How do I determine what the baseline filename is for the corresponding .sct file when I need to view differences for a form?
Also, if Vault is not creating the .sca (for forms) and .vca (for classes), why is vault passing to the diff tool the classname with an extension of .vca? The file is in fact a .vca file. Vault is controlling the filename passed to the diff tool. How is that?
Example for Classes:
myclass.vcx/myclass.vct - vault passes .vca filename
Example for Forms:
myform.scx/myform.sct - vault passes baseline numbered file for only .scx
Why? Is there anyway to manage that?
UPDATE:
I have looked at VFP's settings for text generation. It does in fact appear that VFP is creating the .vca and the .sca but the .sca only when a form is added to the project and the project is already under source control. It doesn't create the .sca when the project is added to source control if the form already exists in the project.
How does Vault determine whether to use the .scx and .sct files for baseline comparison or the .sca file? It appears that if a .sca file exists, then vault uses that, and if one does not exist, it backs up the .scx and the .sct as is. Which means that if vault passes the baseline filename for the actual .scx, I need to figure out how to determine what the corresponding baseline filename for the .sct is as well...
One question still remains though:
The diff tool does except parameters and I am tracking what parameters are passed to it. Vault only passes the name of the baseline file for one of the files.
For example, when I click on differences for a form, vault will pass: 107654.180359 to the diff tool. That file is only the baseline for the form's .scx. The form's corresponding .sct has a baseline file as well and I need to know what that filename is. If in Vault, I rollback a form, Vault correctly rolls back both the .scx and .sct so Vault knows what the corresponding .sct baseline file is (what two files are linked). How do I determine what the baseline filename is for the corresponding .sct file when I need to view differences for a form?
Also, if Vault is not creating the .sca (for forms) and .vca (for classes), why is vault passing to the diff tool the classname with an extension of .vca? The file is in fact a .vca file. Vault is controlling the filename passed to the diff tool. How is that?
Example for Classes:
myclass.vcx/myclass.vct - vault passes .vca filename
Example for Forms:
myform.scx/myform.sct - vault passes baseline numbered file for only .scx
Why? Is there anyway to manage that?
UPDATE:
I have looked at VFP's settings for text generation. It does in fact appear that VFP is creating the .vca and the .sca but the .sca only when a form is added to the project and the project is already under source control. It doesn't create the .sca when the project is added to source control if the form already exists in the project.
How does Vault determine whether to use the .scx and .sct files for baseline comparison or the .sca file? It appears that if a .sca file exists, then vault uses that, and if one does not exist, it backs up the .scx and the .sct as is. Which means that if vault passes the baseline filename for the actual .scx, I need to figure out how to determine what the corresponding baseline filename for the .sct is as well...
In regards to file names being passed, let's look at a couple of things. Pull up a Vault client. Go to Tools -> Options. On the Command Dialogs section, make sure "Diff" is checked.
Next go to the Diff/Merge section. Look at the parameters. Make sure you have %LEFT_PATH% and %RIGHT_PATH% in the parameters to Diff. See the Help for other options.
Click OK.
Next, invoke Diff from the Vault GUI. You should see the options available for Diff. Pick the one which makes most sense in your case. For example, I usually use Diff from the current version in the repository. Make sure the option is what you want to diff against.
As for the naming of the files, the Vault IDE client is merely a component of the IDE. The IDE is in FULL CONTROL of working folders, file names, folder layout, etc. All the Vault IDE client does is carry out the command issued by the IDE. It contains no code for handling of anything regarding file names, working folders, etc.
Next go to the Diff/Merge section. Look at the parameters. Make sure you have %LEFT_PATH% and %RIGHT_PATH% in the parameters to Diff. See the Help for other options.
Click OK.
Next, invoke Diff from the Vault GUI. You should see the options available for Diff. Pick the one which makes most sense in your case. For example, I usually use Diff from the current version in the repository. Make sure the option is what you want to diff against.
As for the naming of the files, the Vault IDE client is merely a component of the IDE. The IDE is in FULL CONTROL of working folders, file names, folder layout, etc. All the Vault IDE client does is carry out the command issued by the IDE. It contains no code for handling of anything regarding file names, working folders, etc.
Jeff Clausius
SourceGear
SourceGear
I have done all of that long ago. That is how I know exactly what filenames are being passed to the diff tool from Vault. If not, how could I know what is being passed?
If I look at one form: myform.scx for example.
Vault passes 107456.17890 to the diff tool for left-hand file (which is an exact backup of myform.scx) and the local working directory path to myform.scx for the right-hand file
The problem is that myform.scx requires myform.sct which is 108987.23458. I need BOTH FILEs for comparison, not just the baseline copy of the .scx. I can easily find myform.sct in the working directory, but I need to know how to know what the baseline filename is myform.sct that matches the one vault passed for the .scx
Vault does NOT pass the related .sct baseline file, only the .scx baseline file.
Are you saying that the naming of a baseline file: 107654.18987 is done by the IDE and not Vault? That the storing of the baseline file in _sgvault is determined by the IDE and not Vault?
If that is so, when I rollback a form in Vault, how does vault know to rollback both the .scx and the .sct file when the numbered filenames are not at all similar? How does Vault know which two baseline files to rollback?
If I look at one form: myform.scx for example.
Vault passes 107456.17890 to the diff tool for left-hand file (which is an exact backup of myform.scx) and the local working directory path to myform.scx for the right-hand file
The problem is that myform.scx requires myform.sct which is 108987.23458. I need BOTH FILEs for comparison, not just the baseline copy of the .scx. I can easily find myform.sct in the working directory, but I need to know how to know what the baseline filename is myform.sct that matches the one vault passed for the .scx
Vault does NOT pass the related .sct baseline file, only the .scx baseline file.
Are you saying that the naming of a baseline file: 107654.18987 is done by the IDE and not Vault? That the storing of the baseline file in _sgvault is determined by the IDE and not Vault?
If that is so, when I rollback a form in Vault, how does vault know to rollback both the .scx and the .sct file when the numbered filenames are not at all similar? How does Vault know which two baseline files to rollback?
Someone else is trying to do the same thing here:
http://support.sourcegear.com/viewtopic.php?t=7013
http://support.sourcegear.com/viewtopic.php?t=7013
Thank you. That suggests using the command line client to pull files out of the repository. I am fine with doing it that way if it is the only way to acccomplish what I want.
My problem is still how to determine what files I need to pull from the repository?
If my working copy of a form is:
myform.scx
myform.sct --these two files are always opened when a form is opened
there could be 20 different versions of the same form. When I run diff from the IDE to compare the working copy to the copy currently stored in the repository, it pulls down a copy of the .scx file but it is stored in the working directory\_sgvault\1089872.3456
How do I know what the name of the associated file is (in this case, the numbered file name for the .sct)?
My problem is still how to determine what files I need to pull from the repository?
If my working copy of a form is:
myform.scx
myform.sct --these two files are always opened when a form is opened
there could be 20 different versions of the same form. When I run diff from the IDE to compare the working copy to the copy currently stored in the repository, it pulls down a copy of the .scx file but it is stored in the working directory\_sgvault\1089872.3456
How do I know what the name of the associated file is (in this case, the numbered file name for the .sct)?
Ideally, I would like to work with the same files vault does and do this from within the IDE. When vault calls the diff tool, it passes the left and right side files fine. My only problem is that for forms, there are two files I needm, not one. If one of the filenames passed is the .scx file or the .sct I can easily find its associated file in the same directory (typically the working directory). For the baseline numbered file that vault passes (the 2nd filename), I need its associated file as well and I know it resides in the same directory as the filename passed, but I don't know what the filename is. Since numbered filenames are used, I cannot easily determine what the associated file's name is.
I don't want to do this via the command line becuase I will need to reconnect and pass the user name and the repository and the files and the server, etc. Each developer works out of their own repository and I won't have that information.
Each developer has to connect to vault in order to work with the files though and we want the user to be able to follow the default process of right clicking on a file in the project manager and clicking on differences to check differences or to do it from within the vault client.
The only thing I have left to figure out is how to determine what the filename is for the associated file. Everything else has already been resolved.
Since when vault rollbacks form, BOTH the associated files are rolled back, then there is a way to determine what the associated filename is. The question is, is it available via the api or is it stored in a record in Vault in SQLServer? Does the IDE know the filename of the associated file - is that where vault gets the information from when it does a rollback or does the IDE generate the filename on the fly and vault just stores associated filenames with the record in sql server? I'm considering all possibilities for how this may be done but only Sourcegear can answer for sure.
I don't want to do this via the command line becuase I will need to reconnect and pass the user name and the repository and the files and the server, etc. Each developer works out of their own repository and I won't have that information.
Each developer has to connect to vault in order to work with the files though and we want the user to be able to follow the default process of right clicking on a file in the project manager and clicking on differences to check differences or to do it from within the vault client.
The only thing I have left to figure out is how to determine what the filename is for the associated file. Everything else has already been resolved.
Since when vault rollbacks form, BOTH the associated files are rolled back, then there is a way to determine what the associated filename is. The question is, is it available via the api or is it stored in a record in Vault in SQLServer? Does the IDE know the filename of the associated file - is that where vault gets the information from when it does a rollback or does the IDE generate the filename on the fly and vault just stores associated filenames with the record in sql server? I'm considering all possibilities for how this may be done but only Sourcegear can answer for sure.
I'm not sure I know how to help. I don't understand the relationship between .scx and .sct. Is the same kind of thing as a .frm and .frx? Or does the .scx somehow turn into a .sct?holzert wrote:The problem is that myform.scx requires myform.sct which is 108987.23458. I need BOTH FILEs for comparison, not just the baseline copy of the .scx. I can easily find myform.sct in the working directory, but I need to know how to know what the baseline filename is myform.sct that matches the one vault passed for the .scx
To answer your question about the object/version numbers, the _sgvault folder is a baseline folder caching files Vault has downloaded. About the only way to decrypt folder paths to a file in this cache would be to write a small client using the Vault Client APIs. Or you could launch a batch routine or program that starts the command line client -> perform some gets -> and then pass that to your Diff program.
Jeff Clausius
SourceGear
SourceGear
You can obtain all this info from the Vault client API. Look at using Vault's ClientInstance.TreeCache. The Tree Cache is a tree type structure full of files/folders. The files/folder objects will have object IDs, versions and ObjVerIDs which should help you locate the correct file if you so choose in the _sgvault cache folder.holzert wrote:when vault rollbacks form, BOTH the associated files are rolled back, then there is a way to determine what the associated filename is. The question is, is it available via the api or is it stored in a record in Vault in SQLServer? Does the IDE know the filename of the associated file - is that where vault gets the information from when it does a rollback or does the IDE generate the filename on the fly and vault just stores associated filenames with the record in sql server? I'm considering all possibilities for how this may be done but only Sourcegear can answer for sure.
Jeff Clausius
SourceGear
SourceGear
Thank your for attempting to help. I really appreciate it. Each form consists of 2 files. For example, a form named: myform will have:
myform.scx
myform.sct
the .scx is really a .dbf file and the .sct is a memo file.
Inside the vault client, if I rollback to a previous version of a form, vault correctly replaces the current .scx AND the current .sct with the previous versions (BOTH files are rolled back). Somehow, in the vault client, a relationship between the two exists.
How doe Vault know that when I rollback myform.scx to version 2, to also rollback the corresponding .sct file? However that relationship is determined, perhaps I can use the same method in the diff tool?
Another possibility is to do as you say and use the command line GET to pull the associated file. Since that requires passing the login and password I would rather not do that. Also, I would still need to determine how to pull down the correct version of the associated .sct file.
When a form is modified in the IDE, the date/time may change on one file but not the other. I have noticed that myform.scx may be on version 8 but the corresponding myform.sct may be on version 2. Report files are similar. Since the version numbers will not always match, somehow Vault knows which version of the .sct goes with the version of the .scx. Or is that done by the IDE, and if so, how?
myform.scx
myform.sct
the .scx is really a .dbf file and the .sct is a memo file.
Inside the vault client, if I rollback to a previous version of a form, vault correctly replaces the current .scx AND the current .sct with the previous versions (BOTH files are rolled back). Somehow, in the vault client, a relationship between the two exists.
How doe Vault know that when I rollback myform.scx to version 2, to also rollback the corresponding .sct file? However that relationship is determined, perhaps I can use the same method in the diff tool?
Another possibility is to do as you say and use the command line GET to pull the associated file. Since that requires passing the login and password I would rather not do that. Also, I would still need to determine how to pull down the correct version of the associated .sct file.
When a form is modified in the IDE, the date/time may change on one file but not the other. I have noticed that myform.scx may be on version 8 but the corresponding myform.sct may be on version 2. Report files are similar. Since the version numbers will not always match, somehow Vault knows which version of the .sct goes with the version of the .scx. Or is that done by the IDE, and if so, how?
Thank you, I will try that.jclausius wrote:You can obtain all this info from the Vault client API. Look at using Vault's ClientInstance.TreeCache. The Tree Cache is a tree type structure full of files/folders. The files/folder objects will have object IDs, versions and ObjVerIDs which should help you locate the correct file if you so choose in the _sgvault cache folder.
andholzert wrote:Inside the vault client, if I rollback to a previous version of a form, vault correctly replaces the current .scx AND the current .sct with the previous versions (BOTH files are rolled back). Somehow, in the vault client, a relationship between the two exists.
How doe Vault know that when I rollback myform.scx to version 2, to also rollback the corresponding .sct file? However that relationship is determined, perhaps I can use the same method in the diff tool?
This is all done by the IDE. For example, if you go into the Vault client, and rollback a .scx file, the .sct will not be changed. The Vault client has no such feature as linking files.holzert wrote:When a form is modified in the IDE, the date/time may change on one file but not the other. I have noticed that myform.scx may be on version 8 but the corresponding myform.sct may be on version 2. Report files are similar. Since the version numbers will not always match, somehow Vault knows which version of the .sct goes with the version of the .scx. Or is that done by the IDE, and if so, how?
My guess is VFP knows there is a relationship between the two and submits operations for both files.
Jeff Clausius
SourceGear
SourceGear