teamcity/git-plugin.git
9 months agoattempt to reduce amount of fetches: if we did not find a commit in local clone we... master
Pavel Sher [Mon, 28 Jan 2019 17:10:33 +0000 (18:10 +0100)]
attempt to reduce amount of fetches: if we did not find a commit in local clone we need to check that there are no active fetch operations and if there is some, we need to wait for it to finish and try to find commit again

if we don't do that, then when fetch finishes we'll perform one more fetch even though it is unnecessary because commit is already fetched

9 months agoswitch to ReentrantLock: this will provide ability to use tryLock
Pavel Sher [Mon, 28 Jan 2019 17:08:41 +0000 (18:08 +0100)]
switch to ReentrantLock: this will provide ability to use tryLock

9 months agoadd wait time to progress if it took more than 20 seconds
Pavel Sher [Mon, 28 Jan 2019 16:00:36 +0000 (17:00 +0100)]
add wait time to progress if it took more than 20 seconds

9 months agofix "Could not update local clone for ... command line ... is prohibited on this...
Pavel Sher [Mon, 21 Jan 2019 15:45:03 +0000 (16:45 +0100)]
fix "Could not update local clone for ... command line ... is prohibited on this node":
wrap operation to make sure we are always able to update local clones on secondary node

9 months agoThis repository is no longer in use. See NOT_USED.txt for details
Oleg.Rybak [Thu, 17 Jan 2019 23:40:00 +0000 (02:40 +0300)]
This repository is no longer in use. See NOT_USED.txt for details

9 months agoTW-58811 Support 'update-ref --stdin'
Vladislav Rassokhin [Thu, 17 Jan 2019 14:11:21 +0000 (17:11 +0300)]
TW-58811 Support 'update-ref --stdin'

10 months agoattempt to workaround Git GC rename dir error messages: perform operation several...
Pavel Sher [Mon, 14 Jan 2019 18:28:57 +0000 (19:28 +0100)]
attempt to workaround Git GC rename dir error messages: perform operation several times

10 months agomake sure Git GC errors are visible on the secondary node
Pavel Sher [Mon, 14 Jan 2019 17:49:15 +0000 (18:49 +0100)]
make sure Git GC errors are visible on the secondary node

10 months agodo not try to run git gc in <>.git.gc or <>.git.old directories
Pavel Sher [Mon, 14 Jan 2019 17:22:30 +0000 (18:22 +0100)]
do not try to run git gc in <>.git.gc or <>.git.old directories

10 months agoUpdate JSch library for fix GitLab ssh connection issue
Mikhail Khorkov [Mon, 14 Jan 2019 09:47:19 +0000 (16:47 +0700)]
Update JSch library for fix GitLab ssh connection issue

10 months agofix TW-58428: make health report sound as recommendation rather than error
Pavel Sher [Wed, 9 Jan 2019 13:53:41 +0000 (14:53 +0100)]
fix TW-58428: make health report sound as recommendation rather than error

10 months agoTW-57690: now when we load mirrors mapping file we ignore non existing directories...
Pavel Sher [Fri, 4 Jan 2019 15:16:13 +0000 (16:16 +0100)]
TW-57690: now when we load mirrors mapping file we ignore non existing directories and also remove them from the mirror file; during the "free disk space" cleanup we also check that mirror dir exists and if it does not then we remove it from the list of mirrors

10 months agoTW-58559 Update JGit library with fix patch
Mikhail Khorkov [Sat, 29 Dec 2018 05:06:33 +0000 (12:06 +0700)]
TW-58559 Update JGit library with fix patch

10 months agoAdd using Memory-mapped index reader
Mikhail Khorkov [Mon, 26 Nov 2018 09:25:40 +0000 (16:25 +0700)]
Add using Memory-mapped index reader

It is disabled for default. For enabling use property "teamcity.server.git.useMemoryMappedIndex"

11 months agoenable update of cloned git repositories by default if checking for changes responsib...
pavel.sher [Wed, 5 Dec 2018 22:32:17 +0000 (23:32 +0100)]
enable update of cloned git repositories by default if checking for changes responsibility is not granted

