Show Differences
Moderator: SourceGear
Show Differences
Hello,
Using Vault v4.1.4.
When I "Show Differences" on a file, the Vault creates a temp file like:
user\appdata\local\.....\93933.39393
The problem is that the temp file looses the original extension. I need to know the file extension to be able to convert the file correctly so it can be passed to Beyond Compare.
Does anyone know of a way to keep the original extension type on a temp file ?
Thanks,
Kent
Using Vault v4.1.4.
When I "Show Differences" on a file, the Vault creates a temp file like:
user\appdata\local\.....\93933.39393
The problem is that the temp file looses the original extension. I need to know the file extension to be able to convert the file correctly so it can be passed to Beyond Compare.
Does anyone know of a way to keep the original extension type on a temp file ?
Thanks,
Kent
Re: Show Differences
Are you showing differences against a current file in the repository or a historical file?
One thing you could do is pull a copy down to a different location on disk of the file you want to diff against, then use the diff tool outside of Vault to compare the two files. To do that you would run the sgdm.exe found in the directory your Vault client installed to. Then you start a file diff and browse to the two files.
Another way of doing this would be to download and install our separate DiffMerge tool. It's free and integrates with Windows explorer. You would then have both files you want to diff somewhere on disk, select the files, right-click and select the option to diff them.
One thing you could do is pull a copy down to a different location on disk of the file you want to diff against, then use the diff tool outside of Vault to compare the two files. To do that you would run the sgdm.exe found in the directory your Vault client installed to. Then you start a file diff and browse to the two files.
Another way of doing this would be to download and install our separate DiffMerge tool. It's free and integrates with Windows explorer. You would then have both files you want to diff somewhere on disk, select the files, right-click and select the option to diff them.
Beth Kieler
SourceGear Technical Support
SourceGear Technical Support
Re: Show Differences
Hello Beth,
I am selecting "The current version in the repository now" to show differences.
Everything works great if I do the steps manually, but I am trying to automate this.
The Vault has an option to use an external program do show the differences and I am trying to use Beyond Compare. The first argument is %LEFT_PATH% which should send the path/file name of the version in the repository.
Here is the problem. It is a binary file and needs to be run thru a converter before the compare. Beyond compare has the option to do this and it works great. The problem is the converter needs to know the file type by the extension. The Vault when it creates the temp file for the repository version does not keep the extension type.
Is there any way to make the Vault keep the same file extension when it creates the temp file for the "Show Differences" option ?
Thanks,
Kent
I am selecting "The current version in the repository now" to show differences.
Everything works great if I do the steps manually, but I am trying to automate this.
The Vault has an option to use an external program do show the differences and I am trying to use Beyond Compare. The first argument is %LEFT_PATH% which should send the path/file name of the version in the repository.
Here is the problem. It is a binary file and needs to be run thru a converter before the compare. Beyond compare has the option to do this and it works great. The problem is the converter needs to know the file type by the extension. The Vault when it creates the temp file for the repository version does not keep the extension type.
Is there any way to make the Vault keep the same file extension when it creates the temp file for the "Show Differences" option ?
Thanks,
Kent
-
- Posts: 534
- Joined: Tue Jun 05, 2007 11:37 am
- Location: SourceGear
- Contact:
Re: Show Differences
Hello,
So if I understand your question, when you launch a diff you're seeing
a #####.##### file on the left and the current version in the working
folder on the right.
The #####.##### file is the cached copy of the historical version of
the file. Changing that filename in the cache has some issues (and won't
fix your problem today).
What you could do is write a short shell script / batch file that takes the
same "file1 file2" arguments as DiffMerge or Beyond Compare. Have it
detect that file1 is of the form #####.##### and if so COPY
it to a temp directory and name it with the entryname (or just the suffix)
from file2. Then launch BC with the temp file and file2. Capture BC's
exit status, cleanup the temp file and exit with the BC's status.
Then point Vault at the shell script rather than BC.
I know it's kind of ugly, but it should get the job done.
jeff
So if I understand your question, when you launch a diff you're seeing
a #####.##### file on the left and the current version in the working
folder on the right.
The #####.##### file is the cached copy of the historical version of
the file. Changing that filename in the cache has some issues (and won't
fix your problem today).
What you could do is write a short shell script / batch file that takes the
same "file1 file2" arguments as DiffMerge or Beyond Compare. Have it
detect that file1 is of the form #####.##### and if so COPY
it to a temp directory and name it with the entryname (or just the suffix)
from file2. Then launch BC with the temp file and file2. Capture BC's
exit status, cleanup the temp file and exit with the BC's status.
Then point Vault at the shell script rather than BC.
I know it's kind of ugly, but it should get the job done.
jeff
Re: Show Differences
Hello Jeff,
Thanks for your reply.
I think I understand your work around. Get the extension from the %RIGHT_PATH% and then copy the cache temp file with the correct extension and use this file for the %LEFT_PATH%.
Will this be fixed in a future version of the Vault ?
Thanks,
Kent
Thanks for your reply.
I think I understand your work around. Get the extension from the %RIGHT_PATH% and then copy the cache temp file with the correct extension and use this file for the %LEFT_PATH%.
Will this be fixed in a future version of the Vault ?
Thanks,
Kent
-
- Posts: 534
- Joined: Tue Jun 05, 2007 11:37 am
- Location: SourceGear
- Contact:
Re: Show Differences
Yeah, a short script like that should get you going.
WRT fixing it: I have logged an issue for this.
But I can't say when it'll get on the schedule.
jeff
item:15547
WRT fixing it: I have logged an issue for this.
But I can't say when it'll get on the schedule.
jeff
item:15547
Re: Show Differences
Hello Jeff,
Can you explain how the temp file names are generated ?
Looks like ######.######
For example, I have 2 files main.scx and main.sct. The 2 files are associated and must be accessed at the same time.
The Vault creates the temp file with a name 60188.138475 for the main.scx. How can I find the associated temp file name for the main.sct ?
Thanks,
Kent
Can you explain how the temp file names are generated ?
Looks like ######.######
For example, I have 2 files main.scx and main.sct. The 2 files are associated and must be accessed at the same time.
The Vault creates the temp file with a name 60188.138475 for the main.scx. How can I find the associated temp file name for the main.sct ?
Thanks,
Kent
-
- Posts: 534
- Joined: Tue Jun 05, 2007 11:37 am
- Location: SourceGear
- Contact:
Re: Show Differences
Uh, the #####.##### files don't really have a pattern
that you could/should rely on.
If you need to view 2 sets of files at the same time, let me
offer another suggestion: right click on the directory containing
the .scx and .sct files and do a "Show Differences...".
This will cause Vault to export the historical version of everything in
the directory into a temp directory and launch DiffMerge with the
temp dir and the corresponding working folder as peers. The exported
temp versions of the files will have the right suffix.
Then in DiffMerge configure an "External Tool" using the Preferences/Option
Dialog and register BC to be the handler for .scx and .sct files and set the
command line args (just like you did in the Vault dialog).
Then just double click on one of the rows in the folder window
and DiffMerge will launch BC to do the diff rather than opening
its own file-diff window.
This might be a little easier, but still a little awkward.
hope this helps,
jeff
that you could/should rely on.
If you need to view 2 sets of files at the same time, let me
offer another suggestion: right click on the directory containing
the .scx and .sct files and do a "Show Differences...".
This will cause Vault to export the historical version of everything in
the directory into a temp directory and launch DiffMerge with the
temp dir and the corresponding working folder as peers. The exported
temp versions of the files will have the right suffix.
Then in DiffMerge configure an "External Tool" using the Preferences/Option
Dialog and register BC to be the handler for .scx and .sct files and set the
command line args (just like you did in the Vault dialog).
Then just double click on one of the rows in the folder window
and DiffMerge will launch BC to do the diff rather than opening
its own file-diff window.
This might be a little easier, but still a little awkward.
hope this helps,
jeff
Re: Show Differences
Hello Jeff,
This does work and I can now show diffs using beyond compare for Visual Foxpro files.
It would be much nicer to just be able to right click on a single file then having to show diff's on the entire folder.
I hope it is possible to fix the extensions in the temp folder to reflect the original extensions.
Thanks for your help,
Kent
This does work and I can now show diffs using beyond compare for Visual Foxpro files.
It would be much nicer to just be able to right click on a single file then having to show diff's on the entire folder.
I hope it is possible to fix the extensions in the temp folder to reflect the original extensions.
Thanks for your help,
Kent