public GitTfsRemote(RemoteOptions remoteOptions, Globals globals, ITfsHelper tfsHelper, TextWriter stdout) { this.remoteOptions = remoteOptions; this.globals = globals; this.stdout = stdout; Tfs = tfsHelper; }
public Bootstrap(RemoteOptions remoteOptions, Globals globals, TextWriter stdout, Bootstrapper bootstrapper) { _remoteOptions = remoteOptions; _globals = globals; _stdout = stdout; _bootstrapper = bootstrapper; }
public Subtree(Fetch fetch, QuickFetch quickFetch, Globals globals, RemoteOptions remoteOptions) { _fetch = fetch; _quickFetch = quickFetch; _globals = globals; _remoteOptions = remoteOptions; }
public Fetch(Globals globals, RemoteOptions remoteOptions, AuthorsFile authors, Labels labels) { this.remoteOptions = remoteOptions; this.globals = globals; this.authors = authors; this.labels = labels; }
public Create(ITfsHelper tfsHelper, Clone clone, RemoteOptions remoteOptions, TextWriter stdout) { _stdout = stdout; _tfsHelper = tfsHelper; _clone = clone; _remoteOptions = remoteOptions; }
public ListRemoteBranches(Globals globals, TextWriter stdout, ITfsHelper tfsHelper, RemoteOptions remoteOptions) { this.globals = globals; this.stdout = stdout; this.tfsHelper = tfsHelper; this.remoteOptions = remoteOptions; }
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 Init(RemoteOptions remoteOptions, InitOptions initOptions, Globals globals, TextWriter output, IGitHelpers gitHelper) { this.remoteOptions = remoteOptions; this.gitHelper = gitHelper; this.output = output; this.globals = globals; this.initOptions = initOptions; }
public Fetch(Globals globals, TextWriter stdout, RemoteOptions remoteOptions, AuthorsFile authors, Labels labels) { this.globals = globals; this.stdout = stdout; this.remoteOptions = remoteOptions; this.authors = authors; this.labels = labels; }
public Subtree(TextWriter stdout, Fetch fetch, QuickFetch quickFetch, Globals globals, RemoteOptions remoteOptions) { this._stdout = stdout; this._fetch = fetch; this._quickFetch = quickFetch; this._globals = globals; this._remoteOptions = remoteOptions; }
public Fetch(Globals globals, ConfigProperties properties, RemoteOptions remoteOptions, Labels labels) { _globals = globals; _properties = properties; _remoteOptions = remoteOptions; _labels = labels; upToChangeSet = -1; BranchStrategy = BranchStrategy = BranchStrategy.Auto; }
public Fetch(Globals globals, ConfigProperties properties, TextWriter stdout, RemoteOptions remoteOptions, AuthorsFile authors, Labels labels) { this.globals = globals; this.properties = properties; this.stdout = stdout; this.remoteOptions = remoteOptions; this.authors = authors; this.labels = labels; this.upToChangeSet = -1; }
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 CreateTfsRemote(string remoteId, string tfsUrl, string tfsRepositoryPath, RemoteOptions remoteOptions) { if (HasRemote(remoteId)) throw new GitTfsException("A remote with id \"" + remoteId + "\" already exists."); SetTfsConfig(remoteId, "url", tfsUrl); SetTfsConfig(remoteId, "repository", tfsRepositoryPath); SetTfsConfig(remoteId, "fetch", "refs/remotes/" + remoteId + "/master"); if (remoteOptions != null) { if (remoteOptions.NoMetaData) SetTfsConfig(remoteId, "no-meta-data", 1); if (remoteOptions.IgnoreRegex != null) SetTfsConfig(remoteId, "ignore-paths", remoteOptions.IgnoreRegex); } Directory.CreateDirectory(Path.Combine(this.GitDir, "tfs")); _cachedRemotes = null; }
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 QuickFetch(Globals globals, TextWriter stdout, RemoteOptions remoteOptions, AuthorsFile authors) : base(globals, stdout, remoteOptions, authors, null) { }
public ListRemoteBranches(ITfsHelper tfsHelper, RemoteOptions remoteOptions) { _tfsHelper = tfsHelper; _remoteOptions = remoteOptions; }
private IGitTfsRemote InitTfsBranch(RemoteOptions remoteOptions, string tfsRepositoryPath, int rootChangesetId = -1, bool fetchParentBranch = false, string gitBranchNameExpected = null, IRenameResult renameResult = null) { Trace.WriteLine("Begin process of creating branch for remote :" + tfsRepositoryPath); // TFS string representations of repository paths do not end in trailing slashes tfsRepositoryPath = (tfsRepositoryPath ?? string.Empty).TrimEnd('/'); string gitBranchName = ExtractGitBranchNameFromTfsRepositoryPath( string.IsNullOrWhiteSpace(gitBranchNameExpected) ? tfsRepositoryPath : gitBranchNameExpected); if (string.IsNullOrWhiteSpace(gitBranchName)) throw new GitTfsException("error: The Git branch name '" + gitBranchName + "' is not valid...\n"); Trace.WriteLine("Git local branch will be :" + gitBranchName); string sha1RootCommit = null; if (rootChangesetId != -1) { sha1RootCommit = Repository.FindCommitHashByChangesetId(rootChangesetId); if (fetchParentBranch && string.IsNullOrWhiteSpace(sha1RootCommit)) sha1RootCommit = FindRootRemoteAndFetch(rootChangesetId, renameResult); if (string.IsNullOrWhiteSpace(sha1RootCommit)) return null; Trace.WriteLine("Found commit " + sha1RootCommit + " for changeset :" + rootChangesetId); } IGitTfsRemote tfsRemote; if (Repository.HasRemote(gitBranchName)) { Trace.WriteLine("Remote already exist"); tfsRemote = Repository.ReadTfsRemote(gitBranchName); if (tfsRemote.TfsUrl != TfsUrl) Trace.WriteLine("warning: Url is different"); if (tfsRemote.TfsRepositoryPath != tfsRepositoryPath) Trace.WriteLine("warning: TFS repository path is different"); } else { Trace.WriteLine("Try creating remote..."); tfsRemote = Repository.CreateTfsRemote(new RemoteInfo { Id = gitBranchName, Url = TfsUrl, Repository = tfsRepositoryPath, RemoteOptions = remoteOptions }, string.Empty); } if (sha1RootCommit != null && !Repository.HasRef(tfsRemote.RemoteRef)) { if (!Repository.CreateBranch(tfsRemote.RemoteRef, sha1RootCommit)) throw new GitTfsException("error: Fail to create remote branch ref file!"); } Trace.WriteLine("Remote created!"); return tfsRemote; }
public QuickFetch(Globals globals, RemoteOptions remoteOptions, AuthorsFile authors) : base(globals, remoteOptions, authors, null) { }
public IGitTfsRemote InitBranch(RemoteOptions remoteOptions, string tfsRepositoryPath, int shaRootChangesetId, bool fetchParentBranch, string gitBranchNameExpected = null, IRenameResult renameResult = null) { throw new NotImplementedException(); }
public Bootstrap(RemoteOptions remoteOptions, Globals globals, TextWriter stdout) { _remoteOptions = remoteOptions; _globals = globals; _stdout = stdout; }
public Bootstrap(RemoteOptions remoteOptions, Globals globals, Bootstrapper bootstrapper) { _remoteOptions = remoteOptions; _globals = globals; _bootstrapper = bootstrapper; }
public Init(RemoteOptions remoteOptions, InitOptions initOptions, Globals globals, IGitHelpers gitHelper) { _remoteOptions = remoteOptions; _gitHelper = gitHelper; _globals = globals; _initOptions = initOptions; }
public Bootstrapper(Globals globals, RemoteOptions remoteOptions) { _globals = globals; _remoteOptions = remoteOptions; }
public Fetch(Globals globals, ConfigProperties properties, TextWriter stdout, RemoteOptions remoteOptions, AuthorsFile authors, Labels labels) { this.globals = globals; this.properties = properties; this.stdout = stdout; this.remoteOptions = remoteOptions; this.authors = authors; this.labels = labels; }
public QuickFetch(Globals globals, ConfigProperties properties, RemoteOptions remoteOptions, AuthorsFile authors) : base(globals, properties, remoteOptions, authors, null) { _properties = properties; }
public void CreateTfsRemote(string remoteId, TfsChangesetInfo tfsHead, RemoteOptions remoteOptions) { CreateTfsRemote(remoteId, tfsHead.Remote.TfsUrl, tfsHead.Remote.TfsRepositoryPath, remoteOptions); ReadTfsRemote(remoteId).UpdateRef(tfsHead.GitCommit, tfsHead.ChangesetId); }
private IGitTfsRemote InitFromDefaultRemote() { IGitTfsRemote defaultRemote; if (_globals.Repository.HasRemote(GitTfsConstants.DefaultRepositoryId)) defaultRemote = _globals.Repository.ReadTfsRemote(GitTfsConstants.DefaultRepositoryId); else defaultRemote = _globals.Repository.ReadAllTfsRemotes() .Where(x => x != null && x.RemoteInfo != null && !string.IsNullOrEmpty(x.RemoteInfo.Url)) .OrderBy(x => x.RemoteInfo.Url.Length).FirstOrDefault(); if (defaultRemote == null) throw new GitTfsException("error: No git-tfs repository found. Please try to clone first...\n"); _remoteOptions = new RemoteOptions(); if (!string.IsNullOrWhiteSpace(TfsUsername)) { _remoteOptions.Username = TfsUsername; _remoteOptions.Password = TfsPassword; } else { _remoteOptions.Username = defaultRemote.TfsUsername; _remoteOptions.Password = defaultRemote.TfsPassword; } if (IgnoreRegex != null) _remoteOptions.IgnoreRegex = IgnoreRegex; else _remoteOptions.IgnoreRegex = defaultRemote.IgnoreRegexExpression; if (ExceptRegex != null) _remoteOptions.ExceptRegex = ExceptRegex; else _remoteOptions.ExceptRegex = defaultRemote.IgnoreExceptRegexExpression; return defaultRemote; }
public Fetch(Globals globals, RemoteOptions remoteOptions, FcOptions fcOptions) { this.fcOptions = fcOptions; this.remoteOptions = remoteOptions; this.globals = globals; }
public Bootstrapper(Globals globals, TextWriter stdout, RemoteOptions remoteOptions) { _globals = globals; _stdout = stdout; _remoteOptions = remoteOptions; }
public Create(ITfsHelper tfsHelper, Clone clone, RemoteOptions remoteOptions) { _tfsHelper = tfsHelper; _clone = clone; _remoteOptions = remoteOptions; }
public IGitTfsRemote InitBranch(RemoteOptions remoteOptions, string tfsRepositoryPath, int rootChangesetId, bool fetchParentBranch, string gitBranchNameExpected = null, IRenameResult renameResult = null) { return InitTfsBranch(remoteOptions, tfsRepositoryPath, rootChangesetId, fetchParentBranch, gitBranchNameExpected, renameResult); }
public QuickFetch(Globals globals, RemoteOptions remoteOptions, FcOptions fcOptions) : base(globals, remoteOptions, fcOptions) { }
public ListRemoteBranches(Globals globals, ITfsHelper tfsHelper, RemoteOptions remoteOptions) { this.globals = globals; this.tfsHelper = tfsHelper; this.remoteOptions = remoteOptions; }
private IGitTfsRemote InitFromDefaultRemote() { var defaultRemote = _globals.Repository.ReadTfsRemote(GitTfsConstants.DefaultRepositoryId); if (defaultRemote == null) throw new GitTfsException("error: No git-tfs repository found. Please try to clone first...\n"); _remoteOptions = new RemoteOptions(); if (!string.IsNullOrWhiteSpace(TfsUsername)) { _remoteOptions.Username = TfsUsername; _remoteOptions.Password = TfsPassword; } else { _remoteOptions.Username = defaultRemote.TfsUsername; _remoteOptions.Password = defaultRemote.TfsPassword; } if (IgnoreRegex != null) _remoteOptions.IgnoreRegex = IgnoreRegex; else _remoteOptions.IgnoreRegex = defaultRemote.IgnoreRegexExpression; if (ExceptRegex != null) _remoteOptions.ExceptRegex = ExceptRegex; else _remoteOptions.ExceptRegex = defaultRemote.IgnoreExceptRegexExpression; _authors.Parse(AuthorsFilePath, _globals.GitDir); return defaultRemote; }
public Fetch(Globals globals, ConfigProperties properties, TextWriter stdout, RemoteOptions remoteOptions, AuthorsFile authors, Labels labels) { this.globals = globals; this.properties = properties; this.stdout = stdout; this.remoteOptions = remoteOptions; this.authors = authors; this.labels = labels; this.upToChangeSet = -1; BranchStrategy = BranchStrategy = BranchStrategy.Auto; }