11 months agofix memory leak: apparently we must close contexts to release JGit related resources
Pavel Sher [Wed, 21 Nov 2018 18:52:19 +0000 (19:52 +0100)]
fix memory leak: apparently we must close contexts to release JGit related resources

12 months agoTW-57802 Fix tests
Mikhail Khorkov [Wed, 14 Nov 2018 08:34:36 +0000 (15:34 +0700)]
TW-57802 Fix tests

12 months agoTW-57802 Remove unnecessary ""'git config http.sslCAInfo' command failed" warnings...
Mikhail Khorkov [Wed, 14 Nov 2018 08:07:03 +0000 (15:07 +0700)]
TW-57802 Remove unnecessary ""'git config http.sslCAInfo' command failed" warnings in TeamCity Agent VCS log

12 months agoTW-56651 Improve parsing of JSch main args
Mikhail Khorkov [Tue, 4 Sep 2018 11:10:26 +0000 (18:10 +0700)]
TW-56651 Improve parsing of JSch main args

12 months agoLocal clones updater: if server does not have responsibility to collect changes,...
pavel.sher [Tue, 13 Nov 2018 21:44:03 +0000 (22:44 +0100)]
Local clones updater: if server does not have responsibility to collect changes, this updater ensures that local clones are getting updated each time when repository state changes; this ensures faster response if server asks for a file content or performs mapFullPath operation

12 months agoTW-57509 Make GitNotFound server health report WARN, not INFO
Mikhail Khorkov [Wed, 31 Oct 2018 08:34:25 +0000 (15:34 +0700)]
TW-57509 Make GitNotFound server health report WARN, not INFO

13 months agofixing Git plugin for Upsource case: apparently there is no ExtensionsProvider in...
pavel.sher [Fri, 12 Oct 2018 14:50:11 +0000 (16:50 +0200)]
fixing Git plugin for Upsource case: apparently there is no ExtensionsProvider in Upsource too

13 months agofixing Git plugin for Upsource case: do not require ProjectManager in constructor...
pavel.sher [Fri, 12 Oct 2018 13:43:51 +0000 (15:43 +0200)]
fixing Git plugin for Upsource case: do not require ProjectManager in constructor of the bean because there is no such entity when Upsource loads Git plugin

13 months agofixing Git plugin for Upsource case: remove dependency on ServerPaths bean from the...
pavel.sher [Fri, 12 Oct 2018 09:57:07 +0000 (11:57 +0200)]
fixing Git plugin for Upsource case: remove dependency on ServerPaths bean from the plugin code, initialize trust store with trusted certificates dir from TeamCity part of the plugin

13 months agoone more fix for Upsource: move Git trust store provider to git plugin server module
pavel.sher [Tue, 9 Oct 2018 15:55:26 +0000 (17:55 +0200)]
one more fix for Upsource: move Git trust store provider to git plugin server module

13 months agoTW-56994 Add special error message in case we use github.com with http
Mikhail Khorkov [Fri, 5 Oct 2018 09:55:04 +0000 (16:55 +0700)]
TW-56994 Add special error message in case we use github.com with http

14 months agoAdd better log
Mikhail Khorkov [Fri, 31 Aug 2018 09:59:55 +0000 (12:59 +0300)]
Add better log

14 months agoTW-56048: switch to a more compact format for reporting merge commit changed files...
pavel.sher [Tue, 21 Aug 2018 15:42:24 +0000 (17:42 +0200)]
TW-56048: switch to a more compact format for reporting merge commit changed files in changed files attribute

(cherry picked from commit 4ae7eeb)

14 months agoTW-55894 Add universal solution for custom ssl certificates on an agent side
Mikhail Khorkov [Mon, 9 Jul 2018 15:37:54 +0000 (22:37 +0700)]
TW-55894 Add universal solution for custom ssl certificates on an agent side

14 months agoTEAMCITY-GIT-CR-7 TW-56415 Fix after review
Vladislav Rassokhin [Sun, 19 Aug 2018 13:53:06 +0000 (16:53 +0300)]
TEAMCITY-GIT-CR-7 TW-56415 Fix after review

