Project

General

Profile

Actions

Defect #816

closed

Remote Subversion repositories are not refreshed by the application

Added by Kai Janson almost 17 years ago. Updated almost 17 years ago.

Status:
Closed
Priority:
High
Assignee:
-
Category:
SCM
Target version:
-
Start date:
2008-03-08
Due date:
% Done:

100%

Estimated time:
Resolution:
Invalid
Affected version:

Description

All my subversion repositories are held online. I have to manually run "Repository.fetch_changesets" from the command line
in order to see the latest commits. That's very bothersome.

I wonder if it should be configurable to include the "Repository.fetch_changesets" command everytime
I click on the repository tab, or offer a refresh button that does exactly that.

The remote Subversion servers are in version 1.3 and 1.4.


Files

Picture_3.png (65.4 KB) Picture_3.png Kai Janson, 2008-03-08 18:56

Related issues

Is duplicate of Redmine - Defect #825: Remote Subversion repositories are not refreshed by the applicationClosed2008-03-08

Actions
Actions #1

Updated by Ale Muñoz almost 17 years ago

What version are you using?

I'm using SVN trunk, and for some time (r1163?) there's been an "Autofetch commits" option in Administration » Settings » Repositories that does exactly that.

Actions #2

Updated by Jean-Philippe Lang almost 17 years ago

I confirm, this option is available in 0.6.3. And it should do exactly what you're asking for (retreive the commits when you click the repository tab). See 'Autofetch commits' in application settings.

Make sure this option is checked and tell me if it doesn't work. Just one question: does the repository browsing work ?
Another option is to add a simple cron job that runs Repository.fetch_changesets.

Actions #3

Updated by Kai Janson almost 17 years ago

I was hoping that the Autofetch commits option would solve my issue, but it doesn't.
I have to drop into the command line and run rake redmine:fetch_changesets every time by hand.

The remote SVN server is running Subversion 1.4.2.

Actions #4

Updated by Kai Janson almost 17 years ago

I was able to find the culprit in the logfile.

