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
Jean-Philippe Lang
ad0aa40ef1
Autoloading Redmine::Scm::Adapters::CommandFailed might fail.
...
git-svn-id: http://svn.redmine.org/redmine/trunk@15914 e93f8b46-1217-0410-a6f0-8f06a7374b81
2016-10-20 17:41:16 +00:00
Jean-Philippe Lang
cda9c63d9c
Updates copyright for 2016.
...
git-svn-id: http://svn.redmine.org/redmine/trunk@15238 e93f8b46-1217-0410-a6f0-8f06a7374b81
2016-03-13 10:30:10 +00:00
Jean-Philippe Lang
ad8cfe1887
Newlines stripped from CVS commit messages ( #19835 ).
...
git-svn-id: http://svn.redmine.org/redmine/trunk@14301 e93f8b46-1217-0410-a6f0-8f06a7374b81
2015-06-13 06:38:26 +00:00
Toshi MARUYAMA
585642d072
scm: git: simplify nil check ( #18923 )
...
On Ruby, "if []" is true
git-svn-id: http://svn.redmine.org/redmine/trunk@13931 e93f8b46-1217-0410-a6f0-8f06a7374b81
2015-01-21 12:04:24 +00:00
Toshi MARUYAMA
4dbdff1479
remove trailing white-spaces from lib/redmine/scm/adapters/git_adapter.rb
...
git-svn-id: http://svn.redmine.org/redmine/trunk@13928 e93f8b46-1217-0410-a6f0-8f06a7374b81
2015-01-21 11:47:28 +00:00
Toshi MARUYAMA
6097e247f4
scm: git: branches return cache too when there is no branch ( #18923 )
...
git-svn-id: http://svn.redmine.org/redmine/trunk@13927 e93f8b46-1217-0410-a6f0-8f06a7374b81
2015-01-21 10:58:57 +00:00
Toshi MARUYAMA
64d65b6e27
scm: git: explicitly tags return [] if there is no tag ( #18923 )
...
git-svn-id: http://svn.redmine.org/redmine/trunk@13926 e93f8b46-1217-0410-a6f0-8f06a7374b81
2015-01-21 10:58:45 +00:00
Jean-Philippe Lang
9915962356
Make sure that #scm_iconv returns a string with the target encoding ( #14534 ).
...
filechanges.find_by_revision_and_path fails with SQLite if arguments are not UTF-8 encoded.
git-svn-id: http://svn.redmine.org/redmine/trunk@13902 e93f8b46-1217-0410-a6f0-8f06a7374b81
2015-01-18 16:16:23 +00:00
Jean-Philippe Lang
000124f44f
Copyright update.
...
git-svn-id: http://svn.redmine.org/redmine/trunk@13872 e93f8b46-1217-0410-a6f0-8f06a7374b81
2015-01-11 09:09:50 +00:00
Toshi MARUYAMA
a9298224b1
fix Ruby 2.2 warning at lib/redmine/scm/adapters/cvs_adapter.rb
...
On ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-linux]:
<pre>
lib/redmine/scm/adapters/cvs_adapter.rb:342:
warning: Comparable#== will no more rescue exceptions of #<=> in the next release.
lib/redmine/scm/adapters/cvs_adapter.rb:342:
warning: Return nil in #<=> if the comparison is inappropriate or avoid such comparison.
</pre>
git-svn-id: http://svn.redmine.org/redmine/trunk@13831 e93f8b46-1217-0410-a6f0-8f06a7374b81
2015-01-03 17:31:01 +00:00
Jean-Philippe Lang
2d1866d966
Merged rails-4.1 branch ( #14534 ).
...
git-svn-id: http://svn.redmine.org/redmine/trunk@13482 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-10-22 17:37:16 +00:00
Toshi MARUYAMA
0cf7a27b50
use Python getattr instead of hasattr ( #16177 )
...
git-svn-id: http://svn.redmine.org/redmine/trunk@12935 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-26 16:28:43 +00:00
Toshi MARUYAMA
7b295f379b
Mercurial 2.9 compatibility ( #16177 )
...
git-svn-id: http://svn.redmine.org/redmine/trunk@12930 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-26 12:01:00 +00:00
Toshi MARUYAMA
5872d079e6
scm: mercurial: use long id in adapter level ( #14361 )
...
git-svn-id: http://svn.redmine.org/redmine/trunk@12761 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-02 04:44:38 +00:00
Toshi MARUYAMA
f2ec6f8d77
back out r12752 ( #14361 )
...
Revision, Author and Comment of repository browser are broken.
git-svn-id: http://svn.redmine.org/redmine/trunk@12753 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-01 08:46:47 +00:00
Toshi MARUYAMA
ae68ff1100
scm: mercurial: use long id in adapter level ( #14361 )
...
git-svn-id: http://svn.redmine.org/redmine/trunk@12752 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-01 07:47:04 +00:00
Toshi MARUYAMA
7c56ed6004
fix source indent of Redmine::Scm::Adapters::AbstractAdapter#without_trailling_slash
...
git-svn-id: http://svn.redmine.org/redmine/trunk@12741 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-31 09:38:43 +00:00
Toshi MARUYAMA
35cc911192
update copyright year ( #15977 )
...
Contributed by Daniel Felix.
git-svn-id: http://svn.redmine.org/redmine/trunk@12736 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-29 22:45:39 +00:00
Toshi MARUYAMA
e10aa2529d
change requirement in bazaar lib as same with other scm libs ( #15756 )
...
git-svn-id: http://svn.redmine.org/redmine/trunk@12456 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-12-24 05:06:36 +00:00
Jean-Philippe Lang
a657a12450
Don't load redcarpet with JRuby.
...
git-svn-id: http://svn.redmine.org/redmine/trunk@12453 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-12-23 17:07:51 +00:00
Toshi MARUYAMA
3782836e73
fix disable to run test environment
...
git-svn-id: http://svn.redmine.org/redmine/trunk@12387 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-12-09 04:30:51 +00:00
Jean-Philippe Lang
a22242ed20
Fixed uninitialized constant Redmine::Scm::Adapters::CommandFailed error when reloading in development mode.
...
git-svn-id: http://svn.redmine.org/redmine/trunk@12273 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-11-11 22:02:21 +00:00
Toshi MARUYAMA
9002477006
scm: git: use "--encoding=UTF-8" for blame ( #14931 )
...
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@12143 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-09-18 06:16:55 +00:00
Jean-Philippe Lang
01a9e17c49
CVS root_url not recognized when connection string does not include port ( #14422 ).
...
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@12027 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-07-15 21:06:54 +00:00
Jean-Philippe Lang
633e4a00e6
Check that the SCM log file is writable before using it ( #13541 ).
...
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11698 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-04-03 20:01:41 +00:00
Jean-Philippe Lang
d8769cb27c
Log SCM stderr when log level is set to debug only ( #13541 ).
...
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11680 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-03-22 07:50:28 +00:00
Jean-Philippe Lang
7643281510
undefined method `strip' for nil:NilClass error with JRuby 1.7.2 ( #12228 ).
...
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11278 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-01-27 10:50:19 +00:00