Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion GitTfs.VsCommon/TfsHelper.PostVs2010.Common.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ public override int GetRootChangesetForBranch(string tfsPathBranchToCreate, stri
new ItemIdentifier(tfsPathBranchToCreate),
new ItemIdentifier[] {new ItemIdentifier(tfsPathParentBranch),}, null);

var lastChangesetsMergeFromParentBranch = mergedItemsToFirstChangesetInBranchToCreate.LastOrDefault();
// Find the last changeset that was created before the first one in the new branch to be created.
var lastChangesetsMergeFromParentBranch = mergedItemsToFirstChangesetInBranchToCreate.LastOrDefault(
e => e.SourceChangeset.ChangesetId < firstChangesetInBranchToCreate.ChangesetId);

if (lastChangesetsMergeFromParentBranch == null)
{
Expand Down
2 changes: 1 addition & 1 deletion GitTfs/Commands/InitBranch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ public int CreateBranch(IGitTfsRemote defaultRemote, string tfsRepositoryPath, I
string sha1RootCommit = _globals.Repository.FindCommitHashByCommitMessage("git-tfs-id: .*;C" + rootChangeSetId + "[^0-9]");
//sha1RootCommit = _globals.Repository.FindCommitByCommitMessage("git-tfs-id: .*\\$\\/" + tfsProject + "\\/.*;C" + rootChangeSetId + "[^0-9]");
if (string.IsNullOrWhiteSpace(sha1RootCommit))
throw new GitTfsException("error: The root changeset " + rootChangeSetId + " have not be found in the Git repository. The branch containing the changeset should not have been created. Please do it before retrying!!\n");
throw new GitTfsException("error: The root changeset " + rootChangeSetId + " was not found in the Git repository. The branch containing the changeset has not been created. Please create it before retrying!\n");
Trace.WriteLine("Commit found! sha1 : " + sha1RootCommit);

Trace.WriteLine("Try creating remote...");
Expand Down
6 changes: 4 additions & 2 deletions GitTfs/Core/RemoteConfigConverter.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using LibGit2Sharp;

namespace Sep.Git.Tfs.Core
Expand All @@ -14,8 +15,9 @@ public IEnumerable<RemoteInfo> Load(IEnumerable<ConfigurationEntry> config)
var keyParts = entry.Key.Split('.');
if (keyParts.Length == 3 && keyParts[0] == "tfs-remote")
{
var id = keyParts[1];
var key = keyParts[2];
// The branch name may contain dots ("maint-1.0.0") which must be considered since split on "."
var id = string.Join(".", keyParts, 1, keyParts.Length - 2);
var key = keyParts.Last();
var remote = remotes.GetOrAdd(id);
remote.Id = id;
if (key == "url")
Expand Down