Commit Graph

489 Commits

Author SHA1 Message Date
Toshi MARUYAMA
949d80c6d2 code cleanup: rubocop: fix Performance/Casecmp in lib/redmine/scm/adapters/bazaar_adapter.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@18504 e93f8b46-1217-0410-a6f0-8f06a7374b81
2019-09-21 15:54:38 +00:00
Toshi MARUYAMA
188c560edc code cleanup: rubocop: fix Style/CommentAnnotation in lib/redmine/scm/adapters/cvs_adapter.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@18491 e93f8b46-1217-0410-a6f0-8f06a7374b81
2019-09-20 17:54:42 +00:00
Toshi MARUYAMA
9f26eac4f0 code cleanup: rubocop: fix Style/ClassCheck in lib/redmine/scm/adapters/cvs_adapter.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@18490 e93f8b46-1217-0410-a6f0-8f06a7374b81
2019-09-20 17:54:30 +00:00
Toshi MARUYAMA
c22ba96c92 code cleanup: rubocop: fix Lint/HandleExceptions in lib/redmine/scm/adapters/mercurial_adapter.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@18458 e93f8b46-1217-0410-a6f0-8f06a7374b81
2019-09-12 16:23:42 +00:00
Toshi MARUYAMA
2edbd2a597 code cleanup: rubocop: fix Lint/AmbiguousOperator in lib/redmine/scm/adapters/mercurial_adapter.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@18456 e93f8b46-1217-0410-a6f0-8f06a7374b81
2019-09-12 15:08:21 +00:00
Toshi MARUYAMA
9d2c39009d code cleanup: scm: cvs: remove unused branchPoint method from CvsRevisionHelper class
git-svn-id: http://svn.redmine.org/redmine/trunk@18453 e93f8b46-1217-0410-a6f0-8f06a7374b81
2019-09-12 05:27:10 +00:00
Toshi MARUYAMA
f26590189b code cleanup: rubocop: fix Layout/SpaceInsideReferenceBrackets in lib/redmine/scm/adapters/subversion_adapter.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@18447 e93f8b46-1217-0410-a6f0-8f06a7374b81
2019-09-11 05:50:51 +00:00
Toshi MARUYAMA
7854b5073a code cleanup: rubocop: fix Layout/LeadingCommentSpace in lib/redmine/scm/adapters/git_adapter.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@18419 e93f8b46-1217-0410-a6f0-8f06a7374b81
2019-08-31 05:53:53 +00:00
Toshi MARUYAMA
7e323965d7 code cleanup lib/redmine/scm/adapters/cvs_adapter.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@18418 e93f8b46-1217-0410-a6f0-8f06a7374b81
2019-08-31 05:53:42 +00:00
Toshi MARUYAMA
d5764a2537 code cleanup: rubocop: fix Layout/LeadingCommentSpace in lib/redmine/scm/adapters/cvs_adapter.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@18417 e93f8b46-1217-0410-a6f0-8f06a7374b81
2019-08-31 05:53:32 +00:00
Toshi MARUYAMA
118fff34aa rubocop: fix Style/YodaCondition of lib/redmine/scm/adapters/abstract_adapter.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@18351 e93f8b46-1217-0410-a6f0-8f06a7374b81
2019-08-04 17:05:24 +00:00
Toshi MARUYAMA
37cde69d50 rubocop: fix Layout/EmptyLinesAroundAccessModifier of lib/redmine/scm/adapters/cvs_adapter.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@18340 e93f8b46-1217-0410-a6f0-8f06a7374b81
2019-08-03 05:34:20 +00:00
Toshi MARUYAMA
00d3fa02e2 rubocop: fix Layout/AccessModifierIndentation of scm/adapters/abstract_adapter.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@18331 e93f8b46-1217-0410-a6f0-8f06a7374b81
2019-07-29 05:38:30 +00:00
Go MAEDA
c2b30f5d3d Code cleanup: RuboCop: Style/DefWithParentheses
git-svn-id: http://svn.redmine.org/redmine/trunk@18290 e93f8b46-1217-0410-a6f0-8f06a7374b81
2019-06-20 12:15:28 +00:00
Go MAEDA
9eafc3e9a2 Remove trailing whitespaces from lib (#31506).
Patch by Marius BALTEANU.


git-svn-id: http://svn.redmine.org/redmine/trunk@18231 e93f8b46-1217-0410-a6f0-8f06a7374b81
2019-06-06 14:50:14 +00:00
Go MAEDA
97f05de373 Update copyright year.
git-svn-id: http://svn.redmine.org/redmine/trunk@18199 e93f8b46-1217-0410-a6f0-8f06a7374b81
2019-05-25 22:42:47 +00:00
Go MAEDA
4082069c75 Update copyright year.
git-svn-id: http://svn.redmine.org/redmine/trunk@18198 e93f8b46-1217-0410-a6f0-8f06a7374b81
2019-05-25 07:36:06 +00:00
Go MAEDA
b0e17e8199 Don't rescue Exception class (#31387).
Patch by Go MAEDA and Pavel Rosický.


git-svn-id: http://svn.redmine.org/redmine/trunk@18197 e93f8b46-1217-0410-a6f0-8f06a7374b81
2019-05-25 06:50:25 +00:00
Go MAEDA
ba79c59f9f Garbage lines in the output of 'git branch' break git adapter (#31120).
Contributed by Chad Petersen.


git-svn-id: http://svn.redmine.org/redmine/trunk@18046 e93f8b46-1217-0410-a6f0-8f06a7374b81
2019-04-07 07:02:08 +00:00
Toshi MARUYAMA
dcd7df0be8 code clean up GitAdapter
git-svn-id: http://svn.redmine.org/redmine/trunk@18043 e93f8b46-1217-0410-a6f0-8f06a7374b81
2019-04-05 07:49:08 +00:00
Toshi MARUYAMA
ec557a67a4 scm: git: fix non ascii branch and tag browsing (#16881)
git-svn-id: http://svn.redmine.org/redmine/trunk@18042 e93f8b46-1217-0410-a6f0-8f06a7374b81
2019-04-05 07:41:08 +00:00
Toshi MARUYAMA
ae0939952e scm: git: add new one latin1 tag to test repository (#16881)
git-svn-id: http://svn.redmine.org/redmine/trunk@18040 e93f8b46-1217-0410-a6f0-8f06a7374b81
2019-04-05 06:48:37 +00:00
Toshi MARUYAMA
5d2c03a196 scm: git: add new two latin1 branches to test repository (#16881)
git-svn-id: http://svn.redmine.org/redmine/trunk@18039 e93f8b46-1217-0410-a6f0-8f06a7374b81
2019-04-05 05:30:18 +00:00
Toshi MARUYAMA
97f6a40981 code clean up GitAdapter
git-svn-id: http://svn.redmine.org/redmine/trunk@18038 e93f8b46-1217-0410-a6f0-8f06a7374b81
2019-04-04 16:33:02 +00:00
Toshi MARUYAMA
3d70e1079a code clean up GitAdapter
git-svn-id: http://svn.redmine.org/redmine/trunk@18037 e93f8b46-1217-0410-a6f0-8f06a7374b81
2019-04-04 07:15:32 +00:00
Go MAEDA
72e1451159 Use Regexp#match? to reduce allocations of MatchData object (#28940).
Patch by Pavel Rosický.


git-svn-id: http://svn.redmine.org/redmine/trunk@18011 e93f8b46-1217-0410-a6f0-8f06a7374b81
2019-03-27 02:15:24 +00:00
Go MAEDA
4a37bac866 Remove extra #dup (#26561).
git-svn-id: http://svn.redmine.org/redmine/trunk@17995 e93f8b46-1217-0410-a6f0-8f06a7374b81
2019-03-21 00:45:56 +00:00
Go MAEDA
21769bb59e Fix FrozenError in BazaarAdapter.branch_conf_path (#26561).
Patch by Go MAEDA.


git-svn-id: http://svn.redmine.org/redmine/trunk@17994 e93f8b46-1217-0410-a6f0-8f06a7374b81
2019-03-20 15:02:35 +00:00
Go MAEDA
606e75d12d Use #b shortcut instead of #force_encoding (#31059).
Patch by Pavel Rosický.


git-svn-id: http://svn.redmine.org/redmine/trunk@17992 e93f8b46-1217-0410-a6f0-8f06a7374b81
2019-03-20 01:36:44 +00:00
Go MAEDA
30e341db69 Support frozen_string_literal in lib/**/*.rb (#26561).
Contributed by Pavel Rosický.


git-svn-id: http://svn.redmine.org/redmine/trunk@17988 e93f8b46-1217-0410-a6f0-8f06a7374b81
2019-03-17 16:36:34 +00:00
Go MAEDA
d16369b67c Enable frozen_string_literal for files which don't contain string literals (#26561).
git-svn-id: http://svn.redmine.org/redmine/trunk@17981 e93f8b46-1217-0410-a6f0-8f06a7374b81
2019-03-17 01:47:12 +00:00
Go MAEDA
5861160ffc Add "frozen_string_literal: false" for all files (#26561).
This will be changed to true in the future.


git-svn-id: http://svn.redmine.org/redmine/trunk@17947 e93f8b46-1217-0410-a6f0-8f06a7374b81
2019-03-15 01:32:57 +00:00
Go MAEDA
7b20e4c034 Refactor GitAdapter#default_branch not to unnecessarily iterate through all elements (#30828).
Patch by  Pavel Rosický.


git-svn-id: http://svn.redmine.org/redmine/trunk@17883 e93f8b46-1217-0410-a6f0-8f06a7374b81
2019-02-18 23:19:39 +00:00
Jean-Philippe Lang
8f58496138 Filesystem adapter does not show correct size for large files (#30411).
git-svn-id: http://svn.redmine.org/redmine/trunk@17831 e93f8b46-1217-0410-a6f0-8f06a7374b81
2019-01-20 07:39:13 +00:00
Go MAEDA
9709f8f364 Mercurial 4.7 compatibility (#29413).
Patch by Frédéric Fondement.


git-svn-id: http://svn.redmine.org/redmine/trunk@17474 e93f8b46-1217-0410-a6f0-8f06a7374b81
2018-08-25 08:40:32 +00:00
Go MAEDA
b7f15fbadc Replace String#gsub with faster String#tr (#29363).
Patch by Go MAEDA.


git-svn-id: http://svn.redmine.org/redmine/trunk@17469 e93f8b46-1217-0410-a6f0-8f06a7374b81
2018-08-12 23:40:44 +00:00
Go MAEDA
eee1c36b4b Replace Enumerable#sort with faster Enumerable#sort_by (#29299).
Patch by Go MAEDA.


git-svn-id: http://svn.redmine.org/redmine/trunk@17462 e93f8b46-1217-0410-a6f0-8f06a7374b81
2018-08-02 21:54:21 +00:00
Go MAEDA
bff0fbce8b Remove RDoc tags (#28943).
Patch by Sho HASHIMOTO.


git-svn-id: http://svn.redmine.org/redmine/trunk@17370 e93f8b46-1217-0410-a6f0-8f06a7374b81
2018-06-08 00:55:41 +00:00
Go MAEDA
eafe8a9f9e Mercurial 4.6 compatibility (#28725).
Patch by Marc Schlaich and Frédéric Fondement.


git-svn-id: http://svn.redmine.org/redmine/trunk@17351 e93f8b46-1217-0410-a6f0-8f06a7374b81
2018-05-28 09:40:15 +00:00
Toshi MARUYAMA
9d797400ea mercurial: work around faulty parsing of early command options (#27516)
Use -sVALUE and --long=VALUE instead of "-s VALUE" and "--long VALUE"
respectively.

Contributed by Yuya Nishihara.

git-svn-id: http://svn.redmine.org/redmine/trunk@17062 e93f8b46-1217-0410-a6f0-8f06a7374b81
2017-12-07 11:38:47 +00:00
Toshi MARUYAMA
58ed865513 mercurial: separate command options and positional arguments with "--" (#27516)
We don't have much problems here thanks to hgtarget(path) and CGI.escape(),
which prepends a repository path and encodes "=" character respectively, but
it's better to not rely on the side effect of these functions.

Contributed by Yuya Nishihara.

git-svn-id: http://svn.redmine.org/redmine/trunk@17061 e93f8b46-1217-0410-a6f0-8f06a7374b81
2017-12-07 11:38:35 +00:00
Toshi MARUYAMA
ca87bf766c mercurial: reject malicious command argument (#27516)
We've got a security report from the Phabricator team, which basically says
--config and --debugger arguments can be injected anywhere to lead to an
arbitrary command execution.

https://secure.phabricator.com/rPa7921a4448093d00defa8bd18f35b8c8f8bf3314

This is a fundamental issue of the argument parsing rules in Mercurial, which
allows extensions to populate their parsing rules and such extensions can be
loaded by "--config extensions.<name>=". There's a chicken and egg problem.
We're working on hardening the parsing rules, but which won't come in by
default as it would be a behavior change.

This patch adds a verification to reject malicious command arguments as a
last ditch. The subsequent patches will fix the problem in more appropriate
way.

Contributed by Yuya Nishihara.

git-svn-id: http://svn.redmine.org/redmine/trunk@17060 e93f8b46-1217-0410-a6f0-8f06a7374b81
2017-12-07 11:38:23 +00:00
Toshi MARUYAMA
432cf42b47 git: remove "--no-color" option from "git --version" for git 2.14 compatibility (#26645)
git-svn-id: http://svn.redmine.org/redmine/trunk@16948 e93f8b46-1217-0410-a6f0-8f06a7374b81
2017-08-08 05:10:32 +00:00
Jean-Philippe Lang
0910b2bdbe Drop Darcs support (#26391).
Patch by Go MAEDA.

git-svn-id: http://svn.redmine.org/redmine/trunk@16886 e93f8b46-1217-0410-a6f0-8f06a7374b81
2017-07-25 17:32:53 +00:00
Jean-Philippe Lang
7fd04e1f8d Update copyright.
git-svn-id: http://svn.redmine.org/redmine/trunk@16685 e93f8b46-1217-0410-a6f0-8f06a7374b81
2017-06-25 08:40:31 +00:00
Jean-Philippe Lang
5744bfc2c6 Removes duplicate shell_quote method (#26149).
Patch by Jens Krämer.

git-svn-id: http://svn.redmine.org/redmine/trunk@16667 e93f8b46-1217-0410-a6f0-8f06a7374b81
2017-06-17 07:42:54 +00:00
Toshi MARUYAMA
06babbec7e remove is_binary_data? from String (#25563)
git-svn-id: http://svn.redmine.org/redmine/trunk@16644 e93f8b46-1217-0410-a6f0-8f06a7374b81
2017-06-10 04:29:15 +00:00
Toshi MARUYAMA
14cfe2c67a git: use '--no-renames' option in 'show' command (#25371)
git-svn-id: http://svn.redmine.org/redmine/trunk@16428 e93f8b46-1217-0410-a6f0-8f06a7374b81
2017-03-24 15:53:04 +00:00
Toshi MARUYAMA
47dff44278 Git 2.9 compatibility (#25371)
git-svn-id: http://svn.redmine.org/redmine/trunk@16422 e93f8b46-1217-0410-a6f0-8f06a7374b81
2017-03-20 17:17:55 +00:00
Toshi MARUYAMA
79fb434fec Mercurial 4.1 compatibility (#24999)
git-svn-id: http://svn.redmine.org/redmine/trunk@16329 e93f8b46-1217-0410-a6f0-8f06a7374b81
2017-02-05 05:22:29 +00:00