Parameters: {"action"=>"show", "id"=>"virtualmalls", "controller"=>"repositories"}
Error parsing svn output: #<REXML::ParseException: No close tag for /lists/list>
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rexml/parsers/treeparser.rb:27:in `parse'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rexml/document.rb:204:in `build'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rexml/document.rb:42:in `initialize'
/Users/Shared/redmine_new/lib/redmine/scm/adapters/subversion_adapter.rb:72:in `new'
/Users/Shared/redmine_new/lib/redmine/scm/adapters/subversion_adapter.rb:72:in `entries'
/Users/Shared/redmine_new/lib/redmine/scm/adapters/abstract_adapter.rb:118:in `call'
/Users/Shared/redmine_new/lib/redmine/scm/adapters/abstract_adapter.rb:118:in `shellout'
/Users/Shared/redmine_new/lib/redmine/scm/adapters/abstract_adapter.rb:116:in `popen'
/Users/Shared/redmine_new/lib/redmine/scm/adapters/abstract_adapter.rb:116:in `shellout'
/Users/Shared/redmine_new/lib/redmine/scm/adapters/subversion_adapter.rb:69:in `entries'
/Users/Shared/redmine_new/app/models/repository.rb:42:in `entries'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/activerecord-1.15.6/lib/active_record/associations/association_proxy.rb:123:in `send'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/activerecord-1.15.6/lib/active_record/associations/association_proxy.rb:123:in `method_missing'
/Users/Shared/redmine_new/app/controllers/repositories_controller.rb:55:in `show'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/actionpack-1.13.6/lib/action_controller/base.rb:1101:in `send'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/actionpack-1.13.6/lib/action_controller/base.rb:1101:in `perform_action_without_filters'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/actionpack-1.13.6/lib/action_controller/filters.rb:696:in `call_filters'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/actionpack-1.13.6/lib/action_controller/filters.rb:688:in `perform_action_without_benchmark'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/actionpack-1.13.6/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/benchmark.rb:293:in `measure'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/actionpack-1.13.6/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/actionpack-1.13.6/lib/action_controller/rescue.rb:83:in `perform_action'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/actionpack-1.13.6/lib/action_controller/base.rb:435:in `send'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/actionpack-1.13.6/lib/action_controller/base.rb:435:in `process_without_filters'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/actionpack-1.13.6/lib/action_controller/filters.rb:684:in `process_without_session_management_support'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/actionpack-1.13.6/lib/action_controller/session_management.rb:114:in `process'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/actionpack-1.13.6/lib/action_controller/base.rb:334:in `process'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rails-1.2.6/lib/dispatcher.rb:41:in `dispatch'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:78:in `process'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `synchronize'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `process'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:618:in `process_client'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `each'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `process_client'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `initialize'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `new'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `initialize'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `new'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `run'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:271:in `run'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `each'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `run'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:127:in `run'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:in `run'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:243
/usr/bin/mongrel_rails:16:in `load'
/usr/bin/mongrel_rails:16
...
No close tag for /lists/list
Line:
Position:
Last 80 unconsumed characters:

Output was:

<lists>
<list
path="http://XXXXXXXXXX/YYYYYYYYYY">

Rendering within layouts/base
Rendering repositories/show
Completed in 1.04167 (0 reqs/sec) | Rendering: 0.17627 (16%) | DB: 0.01541 (1%) | 200 OK [http://abc-def.org/repositories/show/xxxxxxx]

Actions #5

Updated by Jean-Philippe Lang almost 17 years ago

It looks like the user that you use to run the app can not access the repository. That's why it works when do it manually.
Can you check that ? And are you able to browse the repository from within the app ?

Actions #6

Updated by Kai Janson almost 17 years ago

I have full control over the repository; I can browse it online, I can use it with Subversion in TextMate and I make commits to the
repository using all of the above mechanisms. Whenever I run the rake command to fetch the latest commits I can do it exactly one time.
When I close the browser and come back the detailed list of the repository is gone and then I can't see any activities nor changes to the
repository.

Screenshot is attached to show just that.

Actions #7

Updated by Jean-Philippe Lang almost 17 years ago

I believe that you have full control over the repository but the 'svn list' command fails and I can't guess why. Can you run this command from the host where redmine runs:

svn list --xml http://XXXXXXXXXX/YYYYYYYYYY
Actions #8

Updated by Kai Janson almost 17 years ago

Here is the snippet from the command svn list --xml http://XXXXX/YYYYY as requested.

[server]$ svn list --xml http://XXXXX/YYYYY
<?xml version="1.0"?>
<lists>
<list
   path="http://XXXXX/YYYYY">
Authentication realm: <http://XXXXX:80> YYYYYYYYY
Authentication realm: <http://XXXXX:80> YYYYYYYYY
Username: kjanson
Password for 'kjanson': 
<entry
   kind="file">
<name>README</name>
<size>9167</size>
<commit
   revision="24">
<author>kjanson</author>
<date>2008-03-08T18:17:32.079166Z</date>
</commit>
</entry>
<entry
   kind="file">
<name>Rakefile</name>
<size>308</size>
<commit
   revision="6">
<author>kjanson</author>
<date>2008-03-01T09:53:22.563494Z</date>
</commit>
</entry>
<entry
   kind="dir">
<name>app</name>
<commit
   revision="24">
<author>kjanson</author>
<date>2008-03-08T18:17:32.079166Z</date>
</commit>
</entry>
<entry
   kind="dir">
<name>components</name>
<commit
   revision="1">
<author>kjanson</author>
<date>2008-02-19T14:53:05.239183Z</date>
</commit>
</entry>
<entry
   kind="dir">
<name>config</name>
<commit
   revision="20">
<author>kjanson</author>
<date>2008-03-07T04:40:45.939400Z</date>
</commit>
</entry>
<entry
   kind="dir">
<name>db</name>
<commit
   revision="18">
<author>kjanson</author>
<date>2008-03-06T06:43:58.215247Z</date>
</commit>
</entry>
<entry
   kind="dir">
<name>doc</name>
<commit
   revision="13">
<author>kjanson</author>
<date>2008-03-03T05:36:41.088087Z</date>
</commit>
</entry>
<entry
   kind="dir">
<name>lib</name>
<commit
   revision="7">
<author>kjanson</author>
<date>2008-03-01T09:55:18.118052Z</date>
</commit>
</entry>
<entry
   kind="dir">
<name>public</name>
<commit
   revision="20">
<author>kjanson</author>
<date>2008-03-07T04:40:45.939400Z</date>
</commit>
</entry>
<entry
   kind="dir">
<name>script</name>
<commit
   revision="3">
<author>kjanson</author>
<date>2008-02-29T03:47:24.415460Z</date>
</commit>
</entry>
<entry
   kind="dir">
<name>spec</name>
<commit
   revision="6">
<author>kjanson</author>
<date>2008-03-01T09:53:22.563494Z</date>
</commit>
</entry>
<entry
   kind="dir">
<name>stories</name>
<commit
   revision="3">
<author>kjanson</author>
<date>2008-02-29T03:47:24.415460Z</date>
</commit>
</entry>
<entry
   kind="dir">
<name>test</name>
<commit
   revision="18">
<author>kjanson</author>
<date>2008-03-06T06:43:58.215247Z</date>
</commit>
</entry>
<entry
   kind="dir">
<name>vendor</name>
<commit
   revision="10">
<author>kjanson</author>
<date>2008-03-02T07:58:17.970623Z</date>
</commit>
</entry>
</list>
</lists>
Actions #9

Updated by Kai Janson almost 17 years ago

I just created a free account at http://www.unfuddle.com to see if it is just my remote Subversion server, but the Unfuddle.com Subversion behaves exactly the same. Not any different.

Here are the steps I performed:
  • Created account at unfuddle.com
  • Created new project in redmine
  • Created Repository section with proper username and password + Subversion's URL @ unfuddle.com
  • Dropped into command line and checked out the newly created repository from unfuddle.com
  • Added a file to the repository by editing test.rb
  • Ran svn add test.rb
  • Ran svn commit
  • Commited file successfully
  • Switched to Redmine and clicked on the Repository tab
  • Redmine did not show the commit
  • Dropped into command line on the server (at my house) and ran rake redmine:fetch_changesets
  • Clicked on Repositories again and this time it would show the commit I made
  • Edited the test.rb file again, commited it again as before
  • Clicked on the Repository tab again and it did not fetch the new commit

I hope that helps.

Actions #10

Updated by Jean-Philippe Lang almost 17 years ago

I've just made a quick test with an Unfuddle repository and everything works fine.

The result you get when the command is ran by the app (only the xml first tags):

<lists>
<list
path="http://XXXXXXXXXX/YYYYYYYYYY">

means that the repository can not be accessed and I can't tell you why.

Could you try to change (in lib/redmine/scm/adapters/subversion_adapter.rb) this:

cmd = "#{SVN_BIN} list --xml #{target(path)}@#{identifier}"

to:

cmd = "#{SVN_BIN} list --xml #{target(path)}@#{identifier} 2>&1"

and see the result in the log after having restarted the app.

Actions #11

Updated by Kai Janson almost 17 years ago

Jean-Phillippe,

THAT fixed it. Thank you VERY much!
Redirecting stderr to stdout was the solution to this issue.

Again, thank you very much!

Actions #12

Updated by Kai Janson almost 17 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

After several hours of using Redmine now, I can close the ticket. The provided fix took care of all my grief.

Actions #13

Updated by Jean-Philippe Lang almost 17 years ago

  • Status changed from Resolved to Closed
  • Resolution set to Invalid

See #825.

Actions

Also available in: Atom PDF