Our TFS instance recently changed URL and without this change it is required to filter-branch entire repository and change every git-tfs-id line in comments just to make git-tfs stop going to old URL to check. With it one should just keep config section for old branch and change the very last commit's comment (for each TFS branch). Also theoretically should save some time if several TFS instances are used as only specified with -i option is authenticated against.
The original code would null out currentCommit after parsing the FIRST changeset id in the
log message, and associate the null commit hash with any additional changeset ids in the message
for the same commit. This eventually leads to a null reference error when executing git commands
that require the hash.
The new code ignores all of the changeset ids in the commit message except for the last one, which
is the only one that matters.
Created tests for comparing the tfs url, legacy urls and
the repository path with mixed case when calling git tfs fetch or
git tfs pull. Used libgit2sharp to count the commits before and after.
Added support for running commands from the project directory (git
tfs clone is called from outside the project directory).
Moving logic from TfsHelper.Common and GitRepository into GitTfsRemote.
Easier to test as TfsHelper is tightly connected to Tfs and GitRepository is
difficult to test directly. Added tests for GitTfsRemote.
Synthaxe is similar to 'fetch' command with '-i' and '--all' options...
+ Add an option `--with-labels` to the 'fetch' command to get TFS labels when fetching TFS changesets
Conflicts:
GitTfsTest/Core/GitChangeInfoTests.cs
GitTfsTest/Integration/CloneTests.cs
GitTfsTest/Integration/IntegrationHelper.cs
Conflicts were because extra unit tests were added and existing unit
tests were changed in the unicode branch, and this was done before
the move to xUnit.
Compiled for TFS Server 2008, 2010, 2012 and tested with TFS Server 2010, 2012
!! This command need that the clone of the TFS repository was made from the trunk (and not on the whole repository) and with history (not a quick-clone).
Usage for TFS 2010 and 2012 :
-------------------------------
* to clone one branch
git tfs init-branch $/Repository/path <git-branch-name-wished>
ex :
git tfs init-branch $/Repository/ProjectBranch
git tfs init-branch $/Repository/ProjectBranch myNewBranch
* to clone all branches
git tfs init-branch --all
Usage for TFS 2008 :
---------------------
* to clone one branch
git tfs init-branch--parent-branch=$/Repository/ProjectParentBranch $/Repository/path <git-branch-name-wished>
ex :
git tfs init-branch --parent-branch=$/Repository/ProjectParentBranch $/Repository/ProjectBranch
git tfs init-branch --parent-branch=$/Repository/ProjectParentBranch $/Repository/ProjectBranch myNewBranch
The problems caused by TFS changesets that differ in case from existing tree entries have already been solved by TfsChangeset.UpdateToMatchExtantCasing(), except when LibGit2Sharp returns tree entries with backslashes instead of forward slashes, which causes TfsChangeset.UpdateToMatchExtantCasing() to miss the existing entries.
When -z has been given, diff-tree does not munge pathnames and uses
NULs as output field terminators. This allows for secure parsing of
the output.
Quoted paths were not correctly interpreted as UTF-8. This avoids the
problem by not having quoted paths.