예제 #1
0
        private int vaultPopulateInfo(string repoPath, IDictionary <string, VaultVersionInfo> info)
        {
            var ticks = Environment.TickCount;

            string[] PathToBranch = repoPath.Split('~');
            string   path         = PathToBranch[0];
            string   branch       = PathToBranch[1];

            VaultTxHistoryItem[]  historyItems;
            VaultClientFolderColl repoFolders;

            if (repoPath.EndsWith("*"))
            {
                repoFolders = ServerOperations.ProcessCommandListFolder(path, false).Folders;
            }
            else
            {
                repoFolders = new VaultClientFolderColl();

                repoFolders.Add(ServerOperations.ProcessCommandListFolder(path, false));
            }

            foreach (VaultClientFolder f in repoFolders)
            {
                string branchName;

                if (branch == "*")
                {
                    branchName = Tools.GetBranchMapping(f.Name);
                }
                else
                {
                    branchName = Tools.GetBranchMapping(branch);
                }

                string EndDate = (f.Name == "SAS") ? "2016-01-23" : RevisionEndDate;

                historyItems = ServerOperations.ProcessCommandVersionHistory(f.FullPath,
                                                                             0,
                                                                             VaultDateTime.Parse(RevisionStartDate),
                                                                             VaultDateTime.Parse(EndDate),
                                                                             0);

                foreach (VaultTxHistoryItem i in historyItems)
                {
                    info.Add(i.TxDate.GetDateTime().ToString("yyyy-MM-ddTHH:mm:ss.fff") + ':' + branchName, new VaultVersionInfo()
                    {
                        Branch    = branchName,
                        Path      = f.FullPath,
                        Version   = i.Version,
                        TxId      = i.TxID,
                        Comment   = i.Comment,
                        Login     = i.UserLogin,
                        TimeStamp = i.TxDate
                    });
                }
            }

            return(Environment.TickCount - ticks);
        }
예제 #2
0
        private List <VaultTxHistoryItem> GetTxDetailHistoryItems(string repoPath, string subdirectory)
        {
            var fullPath = MakeFullPath(repoPath, subdirectory);

            if (_pathToTxIdsToTxDetailHistItem.TryGetValue(fullPath, out var txIdToHistItem))
            {
                return(txIdToHistItem);
            }

            var versions = ServerOperations.ProcessCommandVersionHistory(fullPath, -1, new VaultDateTime(1990, 1, 1), new VaultDateTime(2090, 1, 1), 0);

            txIdToHistItem = new List <VaultTxHistoryItem>(versions.Reverse());
            _pathToTxIdsToTxDetailHistItem[fullPath] = txIdToHistItem;
            return(txIdToHistItem);
        }
예제 #3
0
        private int vaultPopulateInfo(string repoPath, IDictionary <long, VaultVersionInfo> info)
        {
            var ticks = Environment.TickCount;

            foreach (var i in ServerOperations.ProcessCommandVersionHistory(repoPath,
                                                                            1,
                                                                            VaultDateTime.Parse("2000-01-01"),
                                                                            VaultDateTime.Parse("2020-01-01"),
                                                                            0))
            {
                info.Add(i.Version, new VaultVersionInfo()
                {
                    TrxId     = i.TxID,
                    Comment   = i.Comment,
                    Login     = i.UserLogin,
                    TimeStamp = i.TxDate.GetDateTime()
                });
            }
            return(Environment.TickCount - ticks);
        }