I'm looking for a part-time remote job.

Hire me


I'm the author of:

Mastering Redmine is a comprehensive guide with tips, tricks and best practices, and an easy-to-learn structure.

Check the book's project or

Buy the book

Social pages of the book:

By buying this book you also donate to Redmine (see this page).


Follow me:

Bug #2017

SCM Creation on Windows

Added by Sascha Voth almost 8 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
04 Apr 2012
Due date:
01 Jun 2012
% Done:

100%

Redmine version:
External issue:

Description

Winddows Server

Redmine 1.3.2
SCM Creator 0.3

scm.yml
-------

production:
auto_create: false
deny_delete: false
svn:
path: E:\svn\managed_repositories
svnadmin: C:\Apache-Subversion-1.7.4\bin\svnadmin.exe
url: http://mydomain.de/svn


Getting some strange errors when using SCM Creator. When creating a Subversion repository in existing project, the automatically created URL is “file://E:/svn/managed_repositories/<p-id>”. This should be “file:///E:/svn/managed_repositories/d-0006” I belive (three slashes). When acessing and trying to delete the repository, both commands fail. I tried to adapt subversion_creator.rb, but since I’ve zero experience in ruby, the results are quite dissapointing.

production_error.log View (8.82 KB) Sascha Voth, 30 May 2012 12:14

production.log View (2.53 KB) Sascha Voth, 31 May 2012 11:35

production.log View (3.84 KB) Sascha Voth, 01 Jun 2012 07:41

Associated revisions

Revision 78 (diff)
Added by Andriy Lesyuk over 7 years ago

Replaced add_to_base(...) with add(:base, ...), worked on #2017

Revision 88 (diff)
Added by Andriy Lesyuk over 7 years ago

Refactoring a little + debugs for #2017

Revision 89 (diff)
Added by Andriy Lesyuk over 7 years ago

Clean up and debug for #2017

History

#1 Updated by Sascha Voth almost 8 years ago

I’ve changed all file:// to file:/// and cleaned up my repository database. Now, when setting deny delete to true, deletion of the project fails, creation works. When setting deny delete to false, everything seems to work, as intended.

#2 Updated by Andriy Lesyuk almost 8 years ago

  • Status changed from New to Open
  • Assignee set to Andriy Lesyuk
  • Target version set to 0.4.0

Thank you for the report!

Now, when setting deny delete to true, deletion of the project fails, creation works. When setting deny delete to false, everything seems to work, as intended.

Seems to normal behaviour?..

#3 Updated by Sascha Voth over 7 years ago

When following your description http://projects.andriylesyuk.com/projects/scm-creator/wiki/Configuration about the option deny_delete, it should not affect the deletion of the redmine project itself, but is does. When trying to delete an project with the DB entry “created_with_scm = 1” i get an error, and the deletion fails:

Internal error
An error occurred on the page you were trying to access.
If you continue to experience problems please contact your Redmine administrator for assistance.
If you are the Redmine administrator, check your log files for details about the error.
Back

production.log

Processing ProjectsController#destroy (for <IP> at 2012-05-16 09:01:23) [DELETE]
Parameters: {“commit"⇒“Löschen”, “confirm"⇒“1”, “action"⇒“destroy”, “_method"⇒“delete”, “authenticity_token"⇒"<SECRETTOKEN>”, “id"⇒“d-0008”, “controller"⇒“projects”}

TypeError (can’t convert nil into String):
vendor/plugins/redmine_scm/app/models/repository_observer.rb:13:in `before_destroy’
e:/webserver/Ruby187/lib/ruby/1.8/observer.rb:185:in `notify_observers’
e:/webserver/Ruby187/lib/ruby/1.8/observer.rb:184:in `each’
e:/webserver/Ruby187/lib/ruby/1.8/observer.rb:184:in `notify_observers’
app/controllers/projects_controller.rb:239:in `destroy’
config/initializers/mongrel.rb:62:in `dispatch_cgi’

Rendering e:/webserver/redmine-1.3.2/public/500.html (500 Internal Server Error)

Normal?

#4 Updated by Andriy Lesyuk over 7 years ago

