Ejemplo n.º 1
0
 internal void Bind( VaultRepositoryAuthSettings connectionSettings )
 {
     host.DataBindings.Add( "Text", connectionSettings, "Host" );
     userName.DataBindings.Add( "Text", connectionSettings, "User" );
     password.DataBindings.Add( "Text", connectionSettings, "Password" );
     repository.DataBindings.Add( "Text", connectionSettings, "Repository" );
 }
Ejemplo n.º 2
0
 private static ClientInstance Login( VaultRepositoryAuthSettings connectionSettings )
 {
     ClientInstance myClient = new ClientInstance();
     myClient.Init( VaultClientNetLib.VaultConnection.AccessLevelType.Client );
     myClient.Login( connectionSettings.Url, connectionSettings.User, connectionSettings.Password );
     FindRepository( myClient, connectionSettings.Repository );
     return myClient;
 }
Ejemplo n.º 3
0
        private static ClientInstance Login(VaultRepositoryAuthSettings connectionSettings)
        {
            ClientInstance myClient = new ClientInstance();

            myClient.Init(VaultClientNetLib.VaultConnection.AccessLevelType.Client);
            myClient.Login(connectionSettings.Url, connectionSettings.User, connectionSettings.Password);
            FindRepository(myClient, connectionSettings.Repository);
            return(myClient);
        }
Ejemplo n.º 4
0
        private ChangeHistoryDataSet GetVersions(string[] featureTags, VaultRepositoryAuthSettings connectionSettings)
        {
            using (VaultClientHelper client = new VaultClientHelper(connectionSettings))
            {
                VaultHistoryQueryRequest query    = PrepareQuery(client);
                VaultHistoryDataSet      versions = new VaultHistoryDataSet();

                foreach (string featureTag in featureTags)
                {
                    query.CommentSubstring = featureTag;
                    MergeResults(client, versions, Process(client, query), featureTag);
                }

                return(versions);
            }
        }
Ejemplo n.º 5
0
        private ChangeHistoryDataSet GetVersions( string[] featureTags, VaultRepositoryAuthSettings connectionSettings )
        {
            using( VaultClientHelper client = new VaultClientHelper( connectionSettings ) )
            {
                VaultHistoryQueryRequest query = PrepareQuery( client );
                VaultHistoryDataSet versions = new VaultHistoryDataSet();

                foreach( string featureTag in featureTags )
                {
                    query.CommentSubstring = featureTag;
                    MergeResults( client, versions, Process( client, query ), featureTag );
                }

                return versions;
            }
        }
Ejemplo n.º 6
0
        public ChangeHistoryDataSet GetVersions( string featureBranch, VaultRepositoryAuthSettings connectionSettings )
        {
            using( VaultClientHelper client = new VaultClientHelper( connectionSettings ) )
            {
                VaultHistoryDataSet results = new VaultHistoryDataSet( featureBranch );
                foreach( VaultTxHistoryItem changeSet in GetChangeSets( client, featureBranch ) )
                {
                    foreach( VaultHistoryItemBase change in GetChanges( client, changeSet ) )
                    {
                        if( change != null )
                        {
                            // Don't query promotion info because it's done via branches, not labels.
                            results.Add( client, change );
                        }
                    }
                }

                return results;
            }
        }
Ejemplo n.º 7
0
        public ChangeHistoryDataSet GetVersions(string featureBranch, VaultRepositoryAuthSettings connectionSettings)
        {
            using (VaultClientHelper client = new VaultClientHelper(connectionSettings))
            {
                VaultHistoryDataSet results = new VaultHistoryDataSet(featureBranch);
                foreach (VaultTxHistoryItem changeSet in GetChangeSets(client, featureBranch))
                {
                    foreach (VaultHistoryItemBase change in GetChanges(client, changeSet))
                    {
                        if (change != null)
                        {
                            // Don't query promotion info because it's done via branches, not labels.
                            results.Add(client, change);
                        }
                    }
                }

                return(results);
            }
        }
Ejemplo n.º 8
0
 public VaultClientHelper( VaultRepositoryAuthSettings connectionSettings )
 {
     vaultClient = Login( connectionSettings );
 }
Ejemplo n.º 9
0
 public FileRetriever( VaultRepositoryAuthSettings settings )
     : this(settings.Host, settings.Repository, settings.User, settings.Password)
 {
 }
Ejemplo n.º 10
0
 public DiffTwoFileVersions(VaultRepositoryAuthSettings settings, ExternalToolsSettings externalToolsSettings) :
     this(settings.Host, settings.Repository, settings.User, settings.Password)
 {
     this.externalToolsSettings = externalToolsSettings;
     fileRetriever = new FileRetriever(settings);
 }
Ejemplo n.º 11
0
 public ChangeHistoryDataSet GetVersions( string selector, VaultRepositoryAuthSettings connectionSettings )
 {
     return GetVersions( HistoryQueryHelper.GetTaskTags( selector ), connectionSettings );
 }
Ejemplo n.º 12
0
 public DiffTwoFileVersions( VaultRepositoryAuthSettings settings, ExternalToolsSettings externalToolsSettings )
     : this(settings.Host, settings.Repository, settings.User, settings.Password)
 {
     this.externalToolsSettings = externalToolsSettings;
     fileRetriever = new FileRetriever( settings );
 }
Ejemplo n.º 13
0
 public VaultClientHelper(VaultRepositoryAuthSettings connectionSettings)
 {
     vaultClient = Login(connectionSettings);
 }
Ejemplo n.º 14
0
        public static void ShowHtmlBlame(VaultRepositoryAuthSettings settings, string repositoryPath, long version)
        {
            HtmlBlame blame = new HtmlBlame(settings);

            blame.Client.viewBlameInHTML(repositoryPath, version);
        }
Ejemplo n.º 15
0
 private HtmlBlame( VaultRepositoryAuthSettings settings ) : 
     this( settings.Host, settings.Repository, settings.User, settings.Password )
 {
 }
Ejemplo n.º 16
0
 public LabelPromoter(VaultRepositoryAuthSettings settings) :
     this(settings.Host, settings.Repository, settings.User, settings.Password)
 {
 }
Ejemplo n.º 17
0
 public ChangeHistoryDataSet GetVersions(string selector, VaultRepositoryAuthSettings connectionSettings)
 {
     return(GetVersions(HistoryQueryHelper.GetTaskTags(selector), connectionSettings));
 }
Ejemplo n.º 18
0
 public LabelPromoter( VaultRepositoryAuthSettings settings )
     : this(settings.Host, settings.Repository, settings.User, settings.Password)
 {
 }
Ejemplo n.º 19
0
 public static void ShowHtmlBlame( VaultRepositoryAuthSettings settings, string repositoryPath, long version )
 {
     HtmlBlame blame = new HtmlBlame( settings );
     blame.Client.viewBlameInHTML( repositoryPath, version );
 }
Ejemplo n.º 20
0
 private HtmlBlame(VaultRepositoryAuthSettings settings) :
     this(settings.Host, settings.Repository, settings.User, settings.Password)
 {
 }