165 Commits

Author SHA1 Message Date
dh2i-sam 16fa7a3c72 Fix handling of renamed branches for clone/fetch (#1493)
* In GitTfsRemote.FetchWithMerge(), apply special handling to initial
branch commits that are renaming, as rename destinations will have
these.
In GitTfsRemote.InitTfsRemoteOfChangeset(), when iterating over branch
ancestry, call InitBranch() on the ancestor branch, not the target
branch.  Also only request fetching of parents for the most distant
ancestor.  Also when handling renamed branches, assign the renameResult
for successors.
In GitTfsRemote.InitTfsBranch(), pull the initial commit hash out of
renameResult, if provided.

---------

Co-authored-by: Philippe Miossec <pmiossec@gmail.com>
2024-05-03 09:32:53 +02:00
Philippe Miossec 193b9cf5d3 Update libgit2sharp to v0.30 2024-04-05 14:48:43 +02:00
Philippe Miossec e1941749e1 chore: target .net v4.8
because it is here to stay for a long time (and runtime is provided by windows update on win >=10)
2024-04-05 13:26:05 +02:00
Marian Dolinský 32b187f2f3 fix: Fix handling description file into bare repo 2024-04-05 10:55:46 +02:00
Git-tfs release bot 0ade34ecb1 Prepare release v0.34 2024-04-04 16:55:03 +00:00
Philippe Miossec 6f2c84ef91 chore: changelog 2024-04-04 17:07:23 +02:00
Philippe Miossec 076a9de035 refactor: convert to use Expression Bodies 2024-04-04 17:07:23 +02:00
Git-tfs release bot c719f7095e Prepare release v0.33 2024-03-01 17:38:41 +00:00
ryancdotnet 74aaf6ca3f Enabling PAT authentication support (#1476)
thanks to a `GIT_TFS_PAT` environment variable

---------

Co-authored-by: Philippe Miossec <pmiossec@gmail.com>
2024-03-01 16:54:10 +01:00
Marco b7cbac3b09 Fixed rare issue when a TFS changeset was made on different branches
Warn the user if a TFS changeset shall be assigned to multiple commits.

Closes #1469
2023-09-25 14:23:38 +02:00
none f4e8f55c80 Updated NEXT.md 2023-01-06 12:26:50 +01:00
Peter Baumann 5a010df682 Remove --no-metadata from documentation
The feature is gone since v0.17.0 and was removed in
4c2ab71e ("Remove unused config no-meta-data (see #281, #283).", 2013-01-10)

Remove the leftover comments to avoid any further confusion.
Note: For removing the `git-tfs-id:` markers at the end of the commit
message, see the howto at https://github.com/git-tfs/git-tfs/blob/master/doc/usecases/migrate_tfs_to_git.md#clean-commits-optional
2022-12-14 19:16:42 +01:00
Peter Baumann 65fa982a47 Add #1424 and #1425 to the NEXT.md release notes
While at it, also fix the syntax to actually make the users clickable
in github by adding the missing '@'.
2022-06-15 17:37:46 +02:00
fineol fb271373dc Update NEXT.md 2022-02-06 17:27:14 -05:00
fineol e9a9ddcb45 Update documentation for --initial-branch option 2022-02-03 19:05:11 -05:00
fineol 8f0b8bcb1b Merge branch 'master' into feature/initdefaultbranch 2022-02-02 18:57:55 -05:00
Peter Baumann c34fd39b6d Fix crash with checkin policy support and no installed extensions
If checkin policies are enabled via enable_checkin_policies_support.bat
the git-tfs binary is modified via CorFlags to run as a 32bit process,
as the checkin policies are only available in 32bit (not sure if this
is still the case for VS2022, but at least for VS2019 and VS2017 this is
the case).

The code uses internally a different code path if it runs as 32bit process,
as the corresponding libraries to enable loading the private registry
only works in 32bit. Commit a515071e ("Add support
for checkin policies for VS2017 and VS2019", 2020-11-02) introduced
the support for loading the private registry where e.g. installed
extensions and/or code review policies are stored, but it accidentally
had some debugging leftovers trying to access a specific registry key.

This key does not exist if no VS extensions and/or checkin policies are
installed and therefore made the git-tfs application terminate with an
exception.

Remove this dead code and fix this error, which was noticed when testing
the VS2022 support whitout any extensions installed.
2022-02-02 20:07:08 +01:00
Alexander Renev 01b4837bf1 Visual Studio 2022 support 2022-02-02 18:31:47 +01:00
fineol f8f37d831b Update AppVeyor image to Visual Studio 2019
The Visual Studio 2019 image includes git 2.33.1, which is needed
to test git-tfs' new --initial-branch option. The Visual Studio 2017
image used previously includes git 2.26.2, which does not support
the --initial-branch option.
2022-01-27 14:06:04 -05:00
Peter Baumann 5b5ef0c79f Add release notes for PR #1400 2021-12-01 21:02:02 +01:00
Peter Baumann 152e8513f9 Update release notes with #1399 2021-11-14 19:57:52 +01:00
Peter Baumann d74130867e Add #1397 to the release notes 2021-10-26 13:35:17 +02:00
Andrij Abyzov d1c18c18c6 Fix a rare error fetching the workitems associated to a changeset
In certain cases of legacy TFS projects using Changeset::WorkItems could cause
a WorkItemTypeDeniedOrNotExistException (error TF201077) and cloning process
stopped. This change uses AssociatedWorkItems instead which works fine even
in this case.
2021-10-18 12:15:50 +02:00
Peter Baumann adb6382a58 Correct URLs to WorkItems
The URLs to the WorkItems were not working. The old form generated uses
the following format
  https://some.server.com/tfs/tpc/WorkItemTracking/WorkItem.aspx?artifactMoniker=<ID>
Accessing it in a browser actually leads to the following error on a
a TFS 2020 (Dev18.M170.8) server:
"TF200016: The following project does not exist: WorkItemTracking. Verify
that the name of the project is correct and that the project exists on the
specified Azure DevOps Server."

Fix it by using the `TswaClientHyperLinkService.GetWorkItemEditorUrl`
which generates the correct URLs of the form
  https://apollo.healthcare.siemens.com/tfs/web/wi.aspx?pcguid=<PROJECTCOLLECTION_GUID>&id=<ID>

Another benefit of this change is that we no longer need the URI from the
WorkItem, as the URL is build completely from the ID, which enables a later
refactoring (not done in this changeset) to use the `AssociatedWorkItems`
(see comment in `HasWorkItems`) instead.
2021-10-05 17:41:36 +02:00
Peter Baumann 3512c31a2c Add #1381 to the NEXT.md release notes 2021-06-17 09:52:05 +02:00
Git-tfs release bot d25835b143 Prepare release v0.32 2021-03-09 22:50:41 +00:00
Peter Baumann 1031031861 Incorporate review comments for the release notes
This makes it clearer that checkin policies are supported now, as before
we mentioned them explicitely as "not supported yet" in the entries where
VS 2017 and VS 2019 where introduced.

I reflowed the paragraphs, so this is best reviewed with
`git diff --word-diff`
2021-01-20 19:01:50 +01:00
Peter Baumann 583f2b12fb Update release notes
Add the newly added checkin policies feature to the release notes and
reference the pull requests for the existing ones
2021-01-20 14:55:04 +01:00
Peter Baumann f2f6da15dc Add support for VS2019
This implements the support for Visual Studio 2019 by adding a VS2019
paket group. It is heavily based on the plugin for VS2017, as the
GitTfs.VS2017 plugin was initially copied to server as a base for this
new GitTfs.VS2019 plugin. The actual logic business logic is contained
in src\GitTfs.VsCommon\TfsHelper.Vs2017Base.cs and is shared between
both plugins.

HINT: To see what actually was changed after the GitTFS.VS2017 was copied,
use e.g. `git show -C50 -C HEAD` to spot the differences in the review.
2021-01-18 08:03:39 +01:00
Peter Baumann 87f16d0466 Add support for VS2017
This implements the support for VS2017 by implementing the necessary
logic to enumerate the installed VS intances. As of VS2017, multiple
Visual Studio versions can be installed in parallel, e.g. a Enterprise
and a Professional edition. Furthermore, it also supports installing
the same edition in multiple different versions.

The logic implemented in this commit will always use the first version found
with a matching major. As it isn't clear that the used underlying mechanism
to iterate over the installed versions is deterministic, this means that
if multiple versions of VS2017 are installed in parallel, we may find
different instances between seperate calls.

A typical user doesn't have multiple versions of the same VS major
installed, but instead it is much more common to have different major
vesions like e.g. VS2017 and VS2019 installed.

Therefore, finding the first VS2017 version is acceptable for now. Selecting
different editions or different versions of the same major can be done
later if it is needed at all, especially as testing this requires
a lot of work due to the need of installing multiple versions or editions
of Visual Studio.
2020-11-18 12:56:08 +01:00
Peter Baumann d15a8cf5e6 Correct error message in case git tfs clone failed
git tfs branch has an option `--init`, not another subcommand `init`.
Fixes #1135
2020-11-18 09:21:11 +01:00
Peter Baumann 41874ad1e5 Condense doc/release-notes/NEXT.md as per review request
The release notes are user facing per review request should only tell
the high level story. Therefore condense it down to just the important
message.
2020-11-17 21:26:51 +01:00
Peter Baumann 1c20e4ce8d Update .NET Framework to 4.7.2 for all paket groups and projects 2020-11-17 20:48:55 +01:00
Peter Baumann 59fc753d8b Update Octokit to 0.48
./paket update --group Build Octokit
2020-11-17 20:48:55 +01:00
Peter Baumann c3c31e760e Update GitVersion.CommandLine to 5.5.0 2020-11-17 20:48:54 +01:00
Peter Baumann eb9d7e256c Update OpenCover to 4.7.922 2020-11-17 20:48:54 +01:00
Peter Baumann 003b4bfc71 Update Cake to 0.38.5 and Cake.Git to 0.22 2020-11-17 20:48:54 +01:00
Peter Baumann 52153c3fa6 Update NLog to 4.7.5 2020-11-17 20:48:54 +01:00
Peter Baumann de3481b7e1 Update LibGit2Sharp to 0.26.2 2020-11-17 20:48:54 +01:00
Peter Baumann bb26bc8eb4 Update Moq to 4.14.7 2020-11-17 20:48:54 +01:00
Peter Baumann 332ff6c063 Upgrade ReportGenerator to 4.7.1
Update tools path in the cake file, as the path is now under a different
location due to multi targeting.
2020-11-17 20:48:54 +01:00
Peter Baumann 6d30724ab4 Pin paket version to 5.251.0
Otherwise, the build is not completely reproducable and depending if there
is a new paket version available, due to its autoupgrade it will mess with
the checked in file src/.paket/Paket.Restore.targets and cause strange
conflicts.

This commit has proven usefull when dealing a long running branch of patches
to the paket.dependencies and/or paket.lock file.
2020-11-17 20:48:52 +01:00
siprbaum cca9298bc6 Fix case conflict in file name doc/release-notes/{NEXT.md,Next.md} (#1346)
In a4c76e2f ("Performance improvement - cache the branch objects instead
of looking them up over and over", 2019-06-25) introduced via PR #1286
the filename conflict on case insensitive filesystems:
	doc/release-notes/Next.md
vs
	doc/release-notes/NEXT.md

The later name is the one already existing and what is used throughout
the history, where as the former one wasn't used at all before.
Merge the two files and remove the wrong doc/release-notes/Next.md one.
While I am alrady modifying the file, add the reference to the pull requests
to the changelog entries.
2020-11-17 20:21:39 +01:00
Matt Burke 9133e62143 Merge pull request #1286 from AriehSchneier/performance-improvement
Performance improvement - cache the branch objects
2020-11-17 11:49:51 -05:00
Peter Baumann 879fdd4884 Use --rebase-merges for rebase instead of the deprecated --preserve-merges
git rebase --rebase-merges commandline switch was introduced in Git
version v2.18.0 (released on 2018-06-21) to replace the --preserve-merges
commandline switch to git rebase. Since v2.22.0 the old --preserve-merges
is offically deprecated.

Replace the deprecated usage of --preserve-merges with the newer --rebase-merges
option on all occurences.

The decision was made that the git version v2.18.0 as the minimum required version
is reasonably old enough to assume that the user has it (or a newer version)
installed on his machine. Therefore no version dependend logic on which
switch to select was implemented here.
2020-10-28 01:19:28 +01:00
Git-tfs release bot 1355d5ff04 Prepare release v0.31 2020-05-30 21:56:04 +00:00
Philippe Miossec 04d551f8a5 Update NEXT.md 2020-01-17 10:42:55 +01:00
Serhan Tutar 64c1a47efd Updated v0.30.0.md for long path support doc link
.Net462 and windows10 long path support documentation link was broken, this should fix the problem.
2019-12-06 01:21:39 +01:00
jnm2 f71d5c967e Interpret authors file path relative to the current directory at the time the command was executed 2019-12-05 19:02:17 -05:00
Mario Dietner f40201d1b9 updated release notes 2019-11-01 14:08:01 +01:00