Oh... For some reason I missed that it fails to delete project. Sorry!
No, it’s not normal!

#5 Updated by Andriy Lesyuk over 7 years ago

  • Status changed from Open to In Progress
  • % Done changed from 0 to 20

Made a fix for file:///... Could you please check?

#6 Updated by Andriy Lesyuk over 7 years ago

  • Target version deleted (0.4.0)

Should not be blocking.

#7 Updated by Sascha Voth over 7 years ago

Still getting errors. Steps i’ve done:

- create new project
- selecting create SVN
- project creation redirects to error page

but

- project is created
- svn is created
- svn can be accessed via "/redmine/projects/d-0009/repository”
- repo settings result in error page "/redmine/projects/d-0009/settings”

Attached a part of the production log.

Regards.

ps: Do you have a time schedule for the 2.* version of your plugin? Since i just start using redmine, i think of switching to 2.* soon.

#8 Updated by Andriy Lesyuk over 7 years ago

  • Target version set to 0.4.0

Thanks for update! Will check.

ps: Do you have a time schedule for the 2.* version of your plugin? Since i just start using redmine, i think of switching to 2.* soon.

If you use other plugins you should wait with switching to 2.x perhaps... SCM Creator from SVN should work fine under 2.x - I have already ported it (but not tested it well).

#9 Updated by Andriy Lesyuk over 7 years ago

Could yoou please show me corresponding record from repositories database table?.. Need to know e.g. if root_url is not NULL.

#10 Updated by Sascha Voth over 7 years ago

Andriy Lesyuk wrote:

Could yoou please show me corresponding record from repositories database table?.. Need to know e.g. if root_url is not NULL.

Took a look into before submitting, but forgot to mention it. Sorry.

select * from redmine.repositories;
select * from redmine.projects;

repositories result

'31', '22', 'file:///E:/svn/managed_repositories/d-0009', '', '', 'file:///E:/svn/managed_repositories/d-0009', 'Subversion', NULL, NULL, NULL, '1'

projects result

'22', 'Hans Projekt Test', '', '', '0', NULL, '2012-05-30 10:30:10', '2012-05-30 10:30:10', 'd-0009', '1', '5', '6'

#11 Updated by Andriy Lesyuk over 7 years ago

  • % Done changed from 20 to 40

Please update from SVN and try loading settings again. Then show me what it wrote to logs.

#12 Updated by Sascha Voth over 7 years ago

Creation works fine. Deletion at least on Redmine level, but not in the file system ( auto_create: true, deny_delete: false ).

Very nice!

#13 Updated by Andriy Lesyuk over 7 years ago

You mean deletion also works? But repo on file system was not deleted?.. I don’t see any errors in logs...

#14 Updated by Sascha Voth over 7 years ago

Andriy Lesyuk wrote:

You mean deletion also works? But repo on file system was not deleted?.. I don’t see any errors in logs...

Yes, deletion works, but repo stays on the file system. Missed to add it in the log. Attached you another one where I:

- Created a project with SVN repo
- Deleted the project with SVN repo via Admin>Projects

There was no error, and the database entries are correctly removed (repositories, projects). But the SVN repository is still in the filesystem.

I’ve tested also deleting not the project, but the repository via the settings panel, which also gave no error in the production log. Should this throw one?

#15 Updated by Andriy Lesyuk over 7 years ago

Hm... Added more debugs - could you please try again?

#16 Updated by Andriy Lesyuk over 7 years ago

Anyway not working deletion is a different issue... Not related to this one! I figured out that I reproduce it too...

So closing this issue as fixed! Thanks, Sascha!

#17 Updated by Andriy Lesyuk over 7 years ago

  • Due date set to 01 Jun 2012
  • Status changed from In Progress to Closed
  • % Done changed from 40 to 100

#18 Updated by Andriy Lesyuk over 7 years ago

http://www.ruby-doc.org/stdlib-1.9.3/libdoc/fileutils/rdoc/FileUtils.html#method-c-remove_entry_secure

In my case it was the parent directory which was everyone writable...

Also available in: Atom PDF

Terms of use | Privacy policy