Commit Graph

104 Commits

Author SHA1 Message Date
Philippe Miossec e30b5a5ab7 CreateTfsRemote() should return a GitTfsRemote authenticated 2013-01-12 21:31:16 +01:00
Matt Burke bee409ed42 Fallout from those merge conflicts. 2013-01-09 16:58:05 -05:00
Matt Burke d062991eff Merge branch 'master' into refactor-to-functional-core
Conflicts:
	GitTfs/Commands/Init.cs
	GitTfs/Core/GitRepository.cs
	GitTfs/Core/GitTfsRemote.cs
	GitTfsTest/Integration/CloneTests.cs
	GitTfsTest/Integration/IntegrationHelper.cs
2013-01-09 15:39:59 -05:00
Matt Burke d7cca94d4c Merge pull request #274. 2013-01-08 07:03:59 -05:00
Philippe Miossec f8972459aa Authenticate remotes on TFS only when needed
Prevent to authenticate all the remotes (which takes time) and is not needed for nearly all commands
2013-01-07 21:55:20 +01:00
Sean M. Collins 5f3c7ae5eb Merge pull request #276 from pmiossec/add_notes_for_workitems
Add a note on the commit to keep trace of the workitems
2013-01-07 12:21:24 -08:00
Philippe Miossec a2e3184c21 Remove call to git command to set config (use libgit2sharp instead) 2013-01-06 23:30:39 +01:00
Philippe Miossec b5fb9b5b5b Add a note on the commit to keep trace of the workitems
Manage workitems when fetching changesets with adding a note with the workitems
displaying Id, title and a link to the workitem
2013-01-04 13:38:46 +01:00
Daniel Lee 4784e99fde Add Fetch/Pull tests
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).
2013-01-03 00:49:58 +01:00
Daniel Lee 6e42acb54b Add method to compare Tfs url and Repo path to GitTfsRemote
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.
2013-01-02 23:54:36 +01:00
David Alpert 637569c424 trailing slashes are stripped from incoming TFS repository paths so that exact comparisons match properly. 2013-01-02 00:50:19 -06:00
Philippe Miossec 6577c3ca8d Look for remotes only in local config list! 2012-12-23 00:25:51 +01:00
Matt Burke 4d97b71542 Use a custom workspace, if desired. 2012-12-20 16:24:59 -05:00
Philippe Miossec 4d7e0f4125 Add a 'labels' command to get TFS labels of a branch
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
2012-12-15 13:45:04 +01:00
Kim Gybels f3325488fa Merge branch 'master' into unicode
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.
2012-12-09 18:29:24 +01:00
Matt Burke 2302a52b28 Use the ligit2 force. 2012-11-30 11:29:00 -05:00
Philippe Miossec 3bf9fa4fb5 init-branch : Update libgit2sharp to use IsValidName() 2012-11-22 19:08:40 +01:00
Philippe Miossec 5a5c7c3812 GitRepository : verify if _repository is null before disposing (it could happened...) 2012-11-19 22:03:59 +01:00
Philippe Miossec 3bd03ad60f init-branch : to manage TFS branches with '.' in their names (which is supported by Git but not by git-tfs at the moment!) 2012-11-19 22:03:59 +01:00
Philippe Miossec da5a6201a5 Creation of the command "init-branch" to manage the cloning of a TFS branch (or all) from a TFS Server (2010, 2012 and 2008 partly)
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
2012-11-19 22:03:42 +01:00
Ivan Korneliuk ed95fc1dc6 Normalize commit message line endings to CR+LF style.
This forces commit message to be shown correctly in TFS check-in dialog,
regardless of line endings specified in the original git commit message.
2012-10-23 09:50:59 +03:00
Sam Critchley c0d57b82ad removed an out of convention new line 2012-10-20 17:14:08 +11:00
Sam Critchley 28d7c0d2ff modified TfsCommitInfoRegex to be multiline and its now used to remove tfs ids from the result of GitRepository.GetCommitMessage 2012-10-20 17:10:04 +11:00
Matt Burke 6dd896eecd Unit tests for the configuration for a new tfs remote. 2012-10-16 13:53:13 -04:00
Matt Burke 455b5f2536 New config reader for tfs remotes. 2012-09-10 23:18:36 -04:00
Eldhuset, Ã…smund 3a1d996aad Making GitRepository.GetObjects() return file names with forward slashes.
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.
2012-08-16 20:43:48 +02:00
Kim Gybels 186a0184c2 Use -z option with git diff-tree.
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.
2012-08-11 19:22:56 +02:00
Sean M. Collins 9c994a4fdf Replace Git shell command with LibGit2Sharp tree operations 2012-06-07 15:33:18 -04:00
Sean M. Collins b0eb392cab Replace GitSharp FileMode with LibGit2Sharp.Mode 2012-05-31 15:00:52 -04:00
Sean M. Collins f72048b964 Replace GitSharp in GitCommit and GitTreeEntry
The paths returned from LibGit2Sharp are platform
dependent, while the paths returned from TFS are
URIs that use a forward slash.
2012-05-21 16:05:02 -04:00
Collins, Sean 890fa7a230 GitRepository.CopyBlob: Create parent directory
If the parent directory does not exist
2012-05-15 17:01:30 -04:00
Collins, Sean 6c663af109 Properly dispose Repository member. 2012-05-15 17:01:29 -04:00
Collins, Sean 82ae6e6f3d Replace GitSharp with LibGit2Sharp
Most of the functions use the LibGit2Sharp API, only
GetCommit remains, and that is tied to #142.
2012-05-15 16:59:08 -04:00
Collins, Sean 173001a836 Remove GetChangeSummary
It doesn't appear to be used anywhere.

