andreynikiforov / vault2git Goto Github PK
View Code? Open in Web Editor NEWConverts vault repository to git
Converts vault repository to git
I'm looking into migrating our repo with this tool. I've given it a little work and dug into the source, but I can't seem to get SSL working. Things seem to be getting tied up inside of vaultLogin()
in Vault2Git.Lib.Processor
just after ServerOperations.Login();
is called.
Is the a specific setting that needs to be changed to enable SSL? I tried changing the URL in this line...
ServerOperations.client.LoginOptions.URL = string.Format("http://{0}/VaultService", this.VaultServer);
...to this, thinking that the HTTPS may trigger the SSL. Our server is also on port 79, which may be throwing it off further.
ServerOperations.client.LoginOptions.URL = string.Format("https://{0}/VaultService", this.VaultServer);
First of all, thanks for making this tool, it's gonna be a big help.
The problem I'm having is when the tool tries to change the working folder for the branch in Vault. The trunk is already set to the working folder so the operation fails.
I may not be understanding how the tool works with branches. My understanding is that it sets the working folder for the trunk, checks in all commits from Vault to whatever I have the trunk set to which is "master". Then it sets the same working folder to the branch (this is where it fails) and checks in all of the branch commits into git on the branch I created which I called just "branch".
here's my config file with sensitive information removed:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="Vault.Server" value=""/>
<add key="Vault.User" value=""/>
<add key="Vault.Password" value=""/>
<add key="Vault.Repo" value="ADN Web Apps"/>
<add key="Git.DomainName" value=""/>
<add key="Convertor.WorkingFolder" value="C:\Users\csweeney\Documents\ADN Web Apps\QACTemp"/>
<add key="Convertor.GitCmd" value="C:\Program Files (x86)\Git\bin\git.exe"/>
<add key="Convertor.Paths" value="$/QAC/Trunk/~master;$/QAC/Branches/~branch"/>
</appSettings>
</configuration>
In Processor.cs, line 296, the time range is from 2000 - Jan 1, 2020 so all commits after that don't work.
Update the line to a later date and all will be fine
"Shared" as in the Vault feature explained here http://download.sourcegear.com/misc/vault/help/client/share.html.
We make heavy use of the share feature, but we also use git on a number of other projects and rather like it. We're discussing how we might work with these shared files should we move to git.
Hi,
I was using the "robe070/vault2git2"July 2013 drop code. following exception we get as error while execute the Vault2Git.exe. Please help me in this regards.
here is config information:
add key="Convertor.Paths" value="$/<PROJECT_NAME>~master;$/<PROJECT_NAME>/Branches/~branch"/>
Error:
Exception $/<PROJECT_NAME> has no working folder set. getting Version 8 from Vault
repo. Waiting 5 secs and retrying...
Unhandled Exception: System.Exception: Cannot get transaction details for 217286
at Vault2Git.Lib.Processor.Pull(IEnumerable`1 git2vaultRepoPath, Int64 limitC
ount) in C:\project\tool\vault2git_app\new\vault2git2-b713dcd09fedf83e61f9431536
47b09c4fd9a470\Vault2GitLib\Processor.cs:line 345
at Vault2Git.CLI.Program.Main(String[] args) in C:\project\tool\vault2git_app
\new\vault2git2-b713dcd09fedf83e61f943153647b09c4fd9a470\Vault2GitCLI\Program.cs
:line 217
The utility is slow for large numbers of files because EVERY file in each Version is ALWAYS copied from the client-side cache, if its there, otherwise its retrieved from the server.
What is needed is to only get the changeset from the Server.
This creates a program whose speed is dependent on how many files there are in each changeset, not how many files are in the entire Version.
I have modified Vault2Git to do this and it works extremely fast - up to 30 times faster with my large repo, but if a file or folder is deleted in the tip then the file is NOT retrieved. Clearly not useful!
I'm trying to get more info from SourceGear who have been helpful so far, but if you think you can help work this out with me then get in contact ASAP.
The critical issue is how to create a VaultClientFile object for a particular version of a file.
I have found a simple workaround of running the old code if there is a deleted file. But that means that if there is just one delete, rename or move in a changeset then the overhead of copying the entire Version must be incurred.
SourceGear have suggested using ServerOperations.client.ClientInstance.Connection.GetBranchStructure to get the historical branch structure.
I wonder though that what needs to occur is to just manually perform the delete, rename or move. We have the file already due to the process we go through. And the history details provide old name and new name. Worth a try if somebody is up to it and I don't find the time or necessity before I check in my performance improvements.
Occasionally (usually after a few hundred/thousand) commits, an exception may arise:
the working folder state information for is incompatible with this version of vault
This might be caused by stale client-side cache:
https://elegantcode.com/2009/07/01/vault-and-cruisecontrolnet-error-working-folder-state-problem/
Other:
Hi,
It appears that this doesn't work with Vault Professional. Do you have initial ideas about making this work with the Fortress Client? I might be able to help make it work but need a little direction. You can see the stack trace in this ticket in the sourceforge forum at this ticket.
http://kb.sourcegear.com/FortressHelp/viewtopic.php?f=48&t=18723
Best,
-- Rodney
You cannot believe how happy I am to have found this!!!
As the title suggests, does this work with Vault v5?
When specifying the Convertor.Paths
Configuration setting, there must not be a /
between the final character of the path name and the ~
preceding the branch name.
If a /
is present between these two elements, then the workaround for file deletions will not occur successfully.
This surfaces in Processor.cs in line 406 where the "path to be deleted" is calculated.
We are finding that any files/folders that were deleted in Vault are being imported into Git as if they are still present and up to date. Is this a known issue? Is there a workaround?
I'm not sure if this is a bug that can be fixed in Vault2Git, or a bug in Vault itself. I have a Vault path that looks like this:
$/company/dev/proj1/
But this path has changed thoughout history. For revision 1, the path looked like this instead:
$/proj1/dev/
I configured Vault2Git with the current path (first one I listed), but it quickly fails with a 'System.Exception':
Unhandled Exception: System.Exception: $/company/dev/dev has no working folder set.
at VaultClientIntegrationLib.GetOperations.performGetVersion(String objectPath, Int32 version, String strDestFolder, GetOptions getOptions)
at VaultClientIntegrationLib.GetOperations.ProcessCommandGetVersion(String objectPath, Int32 version, GetOptions getOptions)
at Vault2Git.Lib.Processor.vaultGet(String repoPath, Int64 version, Int64 txId) in D:\git\vault2git\Vault2GitLib\Processor.cs:line 378
at Vault2Git.Lib.Processor.Pull(IEnumerable`1 git2vaultRepoPath, Int64 limitCount) in D:\git\vault2git\Vault2GitLib\Processor.cs:line 139
at Vault2Git.CLI.Program.Main(String[] args) in D:\git\vault2git\Vault2GitCLI\Program.cs:line 140
The path given in the exception makes no sense, I don't think that path has ever existed. I tried a few modifications to the code to attempt to handle this, such as setting the working folder for the path in the exception, as well as setting it to the path that I expect it to be (second one listed). In either case, setting the working folder throws an exception "$/proj1/dev does not exist in the repository", which is correct for the current head of the repo.
Any idea how to fix/workaround this?
It's not very clear in the documentation how to configure the paths. Can you show an example? What paths? why more than one?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.