Programmatically changing history
Posted: Tue Dec 08, 2009 10:12 am
Hi,
I am currently evaluating SourceGear. Our current source control is Visual Source Safe and we have automated our build process and all access to sourcesafe.
The first task that I have is to migrate all of our source to SourceGear. I am aware of the migration feature in SourceGear. This took >6 days. I have create my own migration take far less time.
I have been able to modify my SourceSafe class to work very well with the SourceGear API.
But I have 2 problems.
Problem 1
I need to modify the history of a file. This is due to my migration code.
a) Get sourcesafe "file" version 1
b) Add file to source gear (Sourcegear history shows the current date, I need to have it show the Sourcesafe date of the version transaction)
Then in simple terms
for each version in Sourcesafe file
Get user for the source safe history transaction
Login to sourcegear with that username
checkout sourcegear file
get sourcesafe file version overwriting the local Sourcegear file.
check into Sourcegear with comments (again the check in date shows the current date)
What I have tried is to modify my computers date and time for each transaction but that failed. Sourcegear must be using the Server Date and Time. Not my local computer time.
Do you have a suggestion for this problem.
Problem 2
Our Sourcesafe data base contains ~13000 binary files that are typically 4meg in size.
The files can have on upwards to 500 versions.
Now when I have run the migration software the SourceGear cache grew to 75gb and ate up all of my hard drive space.
I found that is a directory structure like this.
C:\Documents and Settings\user\Local Settings\Application Data\Sourcegear\Vault_1\Client\C772EA7B-BDBB-4A74-B409-163C46E6A11C\user\_sgvault\1308754875
C:\Documents and Settings\user\Local Settings\Application Data\Sourcegear\Vault_1\Client\C772EA7B-BDBB-4A74-B409-163C46E6A11C\user2\_sgvault\1308754875
C:\Documents and Settings\user\Local Settings\Application Data\Sourcegear\Vault_1\Client\C772EA7B-BDBB-4A74-B409-163C46E6A11C\user3\_sgvault\1308754875
It seems that for each login a new directory structure is created. These directories can contain tens of gigs for files.
My question:
Is there a way programmatically I can clear the cache for each user when a new user is logged in?
Sorry for the long winded explanation.
Dave
I am currently evaluating SourceGear. Our current source control is Visual Source Safe and we have automated our build process and all access to sourcesafe.
The first task that I have is to migrate all of our source to SourceGear. I am aware of the migration feature in SourceGear. This took >6 days. I have create my own migration take far less time.
I have been able to modify my SourceSafe class to work very well with the SourceGear API.
But I have 2 problems.
Problem 1
I need to modify the history of a file. This is due to my migration code.
a) Get sourcesafe "file" version 1
b) Add file to source gear (Sourcegear history shows the current date, I need to have it show the Sourcesafe date of the version transaction)
Then in simple terms
for each version in Sourcesafe file
Get user for the source safe history transaction
Login to sourcegear with that username
checkout sourcegear file
get sourcesafe file version overwriting the local Sourcegear file.
check into Sourcegear with comments (again the check in date shows the current date)
What I have tried is to modify my computers date and time for each transaction but that failed. Sourcegear must be using the Server Date and Time. Not my local computer time.
Do you have a suggestion for this problem.
Problem 2
Our Sourcesafe data base contains ~13000 binary files that are typically 4meg in size.
The files can have on upwards to 500 versions.
Now when I have run the migration software the SourceGear cache grew to 75gb and ate up all of my hard drive space.
I found that is a directory structure like this.
C:\Documents and Settings\user\Local Settings\Application Data\Sourcegear\Vault_1\Client\C772EA7B-BDBB-4A74-B409-163C46E6A11C\user\_sgvault\1308754875
C:\Documents and Settings\user\Local Settings\Application Data\Sourcegear\Vault_1\Client\C772EA7B-BDBB-4A74-B409-163C46E6A11C\user2\_sgvault\1308754875
C:\Documents and Settings\user\Local Settings\Application Data\Sourcegear\Vault_1\Client\C772EA7B-BDBB-4A74-B409-163C46E6A11C\user3\_sgvault\1308754875
It seems that for each login a new directory structure is created. These directories can contain tens of gigs for files.
My question:
Is there a way programmatically I can clear the cache for each user when a new user is logged in?
Sorry for the long winded explanation.
Dave