Commit Graph

67 Commits

Author SHA1 Message Date
Jean-Philippe Lang 30801ca968 Always log scm stderr and makes the log file path configurable.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11209 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-01-20 12:04:23 +00:00
Jean-Philippe Lang ff53a9cfe1 Don't use Iconv with ruby1.9 (#12787).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11177 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-01-12 21:27:36 +00:00
Jean-Philippe Lang e396a0eebe Copyright for 2013 (#12788).
Patch by Daniel Felix.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11169 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-01-12 09:29:31 +00:00
Toshi MARUYAMA 625eebb720 code cleanup scm_iconv (#12228)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10742 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-10-28 11:39:43 +00:00
Toshi MARUYAMA 123d2b318f fix scm_iconv local variable name (#12228)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10741 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-10-28 07:12:23 +00:00
Toshi MARUYAMA 5a2c80cb48 use String#encode at scm_iconv on Ruby 1.9 (#12228)
Unit git adapter test fails on JRuby 1.7.

<pre>
Failure:
  <"test-Ü-2.txt">("UTF-8") expected but was
  <"test-\xC3\x9C-2.txt">("ASCII-8BIT").

  diff:
  - test-Ü-2.txt
  ?      ^
  + test-Ü-2.txt
  ?      ^^
test_entries_latin_1_files(GitAdapterTest)
test/unit/lib/redmine/scm/adapters/git_adapter_test.rb:468:in `test_entries_latin_1_files'
     465:         assert entries1
     466:         assert_equal 3, entries1.size
     467:         f1 = entries1[1]
  => 468:         assert_equal "test-#{@char_1}-2.txt", f1.name
     469:         assert_equal "latin-1-dir/test-#{@char_1}-2.txt", f1.path
     470:         assert_equal 'file', f1.kind
     471:       end
</pre>

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10740 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-10-28 06:19:29 +00:00
Jean-Philippe Lang 65524cc1cc Don't repeat revision on annotate view.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10105 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-28 18:11:03 +00:00
Jean-Philippe Lang 9b63117856 Extract code from view.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9809 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-10 19:19:22 +00:00
Jean-Philippe Lang 7c105ec9e9 Adds a method to load changesets for repository entries.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9805 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-10 18:32:09 +00:00
Jean-Philippe Lang 9b60214b3a Fixed that Repository#entries returns an Array.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9804 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-10 17:01:33 +00:00
Jean-Philippe Lang ba5a052c8c Copyright update.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9636 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-05 12:56:53 +00:00
Jean-Philippe Lang cb16661d36 Removes the XML declaration that breaks the parser with JRuby.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9534 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-26 17:57:49 +00:00
Toshi MARUYAMA 3e11f9abfe scm: git: use stdin instead of command line in "git log" (#10470)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9282 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-03-28 15:40:37 +00:00
Toshi MARUYAMA 2145b650a6 Ruby1.9: scm: use :set_encoding instead of "RUBY_VERSION < '1.9'" for IO.popen (#10470)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9280 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-03-28 10:54:38 +00:00
Etienne Massip 5a33d7292f Backout 8239.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8241 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-12-15 22:15:47 +00:00
Etienne Massip b49f83a22a Log return code if error.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8239 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-12-15 21:59:49 +00:00
Etienne Massip f385a3e3da Handle spaces in development scm stderr log file path.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8129 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-12-08 19:22:00 +00:00
Toshi MARUYAMA 033214578f scm: lib: add Branch class to abstract adapter (#5501)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7670 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-10-28 05:17:13 +00:00
Toshi MARUYAMA 0ff17efb4d scm: lib: add parents attribute to Revision class of abstract adapter (#5501)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7665 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-10-28 04:55:54 +00:00
Toshi MARUYAMA ecc042dce1 scm: add new method "shell_quote_command" at abstract adapter (#8825).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6272 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-07-15 11:43:53 +00:00
Toshi MARUYAMA 34f838685b scm: catch all exceptions at adapter shellout() to fork scm command (#8510, #6713, #4725, #5404).
If scm command does not exist,
Linux JRuby 1.6.2 (ruby-1.8.7-p330) raises java.io.IOException in production environment.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6230 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-07-10 21:47:30 +00:00
Toshi MARUYAMA f2629db043 scm: replace RAILS_DEFAULT_LOGGER to Rails.logger at abstract adapter.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6122 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-06-22 23:42:37 +00:00
Toshi MARUYAMA 53b7af73b1 scm: replace RAILS_ROOT to Rails.root at lib/redmine/scm/adapters/abstract_adapter.rb.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6085 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-06-17 01:19:50 +00:00
Toshi MARUYAMA 283db475e1 scm: add log message of config/configuration.yml if scm command raise Errno::ENOENT exception (#7517, #4273).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6007 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-06-08 11:19:57 +00:00
Toshi MARUYAMA b2d04df37e scm: code clean up abstract adapter.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6006 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-06-08 11:19:13 +00:00
Toshi MARUYAMA 793accb14a scm: switch to use shell quote with parameter in abstract adapter target().
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5906 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-05-25 23:50:59 +00:00
Toshi MARUYAMA d57910c39e scm: move ScmCommandAborted class from git and cvs adapter to abstract adapter.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5901 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-05-25 16:14:15 +00:00
Toshi MARUYAMA 3d4a3315f6 scm: add "path_encoding" method in abstract adapter (#2274, #3462, #2664, #5251).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5863 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-05-21 02:16:51 +00:00
Toshi MARUYAMA e9e477426a scm: remove trailing white-spaces from abstract adapter source.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5672 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-05-06 13:48:36 +00:00
Toshi MARUYAMA 905a809774 scm: add "options" parameter in adapter entries().
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5638 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-05-04 14:11:25 +00:00
Toshi MARUYAMA 8df05b9a6d scm remove trailing white-spaces in abstract adapter.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5637 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-05-04 13:16:10 +00:00
Toshi MARUYAMA 32a9937d4e scm: code clean up abstract_adapter.rb.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5404 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-11 10:25:38 +00:00
Toshi MARUYAMA 0606dfdb62 scm: move :identifier from to attr_accessor in AbstractAdapter::Revision class.
All scms which support blame use identifier.
This commit remove the link of cvs blame revision.
Redmine can not handle cvs revision (e.g. 1.2) as changeset identifier.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5403 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-11 10:24:44 +00:00
Toshi MARUYAMA bac26830e5 scm: code clean up lib/redmine/scm/adapters/abstract_adapter.rb.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5381 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-10 08:11:18 +00:00
Toshi MARUYAMA d7aa303a5c scm: git: move saving changesets from adapter to model (#3396).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4959 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-02-28 04:46:42 +00:00
Toshi MARUYAMA 9937ac677f scm: update adapter initialize() to use path encoding (#2664, #2274).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4941 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-02-24 05:58:59 +00:00
Toshi MARUYAMA e51aeb5a40 scm: use "ASCII-8BIT" in IO.popen() in Ruby 1.9.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4938 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-02-24 04:03:16 +00:00
Toshi MARUYAMA 8963579be3 scm: add "scm_iconv" method for repository path encoding in abstract_adapter.rb (#2664, #2274).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4906 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-02-21 12:10:16 +00:00
Toshi MARUYAMA bd9a3a720c scm: space cleanup of lib/redmine/scm/adapters/abstract_adapter.rb.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4861 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-02-18 00:57:43 +00:00
Toshi MARUYAMA 8b98c05879 scm: use shell quote for scm command at adapter level (#7517, #4273).
"C:\Program Files\TortoiseHg\hg.exe" can be used in config/configuration.yml.

In Ruby 1.9 IO.popen, if cmd is an Array of String,
it will be used as the subprocess‘s argv bypassing a shell.

See http://www.ruby-doc.org/core/classes/IO.html

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4821 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-02-14 06:14:34 +00:00
Toshi MARUYAMA 2e1bcb2abf Changing revision label and identifier at SCM adapter level (#3724, #6092)
Contributed by Yuya Nishihara.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4613 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-01-02 09:45:05 +00:00
Jean-Philippe Lang 103698b371 Wraps changeset creation inside a single transation.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3469 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-02-21 14:38:34 +00:00
Jean-Philippe Lang b1a92b9b2e Fixed: Subversion password visible in development logs (#4448).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3251 e93f8b46-1217-0410-a6f0-8f06a7374b81
2009-12-26 16:20:22 +00:00
Jean-Philippe Lang cabf052127 Prevent undefined method `<=>' for nil:NilClass in AbstractAdapter (#4098).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2957 e93f8b46-1217-0410-a6f0-8f06a7374b81
2009-10-24 11:08:09 +00:00
Eric Davis c28b044d68 Added branch and tag support to the git repository viewer. (#1406)
Many thanks to Adam Soltys and everyone else who tested this patch.

* Updated git test repository so it has a branch with some differences from the master branch
* Moved redmine diff class into a module so as not to clash with diff-lcs gem which is required by grit
* Find changesets from all branches, not just master
* Got revision browsing working
* Got file actions working properly
* Allow browsing by short form of commit identifier
* Added a method to retrieve repository branches
* Allow browsing by branch names as well as commit numbers
* Handle the case where a git repository has no master branch
* Expand revision box and handle finding revisions by first 8 characters
* Added branches dropdown to repository show page
* Combined repository browse and show into a single action.  Moved branch/revision navigation into a partial.
* Renamed partial navigation -> breadcrumbs
* Made it so latest revisions list uses branch and path context
* Preserve current path when changing branch or revision
* Perform slightly more graceful error handling in the case of invalid repository URLs
* Allow branch names to contain periods
* Allow dashes in branch names
* Sort branches by name
* Adding tags dropdown
* Need to disable both branches and tags dropdowns before submitting revision form
* Support underscores in revision (branch/tag) names
* Making file history sensitive to current branch/tag/revision, adding common navigation to changes page
* Updated translation files to include labels for 'branch', 'tag', and 'view all revisions'
* Reenable fields after submit so they don't look disabled and don't stay disabled on browser back button
* Instead of dashes just use empty string for default dropdown value
* Individual entry views now sport the upgraded revision navigation
* Don't display dropdowns with no entries
* Consider all revisions when doing initial load
* Fixed bug grabbing changesets.  Thanks to Bernhard Furtmueller for catching.
* Always check the entire log to find new revisions, rather than trying to go forward from the latest known one
* Added some cleverness to avoid selecting the whole changesets table any time someone views the repository root
* File copies and renames being detected properly
* Return gracefully if no revisions are found in the git log
* Applied patch from Babar Le Lapin to improve Windows compatibility

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2840 e93f8b46-1217-0410-a6f0-8f06a7374b81
2009-08-15 22:41:40 +00:00
Jean-Philippe Lang a37f4b9cf6 Capture scm CLI stderr to log/scm.stderr.log when running in dev environment
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2128 e93f8b46-1217-0410-a6f0-8f06a7374b81
2008-12-12 16:07:14 +00:00
Jean-Philippe Lang dbf4438dda More detailed error message in log when scm command fails (#1682).
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1757 e93f8b46-1217-0410-a6f0-8f06a7374b81
2008-08-25 12:31:53 +00:00
Jean-Philippe Lang 0d55652552 Fixes method name in AbstractAdapter.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1756 e93f8b46-1217-0410-a6f0-8f06a7374b81
2008-08-25 12:27:15 +00:00
Jean-Philippe Lang 116091a1d2 Fixes platform determination under JRuby (#1804).
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1753 e93f8b46-1217-0410-a6f0-8f06a7374b81
2008-08-25 11:01:37 +00:00
Jean-Philippe Lang 622b6121f4 Fixes nil error when svn binary version is unknown (#1607).
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1652 e93f8b46-1217-0410-a6f0-8f06a7374b81
2008-07-12 09:06:19 +00:00