14 months agoTEAMCITY-GIT-CR-7 TW-56415 Improve tests, don't retry after GitExecTimeout
Vladislav Rassokhin [Fri, 17 Aug 2018 11:55:07 +0000 (14:55 +0300)]
TEAMCITY-GIT-CR-7 TW-56415 Improve tests, don't retry after GitExecTimeout

15 months agoFix tests, add test for TW-56415
Vladislav Rassokhin [Wed, 15 Aug 2018 20:50:13 +0000 (23:50 +0300)]
Fix tests, add test for TW-56415

15 months agoTW-56415 Try to update local git mirror several times instead of cloning from scratch
Vladislav Rassokhin [Wed, 15 Aug 2018 17:26:38 +0000 (20:26 +0300)]
TW-56415 Try to update local git mirror several times instead of cloning from scratch

15 months agostop using -l switch for git branch command, seems git 2.19 will deprecate it
pavel.sher [Fri, 20 Jul 2018 07:21:11 +0000 (09:21 +0200)]
stop using -l switch for git branch command, seems git 2.19 will deprecate it

15 months agominor optimization
pavel.sher [Thu, 19 Jul 2018 21:44:54 +0000 (23:44 +0200)]
minor optimization

(cherry picked from commit 657ee1d)

16 months agoavoid calling expensive getCanonical when we create locks for repository directories...
pavel.sher [Thu, 12 Jul 2018 18:08:11 +0000 (20:08 +0200)]
avoid calling expensive getCanonical when we create locks for repository directories; seems in the worst case scenario we'll have the same lock for different directories with the same name, but probability of this case should be quite low

16 months agodo not try to perform an actual SSH connect
pavel.sher [Mon, 25 Jun 2018 17:43:48 +0000 (19:43 +0200)]
do not try to perform an actual SSH connect

(cherry picked from commit d599a7b)

16 months agoTW-49655: provide hint about uploaded SSH key in error messages + fix tearDown in...
pavel.sher [Mon, 25 Jun 2018 16:28:42 +0000 (18:28 +0200)]
TW-49655: provide hint about uploaded SSH key in error messages + fix tearDown in tests

16 months agoTW-49655: now for ssh connection we try uploaded keys first, and if none of them...
pavel.sher [Sun, 24 Jun 2018 16:32:34 +0000 (18:32 +0200)]
TW-49655: now for ssh connection we try uploaded keys first, and if none of them works, we'll use a default one

16 months agoTW-55352 fix option value
Dmitry Neverov [Mon, 18 Jun 2018 09:04:41 +0000 (11:04 +0200)]
TW-55352 fix option value

17 months agoChange buildServer method name for ssl feature
Mikhail Khorkov [Wed, 13 Jun 2018 07:16:32 +0000 (14:16 +0700)]
Change buildServer method name for ssl feature

17 months agoTW-41191 Add possibility to use custom ssl trust store on agent side
Mikhail Khorkov [Wed, 13 Jun 2018 04:30:12 +0000 (11:30 +0700)]
TW-41191 Add possibility to use custom ssl trust store on agent side

17 months agoTW-55479 show full paths for clone dirs
Dmitry Neverov [Tue, 12 Jun 2018 08:39:12 +0000 (10:39 +0200)]
TW-55479 show full paths for clone dirs

17 months agoTW-54223 use smaller timeout for 'git ls-remote'
Dmitry Neverov [Sat, 9 Jun 2018 07:00:41 +0000 (09:00 +0200)]
TW-54223 use smaller timeout for 'git ls-remote'