Work for #144
2012-05-15 16:53:53 -04:00
Sean M. Collins 01293b3199 Refactor GetBlob
The name didn't really match what it does. Also, remove
the Copy function to save a function call.

This is part of the work required for #144
2012-05-15 16:53:52 -04:00
Sean M. Collins f8e7b1f22a Replace call to diff-index with call to LibGit2Sharp.Index
Work for #144
2012-05-15 16:53:52 -04:00
Sean M. Collins b208304afd Replace GitSharp.Core.ObjectWriter
Replace with libgit2sharp.Repository.ObjectDatabse
2012-05-15 16:53:51 -04:00
Sean M. Collins de251a0485 Import LibGit2Sharp
Switch to using LibGit2Sharp.Blob for Copy(), and begin adding
explicit references, so we can swap out parts of GitSharp with
LibGit2Sharp as we go.
2012-05-15 16:53:06 -04:00
Björgvin Ragnarsson 4dcfb0f141 Fix issue #159 2012-03-31 23:58:54 +00:00
Adam Rofer 1fe532edfa Fixes #104: Case sensitivity was off by default 2011-12-06 19:02:13 -08:00
ivan-danilov 2ad6909bec Revert "Changed Trace to Exception when git-log fails."
This commit breaks existing commands, for example clone.

This reverts commit 90c81ad583.
2011-10-14 01:54:26 +03:00
Richard Bogle 90c81ad583 Changed Trace to Exception when git-log fails. 2011-10-10 16:28:27 +01:00
Tuomas Järvensivu 8fc96a7ebe Fix commit regex used by FindTfsCommits to detect a commit from git log
FindTfsCommits failed in detecting Tfs commits when parsing a
revert commit.

For instance when parsing following git log report the Tfs commit finder
failed when parsing commit 027a14b24280ca3ba24e4c1e52411de35b944442.

Failure occurred when parsing the line
    This reverts commit e096daaf57d937fef3c0c639c3a59232310c6a20.
Old Regex("commit (" + GitTfsConstants.Sha1 + ")") failed by parsing this
as a start of a new commit.
Commit regex is tightened to Regex("^commit (" + Sha1 + ")\\s*$")

Added tests prove that the new Regex handles both commit topic lines
and revert commit subjects.

==================== Example git log report ====================
$ git log --no-color --pretty=medium HEAD
commit 8c7350acc9a1feffa9882badecc625129c9b8943
Merge: 027a14b fe03e90
Author: Tuomas J<C3><A4>rvensivu <tuomas.jarvensivu@reaktor.fi>
Date:   Sun Sep 11 22:16:46 2011 +0300

    Merge commit 'fe03e9009e46c4eb1b961578b201553eb59b11ed'

commit fe03e9009e46c4eb1b961578b201553eb59b11ed
Author: Tuomas J<C3><A4>rvensivu <tuomas.jarvensivu@reaktor.fi>
Date:   Sun Sep 11 22:02:48 2011 +0300

    Change on top of reverted commit

commit 027a14b24280ca3ba24e4c1e52411de35b944442
Merge: 2b9fe0c f3b25d8
Author: Administrator <WIN-R5AMS97DB6H\Administrator>
Date:   Sun Sep 11 18:50:31 2011 +0000

    Subject: Revert "This commit will be reverted."
    Author: Tuomas J<C7><CF>rvensivu tuomas.jarvensivu@reaktor.fi
    Date: Sun, 11 Sep 2011 21:45:01 +0300
    Git commit hash: d5e949694e8d1442921250e0df4fb38d314dce53

    This reverts commit e096daaf57d937fef3c0c639c3a59232310c6a20.

    git-tfs-id: [http://localhost:8888/tfs/GitTfsTestCollection]$/GitTfsTest;C9
==================== Example git log report ====================

Signed-off-by: Tuomas Järvensivu <tuomas.jarvensivu@reaktor.fi>
2011-09-28 11:25:50 +03:00
Matt Burke 8f41ca1a29 Provide a better error message for bad configuration values. 2011-08-05 00:29:12 -04:00
ivan-danilov eae86164d9 Merge pull request #72 from ivan-danilov/unshelve
Unshelve implementation
2011-08-04 05:58:19 -07:00
ivan-danilov 7d37e7742c tfs-remote.<id>.autotag option implemented. Defaults to false. 2011-08-04 03:25:32 +03:00
Matt Burke 37fb702606 Completed the unshelve spike. 2011-08-03 13:21:20 +03:00
ivan-danilov 59c491e570 Merge branch 'redundant-fetch' 2011-07-14 13:43:05 +03:00
Matt Burke b72160d4c6 Merge remote-tracking branch 'origin/master' 2011-07-14 00:08:25 -04:00
Matt Burke 50a7bfa2f0 Fix line endings. 2011-07-14 00:03:10 -04:00