public GitTfsRemote(RemoteOptions remoteOptions, Globals globals, ITfsHelper tfsHelper, TextWriter stdout) { this.remoteOptions = remoteOptions; this.globals = globals; this.stdout = stdout; Tfs = tfsHelper; }
public TfsChangeset(ITfsHelper tfs, IChangeset changeset, AuthorsFile authors) { _tfs = tfs; _changeset = changeset; _authors = authors; BaseChangesetId = _changeset.Changes.Max(c => c.Item.ChangesetId) - 1; }
public static void WriteRemoteTfsBranchStructure(ITfsHelper tfsHelper, TextWriter writer, string tfsRepositoryPath, IEnumerable<IGitTfsRemote> tfsRemotes = null) { var root = tfsHelper.GetRootTfsBranchForRemotePath(tfsRepositoryPath); var visitor = new WriteBranchStructureTreeVisitor(tfsRepositoryPath, writer, tfsRemotes); root.AcceptVisitor(visitor); }
public ListRemoteBranches(Globals globals, TextWriter stdout, ITfsHelper tfsHelper, RemoteOptions remoteOptions) { this.globals = globals; this.stdout = stdout; this.tfsHelper = tfsHelper; this.remoteOptions = remoteOptions; }
public TfsChangeset(ITfsHelper tfs, IChangeset changeset, AuthorsFile authors) { _tfs = tfs; _changeset = changeset; _authors = authors; BaseChangesetId = _changeset.Changes.Max(c => c.Item.ChangesetId) - 1; }
public void Initialize(IBuildServerWatcher buildServerWatcher, ISettingsSource config) { if (_buildServerWatcher != null) throw new InvalidOperationException("Already initialized"); _buildServerWatcher = buildServerWatcher; _tfsServer = config.GetString("TfsServer", null); _tfsTeamCollectionName = config.GetString("TfsTeamCollectionName", null); _projectName = config.GetString("ProjectName", null); _tfsBuildDefinitionName = config.GetString("TfsBuildDefinitionName", null); if (!string.IsNullOrEmpty(_tfsServer) && !string.IsNullOrEmpty(_tfsTeamCollectionName) && !string.IsNullOrEmpty(_projectName)) { _tfsHelper = LoadAssemblyAndConnectToServer("TfsInterop.Vs2013") ?? LoadAssemblyAndConnectToServer("TfsInterop.Vs2012"); if (_tfsHelper == null) { Trace.WriteLine("fail to load the good interop assembly :("); } } }
public ListRemoteBranches(Globals globals, TextWriter stdout, ITfsHelper tfsHelper, RemoteOptions remoteOptions) { this.globals = globals; this.stdout = stdout; this.tfsHelper = tfsHelper; this.remoteOptions = remoteOptions; }
public Create(ITfsHelper tfsHelper, Clone clone, RemoteOptions remoteOptions, TextWriter stdout) { _stdout = stdout; _tfsHelper = tfsHelper; _clone = clone; _remoteOptions = remoteOptions; }
public TfsChangeset(ITfsHelper tfs, IChangeset changeset, TextWriter stdout, AuthorsFile authors) { _tfs = tfs; _changeset = changeset; _stdout = stdout; _authors = authors; }
public Create(ITfsHelper tfsHelper, Clone clone, RemoteOptions remoteOptions, TextWriter stdout) { _stdout = stdout; _tfsHelper = tfsHelper; _clone = clone; _remoteOptions = remoteOptions; }
public void Initialize(IBuildServerWatcher buildServerWatcher, ISettingsSource config, Func <string, bool> isCommitInRevisionGrid) { if (_buildServerWatcher != null) { throw new InvalidOperationException("Already initialized"); } _buildServerWatcher = buildServerWatcher; _tfsServer = config.GetString("TfsServer", null); _tfsTeamCollectionName = config.GetString("TfsTeamCollectionName", null); _projectName = config.GetString("ProjectName", null); var tfsBuildDefinitionNameFilterSetting = config.GetString("TfsBuildDefinitionName", ""); if (!BuildServerSettingsHelper.IsRegexValid(tfsBuildDefinitionNameFilterSetting)) { return; } _tfsBuildDefinitionNameFilter = new Regex(tfsBuildDefinitionNameFilterSetting, RegexOptions.Compiled); if (!string.IsNullOrEmpty(_tfsServer) && !string.IsNullOrEmpty(_tfsTeamCollectionName) && !string.IsNullOrEmpty(_projectName)) { _tfsHelper = LoadAssemblyAndConnectToServer("TfsInterop.Vs2015") ?? LoadAssemblyAndConnectToServer("TfsInterop.Vs2013") ?? LoadAssemblyAndConnectToServer("TfsInterop.Vs2012"); if (_tfsHelper == null) { Trace.WriteLine("fail to load the good interop assembly :("); } } }
public void Initialize(IBuildServerWatcher buildServerWatcher, ISettingsSource config) { if (_buildServerWatcher != null) { throw new InvalidOperationException("Already initialized"); } _buildServerWatcher = buildServerWatcher; _tfsServer = config.GetString("TfsServer", null); _tfsTeamCollectionName = config.GetString("TfsTeamCollectionName", null); _projectName = config.GetString("ProjectName", null); _tfsBuildDefinitionName = config.GetString("TfsBuildDefinitionName", null); if (!string.IsNullOrEmpty(_tfsServer) && !string.IsNullOrEmpty(_tfsTeamCollectionName) && !string.IsNullOrEmpty(_projectName)) { _tfsHelper = LoadAssemblyAndConnectToServer("TfsInterop.Vs2013") ?? LoadAssemblyAndConnectToServer("TfsInterop.Vs2012"); if (_tfsHelper == null) { Trace.WriteLine("fail to load the good interop assembly :("); } } }
public TfsChangeset(ITfsHelper tfs, IChangeset changeset, TextWriter stdout, AuthorsFile authors) { _tfs = tfs; _changeset = changeset; _stdout = stdout; _authors = authors; }
public static BranchTree GetRootTfsBranchForRemotePath(this ITfsHelper tfs, string remoteTfsPath, bool searchExactPath = true) { var branches = tfs.GetBranches(); var branchTrees = branches.Aggregate(new Dictionary <string, BranchTree>(StringComparer.OrdinalIgnoreCase), (dict, branch) => dict.Tap(d => d.Add(branch.Path, new BranchTree(branch)))); foreach (var branch in branchTrees.Values) { if (!branch.IsRoot) { //in some strange cases there might be a branch which is not marked as IsRoot //but the parent for this branch is missing. if (branchTrees.ContainsKey(branch.ParentPath)) { branchTrees[branch.ParentPath].ChildBranches.Add(branch); } } } var roots = branchTrees.Values.Where(b => b.IsRoot); return(roots.FirstOrDefault(b => { var visitor = new BranchTreeContainsPathVisitor(remoteTfsPath, searchExactPath); b.AcceptVisitor(visitor); return visitor.Found; })); }
public static void WriteRemoteTfsBranchStructure(ITfsHelper tfsHelper, string tfsRepositoryPath, IEnumerable <IGitTfsRemote> tfsRemotes = null) { var root = tfsHelper.GetRootTfsBranchForRemotePath(tfsRepositoryPath); var visitor = new WriteBranchStructureTreeVisitor(tfsRepositoryPath, tfsRemotes); root.AcceptVisitor(visitor); }
public GitTfsRemote(RemoteOptions remoteOptions, Globals globals, ITfsHelper tfsHelper, TextWriter stdout) { this.remoteOptions = remoteOptions; this.globals = globals; this.stdout = stdout; Tfs = tfsHelper; }
public GitTfs(ITfsHelper tfsHelper, GitTfsCommandFactory commandFactory, IHelpHelper help, IContainer container, GitTfsCommandRunner runner) { this.tfsHelper = tfsHelper; this.commandFactory = commandFactory; _help = help; _container = container; _runner = runner; }
public GitTfs(ITfsHelper tfsHelper, GitTfsCommandFactory commandFactory, IHelpHelper help, IContainer container, GitTfsCommandRunner runner) { this.tfsHelper = tfsHelper; this.commandFactory = commandFactory; _help = help; _container = container; _runner = runner; }
public GlobalsTests() { _gitRepositoryMock = new Mock <IGitRepository>(); _globals = new Globals { Bootstrapper = null, Repository = _gitRepositoryMock.Object }; _tfsHelper = new Mock <ITfsHelper>().Object; }
public GitTfsRemote(RemoteOptions remoteOptions, Globals globals, ITfsHelper tfsHelper, TextWriter stdout) { this.remoteOptions = remoteOptions; this.globals = globals; this.stdout = stdout; Tfs = tfsHelper; _failTracker = new TfsFailTracker(); }
public TfsChangeset(ITfsHelper tfs, IChangeset changeset, AuthorsFile authors, string cutPath, bool cutPathForce) { _tfs = tfs; _changeset = changeset; _authors = authors; _cutPath = cutPath; _cutPathForce = cutPathForce; BaseChangesetId = _changeset.Changes.Max(c => c.Item.ChangesetId) - 1; }
public void Policy_failed_and_Force_without_an_OverrideReason() { var logger = new StringWriter(); Trace.Listeners.Add(new TextWriterTraceListener(logger)); IWorkspace workspace = MockRepository.GenerateStub <IWorkspace>(); string localDirectory = string.Empty; TfsChangesetInfo contextVersion = MockRepository.GenerateStub <TfsChangesetInfo>(); IGitTfsRemote remote = MockRepository.GenerateStub <IGitTfsRemote>(); remote.Repository = MockRepository.GenerateStub <IGitRepository>(); CheckinOptions checkinOptions = new CheckinOptions(); ITfsHelper tfsHelper = MockRepository.GenerateStub <ITfsHelper>(); CheckinPolicyEvaluator policyEvaluator = new CheckinPolicyEvaluator(); TfsWorkspace tfsWorkspace = new TfsWorkspace(workspace, localDirectory, contextVersion, remote, checkinOptions, tfsHelper, policyEvaluator); IPendingChange pendingChange = MockRepository.GenerateStub <IPendingChange>(); IPendingChange[] allPendingChanges = new IPendingChange[] { pendingChange }; workspace.Stub(w => w.GetPendingChanges()).Return(allPendingChanges); ICheckinEvaluationResult checkinEvaluationResult = new StubbedCheckinEvaluationResult() .WithPoilicyFailure("No work items associated."); checkinOptions.Force = true; workspace.Stub(w => w.EvaluateCheckin( Arg <TfsCheckinEvaluationOptions> .Is.Anything, Arg <IPendingChange[]> .Is.Anything, Arg <IPendingChange[]> .Is.Anything, Arg <string> .Is.Anything, Arg <string> .Is.Anything, Arg <ICheckinNote> .Is.Anything, Arg <IEnumerable <IWorkItemCheckinInfo> > .Is.Anything)) .Return(checkinEvaluationResult); workspace.Expect(w => w.Checkin( Arg <IPendingChange[]> .Is.Anything, Arg <string> .Is.Anything, Arg <string> .Is.Anything, Arg <ICheckinNote> .Is.Anything, Arg <IEnumerable <IWorkItemCheckinInfo> > .Is.Anything, Arg <TfsPolicyOverrideInfo> .Is.Anything, Arg <bool> .Is.Anything)) .Return(0); var ex = Assert.Throws <GitTfsException>(() => { var result = tfsWorkspace.Checkin(checkinOptions); }); Assert.Equal("A reason must be supplied (-f REASON) to override the policy violations.", ex.Message); Assert.Contains("[ERROR] Policy: No work items associated.", logger.ToString()); }
public GitTfs(ITfsHelper tfsHelper, GitTfsCommandFactory commandFactory, IHelpHelper help, IContainer container, IGitTfsVersionProvider gitTfsVersionProvider, GitTfsCommandRunner runner, Globals globals) { this.tfsHelper = tfsHelper; this.commandFactory = commandFactory; _help = help; _container = container; _gitTfsVersionProvider = gitTfsVersionProvider; _runner = runner; _globals = globals; }
public TfsWorkspace(IWorkspace workspace, string localDirectory, TextWriter stdout, TfsChangesetInfo contextVersion, IGitTfsRemote remote, CheckinOptions checkinOptions, ITfsHelper tfsHelper) { _workspace = workspace; _contextVersion = contextVersion; _remote = remote; _checkinOptions = checkinOptions; _tfsHelper = tfsHelper; _localDirectory = localDirectory; _stdout = stdout; }
public GitTfs(ITfsHelper tfsHelper, GitTfsCommandFactory commandFactory, IHelpHelper help, IContainer container, IGitTfsVersionProvider gitTfsVersionProvider, GitTfsCommandRunner runner, Globals globals) { this.tfsHelper = tfsHelper; this.commandFactory = commandFactory; _help = help; _container = container; _gitTfsVersionProvider = gitTfsVersionProvider; _runner = runner; _globals = globals; }
public TfsWorkspace(IWorkspace workspace, string localDirectory, TextWriter stdout, TfsChangesetInfo contextVersion, IGitTfsRemote remote, CheckinOptions checkinOptions, ITfsHelper tfsHelper, CheckinPolicyEvaluator policyEvaluator) { _workspace = workspace; _policyEvaluator = policyEvaluator; _contextVersion = contextVersion; _remote = remote; _checkinOptions = checkinOptions; _tfsHelper = tfsHelper; _localDirectory = localDirectory; _stdout = stdout; }
public TfsWorkspace(IWorkspace workspace, string localDirectory, TfsChangesetInfo contextVersion, IGitTfsRemote remote, CheckinOptions checkinOptions, ITfsHelper tfsHelper, CheckinPolicyEvaluator policyEvaluator) { _workspace = workspace; _policyEvaluator = policyEvaluator; _contextVersion = contextVersion; _checkinOptions = checkinOptions; _tfsHelper = tfsHelper; _localDirectory = remote.Repository.IsBare ? Path.GetFullPath(localDirectory) : localDirectory; Remote = remote; }
public static void WriteRemoteTfsBranchStructure(ITfsHelper tfsHelper, TextWriter writer, string tfsRepositoryPath, IEnumerable <IGitTfsRemote> tfsRemotes = null) { var root = tfsHelper.GetRootTfsBranchForRemotePath(tfsRepositoryPath); if (!tfsHelper.CanGetBranchInformation) { throw new GitTfsException("error: this version of TFS doesn't support this functionality"); } var visitor = new WriteBranchStructureTreeVisitor(tfsRepositoryPath, writer, tfsRemotes); root.AcceptVisitor(visitor); }
public GitTfsRemote(RemoteOptions remoteOptions, Globals globals, ITfsHelper tfsHelper, TextWriter stdout) { this.remoteOptions = remoteOptions; this.globals = globals; this.stdout = stdout; Tfs = tfsHelper; if (!string.IsNullOrEmpty(globals.Username) && !string.IsNullOrEmpty(globals.Password)) { Tfs.Credentials = new NetworkCredential(globals.Username, globals.Password); } }
public GitTfs(ITfsHelper tfsHelper, GitTfsCommandFactory commandFactory, IHelpHelper help, IContainer container, IGitTfsVersionProvider gitTfsVersionProvider, GitTfsCommandRunner runner, Globals globals, TextWriter stdout, Bootstrapper bootstrapper) { this.tfsHelper = tfsHelper; this.commandFactory = commandFactory; _help = help; _container = container; _gitTfsVersionProvider = gitTfsVersionProvider; _runner = runner; _globals = globals; _stdout = stdout; _bootstrapper = bootstrapper; }
public GitTfs(ITfsHelper tfsHelper, GitTfsCommandFactory commandFactory, IHelpHelper help, IContainer container, IGitTfsVersionProvider gitTfsVersionProvider, GitTfsCommandRunner runner, Globals globals, TextWriter stdout, Bootstrapper bootstrapper) { this.tfsHelper = tfsHelper; this.commandFactory = commandFactory; _help = help; _container = container; _gitTfsVersionProvider = gitTfsVersionProvider; _runner = runner; _globals = globals; _stdout = stdout; _bootstrapper = bootstrapper; }
public void Policy_failed_and_Force_with_an_OverrideReason() { IWorkspace workspace = MockRepository.GenerateStub <IWorkspace>(); string localDirectory = string.Empty; TextWriter writer = new StringWriter(); TfsChangesetInfo contextVersion = MockRepository.GenerateStub <TfsChangesetInfo>(); IGitTfsRemote remote = MockRepository.GenerateStub <IGitTfsRemote>(); remote.Repository = MockRepository.GenerateStub <IGitRepository>(); CheckinOptions checkinOptions = new CheckinOptions(); ITfsHelper tfsHelper = MockRepository.GenerateStub <ITfsHelper>(); CheckinPolicyEvaluator policyEvaluator = new CheckinPolicyEvaluator(); TfsWorkspace tfsWorkspace = new TfsWorkspace(workspace, localDirectory, writer, contextVersion, remote, checkinOptions, tfsHelper, policyEvaluator); IPendingChange pendingChange = MockRepository.GenerateStub <IPendingChange>(); IPendingChange[] allPendingChanges = new IPendingChange[] { pendingChange }; workspace.Stub(w => w.GetPendingChanges()).Return(allPendingChanges); ICheckinEvaluationResult checkinEvaluationResult = new StubbedCheckinEvaluationResult() .WithPoilicyFailure("No work items associated."); checkinOptions.Force = true; checkinOptions.OverrideReason = "no work items"; workspace.Stub(w => w.EvaluateCheckin( Arg <TfsCheckinEvaluationOptions> .Is.Anything, Arg <IPendingChange[]> .Is.Anything, Arg <IPendingChange[]> .Is.Anything, Arg <string> .Is.Anything, Arg <string> .Is.Anything, Arg <ICheckinNote> .Is.Anything, Arg <IEnumerable <IWorkItemCheckinInfo> > .Is.Anything)) .Return(checkinEvaluationResult); workspace.Expect(w => w.Checkin( Arg <IPendingChange[]> .Is.Anything, Arg <string> .Is.Anything, Arg <string> .Is.Anything, Arg <ICheckinNote> .Is.Anything, Arg <IEnumerable <IWorkItemCheckinInfo> > .Is.Anything, Arg <TfsPolicyOverrideInfo> .Is.Anything, Arg <bool> .Is.Anything)) .Return(1); var result = tfsWorkspace.Checkin(checkinOptions); Assert.Contains("[OVERRIDDEN] Policy: No work items associated.", writer.ToString()); }
public void Checkin_failed() { IWorkspace workspace = MockRepository.GenerateStub <IWorkspace>(); string localDirectory = string.Empty; TextWriter writer = new StringWriter(); TfsChangesetInfo contextVersion = MockRepository.GenerateStub <TfsChangesetInfo>(); IGitTfsRemote remote = MockRepository.GenerateStub <IGitTfsRemote>(); remote.Repository = MockRepository.GenerateStub <IGitRepository>(); CheckinOptions checkinOptions = new CheckinOptions(); ITfsHelper tfsHelper = MockRepository.GenerateStub <ITfsHelper>(); CheckinPolicyEvaluator policyEvaluator = new CheckinPolicyEvaluator(); TfsWorkspace tfsWorkspace = new TfsWorkspace(workspace, localDirectory, writer, contextVersion, remote, checkinOptions, tfsHelper, policyEvaluator); IPendingChange pendingChange = MockRepository.GenerateStub <IPendingChange>(); IPendingChange[] allPendingChanges = new IPendingChange[] { pendingChange }; workspace.Stub(w => w.GetPendingChanges()).Return(allPendingChanges); ICheckinEvaluationResult checkinEvaluationResult = new StubbedCheckinEvaluationResult(); workspace.Stub(w => w.EvaluateCheckin( Arg <TfsCheckinEvaluationOptions> .Is.Anything, Arg <IPendingChange[]> .Is.Anything, Arg <IPendingChange[]> .Is.Anything, Arg <string> .Is.Anything, Arg <string> .Is.Anything, Arg <ICheckinNote> .Is.Anything, Arg <IEnumerable <IWorkItemCheckinInfo> > .Is.Anything)) .Return(checkinEvaluationResult); workspace.Expect(w => w.Checkin( Arg <IPendingChange[]> .Is.Anything, Arg <string> .Is.Anything, Arg <string> .Is.Anything, Arg <ICheckinNote> .Is.Anything, Arg <IEnumerable <IWorkItemCheckinInfo> > .Is.Anything, Arg <TfsPolicyOverrideInfo> .Is.Anything, Arg <bool> .Is.Anything)) .Return(0); var ex = Assert.Throws <GitTfsException>(() => { var result = tfsWorkspace.Checkin(checkinOptions); }); Assert.Equal("Checkin failed!", ex.Message); }
public GitTfsRemote(RemoteInfo info, IGitRepository repository, RemoteOptions remoteOptions, Globals globals, ITfsHelper tfsHelper, TextWriter stdout) { this.remoteOptions = remoteOptions; this.globals = globals; this.stdout = stdout; Tfs = tfsHelper; Repository = repository; Id = info.Id; TfsUrl = info.Url; TfsRepositoryPath = info.Repository; TfsUsername = info.Username; TfsPassword = info.Password; Aliases = (info.Aliases ?? Enumerable.Empty <string>()).ToArray(); IgnoreRegexExpression = info.IgnoreRegex; Autotag = info.Autotag; }
public GitTfsRemote(RemoteInfo info, IGitRepository repository, RemoteOptions remoteOptions, Globals globals, ITfsHelper tfsHelper, TextWriter stdout) { this.remoteOptions = remoteOptions; this.globals = globals; this.stdout = stdout; Tfs = tfsHelper; Repository = repository; Id = info.Id; TfsUrl = info.Url; TfsRepositoryPath = info.Repository; TfsUsername = info.Username; TfsPassword = info.Password; Aliases = (info.Aliases ?? Enumerable.Empty<string>()).ToArray(); IgnoreRegexExpression = info.IgnoreRegex; Autotag = info.Autotag; }
public void Nothing_to_checkin() { IWorkspace workspace = MockRepository.GenerateStub <IWorkspace>(); string localDirectory = string.Empty; TextWriter writer = new StringWriter(); TfsChangesetInfo contextVersion = MockRepository.GenerateStub <TfsChangesetInfo>(); IGitTfsRemote remote = MockRepository.GenerateStub <IGitTfsRemote>(); CheckinOptions checkinOptions = new CheckinOptions(); ITfsHelper tfsHelper = MockRepository.GenerateStub <ITfsHelper>(); CheckinPolicyEvaluator policyEvaluator = new CheckinPolicyEvaluator(); TfsWorkspace tfsWorkspace = new TfsWorkspace(workspace, localDirectory, writer, contextVersion, remote, checkinOptions, tfsHelper, policyEvaluator); workspace.Stub(w => w.GetPendingChanges()).Return(null); var ex = Assert.Throws <GitTfsException>(() => { var result = tfsWorkspace.Checkin(checkinOptions); }); Assert.Equal("Nothing to checkin!", ex.Message); }
public GitTfsRemote(RemoteInfo info, IGitRepository repository, RemoteOptions remoteOptions, Globals globals, ITfsHelper tfsHelper, ConfigProperties properties) { _remoteOptions = remoteOptions; _globals = globals; _properties = properties; Tfs = tfsHelper; Repository = repository; RemoteInfo = info; Id = info.Id; TfsUrl = info.Url; TfsRepositoryPath = info.Repository; TfsUsername = info.Username; TfsPassword = info.Password; Aliases = (info.Aliases ?? Enumerable.Empty <string>()).ToArray(); IgnoreRegexExpression = info.IgnoreRegex; IgnoreExceptRegexExpression = info.IgnoreExceptRegex; Autotag = info.Autotag; IsSubtree = CheckSubtree(); }
public GitTfsRemote(RemoteInfo info, IGitRepository repository, RemoteOptions remoteOptions, Globals globals, ITfsHelper tfsHelper, ConfigProperties properties) { _remoteOptions = remoteOptions; _globals = globals; _properties = properties; Tfs = tfsHelper; Repository = repository; RemoteInfo = info; Id = info.Id; TfsUrl = info.Url; TfsRepositoryPath = info.Repository; TfsUsername = info.Username; TfsPassword = info.Password; Aliases = (info.Aliases ?? Enumerable.Empty<string>()).ToArray(); IgnoreRegexExpression = info.IgnoreRegex; IgnoreExceptRegexExpression = info.IgnoreExceptRegex; Autotag = info.Autotag; IsSubtree = CheckSubtree(); }
public TreeVerifier(ITfsHelper tfs) { _tfs = tfs; }
public Create(ITfsHelper tfsHelper, Clone clone, RemoteOptions remoteOptions) { _tfsHelper = tfsHelper; _clone = clone; _remoteOptions = remoteOptions; }
public GitTfsVersionProvider(ITfsHelper tfsHelper) { this.tfsHelper = tfsHelper; }
public GitTfsVersionProvider(ITfsHelper tfsHelper) { this.tfsHelper = tfsHelper; }
public ListRemoteBranches(ITfsHelper tfsHelper, RemoteOptions remoteOptions) { _tfsHelper = tfsHelper; _remoteOptions = remoteOptions; }
public static void WriteRemoteTfsBranchStructure(ITfsHelper tfsHelper, TextWriter writer, string tfsRepositoryPath, IEnumerable<IGitTfsRemote> tfsRemotes = null) { var root = tfsHelper.GetRootTfsBranchForRemotePath(tfsRepositoryPath); if (!tfsHelper.CanGetBranchInformation) { throw new GitTfsException("error: this version of TFS doesn't support this functionality"); } var visitor = new WriteBranchStructureTreeVisitor(tfsRepositoryPath, writer, tfsRemotes); root.AcceptVisitor(visitor); }
public TreeVerifier(TextWriter stdout, ITfsHelper tfs) { _stdout = stdout; _tfs = tfs; }
public TfsChangeset(ITfsHelper tfs, IChangeset changeset, TextWriter stdout) { _tfs = tfs; _changeset = changeset; _stdout = stdout; }
public GitTfs(ITfsHelper tfsHelper) { this.tfsHelper = tfsHelper; }
public ListRemoteBranches(ITfsHelper tfsHelper, RemoteOptions remoteOptions) { _tfsHelper = tfsHelper; _remoteOptions = remoteOptions; }
/// <summary>Find the root branch that match the path given in <paramref name="remoteTfsPath" />.</summary> /// <param name="tfs">The <see cref="ITfsHelper" /> to use.</param> /// <param name="remoteTfsPath">The TFS path to search for.</param> /// <param name="searchExactPath">If <paramref name="remoteTfsPath" /> must match exact, or if it is ok if /// <paramref name="remoteTfsPath" /> is a part of the path.</param> /// <returns>The root branch that match the search criteria or null if nothing was found.</returns> /// <remarks> /// If the root branch matching the search criteria was not found, it try to search by all deleted branches to. /// This can usable if the user want to clone a deleted branch. /// </remarks> public static BranchTree GetRootTfsBranchForRemotePath(this ITfsHelper tfs, string remoteTfsPath, bool searchExactPath = true) => GetRootTfsBranchForRemotePath(tfs, remoteTfsPath, searchExactPath, false) ?? GetRootTfsBranchForRemotePath(tfs, remoteTfsPath, searchExactPath, true);
public ListRemoteBranches(Globals globals, ITfsHelper tfsHelper, RemoteOptions remoteOptions) { this.globals = globals; this.tfsHelper = tfsHelper; this.remoteOptions = remoteOptions; }
public TreeVerifier(TextWriter stdout, ITfsHelper tfs) { _stdout = stdout; _tfs = tfs; }
public TfsChangeset(ITfsHelper tfs, IChangeset changeset) { this.tfs = tfs; this.changeset = changeset; }
public Authors(Globals globals, ITfsHelper tfs) { globals.GcCountdown = globals.GcPeriod; _tfs = tfs; }