Question about how GET should work
Moderator: SourceGear
Question about how GET should work
When I use GET it appears to sync all files and not the delta that has changed. This does not seem to be the case for GETLABEL. Is this the way GET was intended to work?
Using this command line I can see that each file's modified time is getting updated. With GETLABEL and the GUI this does not happen (yes both are setting the files as read-only).
%SGVCLNT% -host %SGVHOST% -user %SGVUSER% -password "" -repository %SGVRPOS% REMEMBERLOGIN
%SGVCLNT% GET %SGVPROJ% -destpath %WORK_DIR% -verbose -makereadonly
I am seeing this with the latest client installed (v3.1.4).
%SGVCLNT% -host %SGVHOST% -user %SGVUSER% -password "" -repository %SGVRPOS% REMEMBERLOGIN
%SGVCLNT% GET %SGVPROJ% -destpath %WORK_DIR% -verbose -makereadonly
I am seeing this with the latest client installed (v3.1.4).
The -destpath parameter is what is messing it up. This indicates to Vault that it is a non-working folder that you are getting the files to, so it ignores any files that exist in the folder and simply overwrites them. If you remove -destpath, it will pick up the actual working folder and it should only get files that need to be updated.
Please add my vote for this request.
Dan - I want to add some general remarks:
1. I find the different options for GET and GETLABEL confusing.
2. From just reading the documentation of the command line client it is impossible to understand the differences between the destpath and labelfolder options. Is there a real use case for the destpath option or is it rather academic?
2. The documentation as well as your post do not mention that using GET with the current working folder as well as using GETLABEl with labelworkingfolder do not work UNLESS you set the follwing setting in Tools -> Options of the Vault GUI Client:
"Store Working Folder State/Baseline Files" In Working Folder
I would suggest to address this problem or temporarily at least to document the workaround well in the documentation of the command line client.
3. For many users building complex applications the command line client is essential to get reliable scripts getting either labeled or latest versions of the app.
My 3 (Euro) cents on this issue
Frank
Dan - I want to add some general remarks:
1. I find the different options for GET and GETLABEL confusing.
2. From just reading the documentation of the command line client it is impossible to understand the differences between the destpath and labelfolder options. Is there a real use case for the destpath option or is it rather academic?
2. The documentation as well as your post do not mention that using GET with the current working folder as well as using GETLABEl with labelworkingfolder do not work UNLESS you set the follwing setting in Tools -> Options of the Vault GUI Client:
"Store Working Folder State/Baseline Files" In Working Folder
I would suggest to address this problem or temporarily at least to document the workaround well in the documentation of the command line client.
3. For many users building complex applications the command line client is essential to get reliable scripts getting either labeled or latest versions of the app.
My 3 (Euro) cents on this issue
Frank
-workingfolder would be redundant, since Get is designed to retrieve files to the working folder by default (the doc says "the files will be stored in the corresponding working folders on the local system").
Yes, I agree the destpath parameter is confusing. We use it here to build the product, because we do a fresh GET to a non-working folder for each build. Users use it for the same reason they do Gets to non-working folders in the GUI client - to retrieve files from the server without altering your working folder.
I'll log a feature to update the documentation to make it more clear that it is non-working folder being specified, and by default you should not specify anything.
Yes, I agree the destpath parameter is confusing. We use it here to build the product, because we do a fresh GET to a non-working folder for each build. Users use it for the same reason they do Gets to non-working folders in the GUI client - to retrieve files from the server without altering your working folder.
I'll log a feature to update the documentation to make it more clear that it is non-working folder being specified, and by default you should not specify anything.
I don't believe that this is a limitation, and just tried it out to verify., and it worked fine for me here. What kind of error do you get when you store baseline files in the cache folder?The documentation as well as your post do not mention that using GET with the current working folder as well as using GETLABEl with labelworkingfolder do not work UNLESS you set the follwing setting in Tools -> Options of the Vault GUI Client:
"Store Working Folder State/Baseline Files" In Working Folder
I would suggest to address this problem or temporarily at least to document the workaround well in the documentation of the command line client.
Hi Dan,
thank you for logging the feature update regarding the destpath option.
Frank
thank you for logging the feature update regarding the destpath option.
If you use GETLABEL -labelworkingfolder you get properly updated baseline data in the _sgvault folder without changing the workingfolder. That's the big difference to GET, which always works on the working folder unless you use the destpath option, which does not create baseline data. Therefore a new option GET -workingfolder would be quite helpful.-workingfolder would be redundant, since Get is designed to retrieve files to the working folder by default (the doc says "the files will be stored in the corresponding working folders on the local system").
I just tried it out too: Apparently the command line client (3.1.3) respects now the setting of the GUI client. I am sure that in a previous version this did not properly work because we had some discussions on this subject at the time.I don't believe that this is a limitation, and just tried it out to verify., and it worked fine for me here. What kind of error do you get when you store baseline files in the cache folder?
Frank
GETLABEL does not get files to a working folder by default, so you have to specify either -labelworkingfolder (to get the label to an existing working folder) or -destpath (to get the label to a non-working folder). By default, GET retrieves files to the defined working folder.
If you use GET and it retrieves files to the working folder, it does update the baseline files, the same as it does for GETLABEL with -labelworkingfolder specified. Both GET and GETLABEL also support -destpath, which does not update the baseline files.
So, a -workingfolder option on GET would be convenient if you wanted to set or change the working folder associated with a folder, but I'm still not seeing how it is necessary, or different from GETLABEL.
If you use GET and it retrieves files to the working folder, it does update the baseline files, the same as it does for GETLABEL with -labelworkingfolder specified. Both GET and GETLABEL also support -destpath, which does not update the baseline files.
So, a -workingfolder option on GET would be convenient if you wanted to set or change the working folder associated with a folder, but I'm still not seeing how it is necessary, or different from GETLABEL.
My point is that using GET w/o the -destpath option gets the files to the working folder. In case you have several builds to maintain containing the same component you will have to constantly change the working folder, which is kind of ugly:
"%SGVAULT%/vault" unsetworkingfolder "$/ThirdpartyLibraries/QuickGraph"
"%SGVAULT%/vault" setworkingfolder "$/ThirdpartyLibraries/QuickGraph" "%EWB_MainDir%/src/QuickGraph"
"%SGVAULT%/vault" get -makereadonly -merge later "$/ThirdpartyLibraries/QuickGraph"
This scenario could be improved by having a separate -workingfolder option, where you can pass the working folder for the GET w/o actually changing the currently set working folder for the component as it is required today.
"%SGVAULT%/vault" unsetworkingfolder "$/ThirdpartyLibraries/QuickGraph"
"%SGVAULT%/vault" setworkingfolder "$/ThirdpartyLibraries/QuickGraph" "%EWB_MainDir%/src/QuickGraph"
"%SGVAULT%/vault" get -makereadonly -merge later "$/ThirdpartyLibraries/QuickGraph"
This scenario could be improved by having a separate -workingfolder option, where you can pass the working folder for the GET w/o actually changing the currently set working folder for the component as it is required today.