17 months agoAllow to run cleanup on the read-only node (it should clean only the files under...
dmitry.treskunov [Fri, 1 Jun 2018 11:10:47 +0000 (13:10 +0200)]
Allow to run cleanup on the read-only node (it should clean only the files under the node's local 'system/caches' directory)

18 months agoBuild configuration parameter for enabling ssh debug
Dmitry Neverov [Tue, 15 May 2018 08:18:20 +0000 (10:18 +0200)]
Build configuration parameter for enabling ssh debug

18 months agoTW-41191 Fix build
Mikhail Khorkov [Mon, 7 May 2018 10:18:39 +0000 (17:18 +0700)]
TW-41191 Fix build

19 months agoDiff assert: handle the case when build revision is same as upper limit revision
Dmitry Neverov [Thu, 12 Apr 2018 10:12:26 +0000 (12:12 +0200)]
Diff assert: handle the case when build revision is same as upper limit revision

19 months agoCheck there is no changes matched by rules with upper limit revision
Dmitry Neverov [Wed, 11 Apr 2018 08:30:41 +0000 (10:30 +0200)]
Check there is no changes matched by rules with upper limit revision

19 months agoMerge branch 'Indore-2017.2.x'
Dmitry Neverov [Tue, 27 Mar 2018 16:40:51 +0000 (18:40 +0200)]
Merge branch 'Indore-2017.2.x'

19 months agoTW-54343 handle ssh commands with additional arguments
Dmitry Neverov [Tue, 27 Mar 2018 16:39:57 +0000 (18:39 +0200)]
TW-54343 handle ssh commands with additional arguments

19 months agoTW-41191 Add possibility to use custom ssl trust store on server side
Mikhail Khorkov [Fri, 16 Mar 2018 11:25:32 +0000 (18:25 +0700)]
TW-41191 Add possibility to use custom ssl trust store on server side

20 months agoMerge branch 'Indore-2017.2.x'
Dmitry Neverov [Thu, 15 Mar 2018 12:50:07 +0000 (13:50 +0100)]
Merge branch 'Indore-2017.2.x'

20 months agoTW-54150 set user for absolute submodule urls
Dmitry Neverov [Thu, 15 Mar 2018 12:43:12 +0000 (13:43 +0100)]
TW-54150 set user for absolute submodule urls

20 months agoMerge branch 'Indore-2017.2.x'
Dmitry Neverov [Wed, 28 Feb 2018 09:30:25 +0000 (10:30 +0100)]
Merge branch 'Indore-2017.2.x'

20 months agoMerge branch 'Indore-2017.1.x' into Indore-2017.2.x
Dmitry Neverov [Wed, 28 Feb 2018 09:26:45 +0000 (10:26 +0100)]
Merge branch 'Indore-2017.1.x' into Indore-2017.2.x

20 months agoFaster repositories close in suitable roots search Indore-2017.1.x
Dmitry Neverov [Wed, 28 Feb 2018 09:23:53 +0000 (10:23 +0100)]
Faster repositories close in suitable roots search

We created a single context for entire search and kept
all repositories open until the search is finished.
Since the search can be slow (tens of minutes), create
context per VCS root in order to reduce memory usage.

20 months agoMerge branch 'Indore-2017.2.x'
Dmitry Neverov [Wed, 21 Feb 2018 13:58:17 +0000 (14:58 +0100)]
Merge branch 'Indore-2017.2.x'

20 months agoTW-53836 mark our ssh command as OpenSSH compatible
Dmitry Neverov [Wed, 21 Feb 2018 13:57:21 +0000 (14:57 +0100)]
TW-53836 mark our ssh command as OpenSSH compatible

21 months agoMerge branch 'Indore-2017.2.x'
Dmitry Neverov [Thu, 1 Feb 2018 10:16:39 +0000 (11:16 +0100)]
Merge branch 'Indore-2017.2.x'

21 months agoTW-53097 use UTF-8 for git commands output
Dmitry Neverov [Thu, 1 Feb 2018 10:07:14 +0000 (11:07 +0100)]
TW-53097 use UTF-8 for git commands output

21 months agoAdd readme file with simple 'howto make zip file' instruction
Mikhail Khorkov [Thu, 1 Feb 2018 05:01:45 +0000 (06:01 +0100)]
Add readme file with simple 'howto make zip file' instruction

21 months agoMerge branch 'Indore-2017.2.x'
Dmitry Neverov [Sat, 27 Jan 2018 21:55:08 +0000 (22:55 +0100)]
Merge branch 'Indore-2017.2.x'

21 months agoTW-48675 remove packed refs lock
Dmitry Neverov [Sat, 27 Jan 2018 21:52:56 +0000 (22:52 +0100)]
TW-48675 remove packed refs lock

Checkout can fail due to previous build cancelation:
https://youtrack.jetbrains.com/issue/TW-48675#comment=27-2684722

21 months agoCreate daemon threads in jsch, so we can always exit
Dmitry Neverov [Fri, 26 Jan 2018 16:36:48 +0000 (17:36 +0100)]
Create daemon threads in jsch, so we can always exit

21 months agoTW-53489 respect .ssh/config on the agent machine
Dmitry Neverov [Fri, 26 Jan 2018 16:36:11 +0000 (17:36 +0100)]
TW-53489 respect .ssh/config on the agent machine

21 months agoMerge branch 'Indore-2017.2.x'
Dmitry Neverov [Fri, 26 Jan 2018 15:39:54 +0000 (16:39 +0100)]
Merge branch 'Indore-2017.2.x'

21 months agoTW-53489 respect .ssh/config on the agent machine
Dmitry Neverov [Fri, 26 Jan 2018 15:37:25 +0000 (16:37 +0100)]
TW-53489 respect .ssh/config on the agent machine

21 months agoMerge branch 'Indore-2017.2.x'
Dmitry Neverov [Fri, 26 Jan 2018 13:44:02 +0000 (14:44 +0100)]
Merge branch 'Indore-2017.2.x'

21 months agoDrop changedFilesSupport implementation
Dmitry Neverov [Fri, 26 Jan 2018 13:43:18 +0000 (14:43 +0100)]
Drop changedFilesSupport implementation

21 months agoEnable per parent changes reporting by default
Dmitry Neverov [Fri, 26 Jan 2018 13:42:57 +0000 (14:42 +0100)]
Enable per parent changes reporting by default

21 months agoMerge branch 'Indore-2017.2.x'
Dmitry Neverov [Thu, 25 Jan 2018 13:17:37 +0000 (14:17 +0100)]
Merge branch 'Indore-2017.2.x'

21 months agoTW-50054 disable custom clone path by default
Dmitry Neverov [Thu, 25 Jan 2018 13:16:40 +0000 (14:16 +0100)]
TW-50054 disable custom clone path by default

21 months agoMerge branch 'Indore-2017.2.x'
Dmitry Neverov [Thu, 25 Jan 2018 12:42:14 +0000 (13:42 +0100)]
Merge branch 'Indore-2017.2.x'

21 months agoCreate daemon threads in jsch, so we can always exit
Dmitry Neverov [Thu, 25 Jan 2018 11:38:11 +0000 (12:38 +0100)]
Create daemon threads in jsch, so we can always exit

21 months agoFix timeout in ssh client
Dmitry Neverov [Thu, 25 Jan 2018 11:31:36 +0000 (12:31 +0100)]
Fix timeout in ssh client

21 months agoTW-53436 fix one more hanging
Dmitry Neverov [Wed, 24 Jan 2018 16:00:22 +0000 (17:00 +0100)]
TW-53436 fix one more hanging

Continue read data even if channel is closed. Remote side can close it
when all data were send, but not yet read by us.

21 months agoMerge branch 'Indore-2017.2.x'
Dmitry Neverov [Wed, 24 Jan 2018 14:31:53 +0000 (15:31 +0100)]
Merge branch 'Indore-2017.2.x'

21 months agoTW-53436 fix one more hanging
Dmitry Neverov [Wed, 24 Jan 2018 14:17:20 +0000 (15:17 +0100)]
TW-53436 fix one more hanging

Continue read data even if channel is closed. Remote side can close it
when all data were send, but not yet read by us.

21 months agoMerge branch 'Indore-2017.2.x'
Dmitry Neverov [Tue, 23 Jan 2018 16:02:44 +0000 (17:02 +0100)]
Merge branch 'Indore-2017.2.x'

21 months agoAdd timeout to ssh client
Dmitry Neverov [Tue, 23 Jan 2018 16:01:36 +0000 (17:01 +0100)]
Add timeout to ssh client

21 months agoFix jsch client hanging
Dmitry Neverov [Tue, 23 Jan 2018 12:56:03 +0000 (13:56 +0100)]
Fix jsch client hanging

We need to ask for input stream before connecting because it initializes
the stream.

21 months agoMerge branch 'Indore-2017.2.x'
Dmitry Neverov [Tue, 23 Jan 2018 12:51:38 +0000 (13:51 +0100)]
Merge branch 'Indore-2017.2.x'

21 months agoFix jsch client hanging
Dmitry Neverov [Tue, 23 Jan 2018 12:50:42 +0000 (13:50 +0100)]
Fix jsch client hanging

We need to ask for input stream before connecting because it initializes
the stream.

21 months agoUpdate copyright
pavel.sher [Mon, 22 Jan 2018 10:31:48 +0000 (11:31 +0100)]
Update copyright

21 months agoUpdate copyright
pavel.sher [Mon, 22 Jan 2018 10:30:18 +0000 (11:30 +0100)]
Update copyright

21 months agoMerge branch 'Indore-2017.2.x'
Dmitry Neverov [Sat, 20 Jan 2018 21:45:24 +0000 (22:45 +0100)]
Merge branch 'Indore-2017.2.x'

21 months agoReport per-parent changed files via attributes
Dmitry Neverov [Sat, 20 Jan 2018 21:44:29 +0000 (22:44 +0100)]
Report per-parent changed files via attributes

21 months agoMerge branch 'Indore-2017.2.x'
Dmitry Neverov [Fri, 19 Jan 2018 15:56:17 +0000 (16:56 +0100)]
Merge branch 'Indore-2017.2.x'

21 months agoImplement new changedFilesSupport api
Dmitry Neverov [Fri, 19 Jan 2018 15:55:28 +0000 (16:55 +0100)]
Implement new changedFilesSupport api

21 months agoMerge branch 'Indore-2017.2.x'
Dmitry Neverov [Thu, 18 Jan 2018 13:16:26 +0000 (14:16 +0100)]
Merge branch 'Indore-2017.2.x'

21 months agoImplement ChangedFilesSupport
Dmitry Neverov [Thu, 18 Jan 2018 13:15:25 +0000 (14:15 +0100)]
Implement ChangedFilesSupport

22 months agoMerge branch 'Indore-2017.2.x'
Dmitry Neverov [Wed, 10 Jan 2018 14:20:13 +0000 (15:20 +0100)]
Merge branch 'Indore-2017.2.x'

22 months agoTW-53230 fix url for VSO
Dmitry Tretyakov [Wed, 10 Jan 2018 13:59:29 +0000 (14:59 +0100)]
TW-53230 fix url for VSO

22 months agoMerge branch 'Indore-2017.2.x'
Dmitry Neverov [Wed, 10 Jan 2018 12:12:31 +0000 (13:12 +0100)]
Merge branch 'Indore-2017.2.x'

22 months agoFix env var name
Dmitry Neverov [Wed, 10 Jan 2018 12:11:53 +0000 (13:11 +0100)]
Fix env var name

22 months agoFix env var name
Dmitry Neverov [Wed, 10 Jan 2018 12:10:50 +0000 (13:10 +0100)]
Fix env var name

22 months agoTW-53210 disable gssapi-with-mic ssh authentication
Dmitry Neverov [Wed, 10 Jan 2018 12:00:38 +0000 (13:00 +0100)]
TW-53210 disable gssapi-with-mic ssh authentication

It wasn't supported in the trilead-based ssh client (used before
2017.2.1), so disabling it should not break anything. Problem with
gssapi-with-mic is that by default java asks a user for credentials and
waits for input from stdin, as a result checkout fails by timeout.

Also now we specify a custom security callback handler instead of the
default one which uses stdin. Our handler doesn't provide any
credentials, but will work if the agent machine already has the required
kerberos ticket.

22 months agoBetter ssh logging
Dmitry Neverov [Wed, 10 Jan 2018 12:00:30 +0000 (13:00 +0100)]
Better ssh logging

When debug is enabled write log to stderr immediately. Without that we
don't get any logging in case of hanging (e.g. due to unexpected
interaction with a user). Also it is useful sometimes to get log even in
case of successful authentication.

22 months agoMerge branch 'Indore-2017.2.x'
Dmitry Neverov [Wed, 10 Jan 2018 11:48:53 +0000 (12:48 +0100)]
Merge branch 'Indore-2017.2.x'