Project

General

Profile

Actions

Feature #4273

closed

SCM command availability automatic check in administration panel

Added by Anton Andriyevskyy about 15 years ago. Updated over 13 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Toshi MARUYAMA
Category:
SCM
Target version:
Start date:
2009-11-23
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed

Description

This feature request is based on forum's topic:
http://www.redmine.org/boards/2/topics/8609#message-8637

When running redmine as windows service, it's not guaranteed that users will have "svn" command available, especially on windows, and setting up access to repository ends with this error message:
http://i49.tinypic.com/v3o9c3.png

In order to simplicify administration process, I propose to check if "svn" command if available when they save settings:
http://i49.tinypic.com/x5cj08.png

If it's not, we have 2 options to ask user to make "svn" command available

1. Either by installing svn client on *nix

2. Or by installing svn client / server on windows and putting path to executable into PATH folder.

2.1. Maybe it's also good option to simply ask them path to svn executable on windows.

Also it's good point to note on this settings page that not all windows clients has svn.exe executable itself (for example, tortoisesvn client has no svn executable), so you must recommend to install SVN server with standard svn.exe available and which supports standard SVN commands (like tortoise svn does not) - as for me it will be just good tip for users that are not so familiar with servers, services and clients terminology, and so you will improve gui considerably and make settings more easy to understand and more user-friendly (while implementation is so simple).

p.s. I thinked about this issue because I lost 2 hours myself by setting up integration with svn over https and under windows server 2003.

Home makes sense,
Anton Andriyevskyy


Files

info.png (54.8 KB) info.png Toshi MARUYAMA, 2011-02-09 13:40
settings.png (29.5 KB) settings.png Toshi MARUYAMA, 2011-02-09 13:40
info-20110218.png (59.4 KB) info-20110218.png Toshi MARUYAMA, 2011-02-18 14:03
scm-info-view.diff (2.1 KB) scm-info-view.diff Toshi MARUYAMA, 2011-02-18 14:03
scm-info-view-select.diff (981 Bytes) scm-info-view-select.diff Toshi MARUYAMA, 2011-02-18 14:55
hg.png (11.5 KB) hg.png Toshi MARUYAMA, 2011-05-04 09:54
bzr.png (9.96 KB) bzr.png Toshi MARUYAMA, 2011-05-04 09:54
scm_checkboxes_admin.PNG (3.08 KB) scm_checkboxes_admin.PNG Etienne Massip, 2011-05-19 16:04
admin-repo.png (31 KB) admin-repo.png Toshi MARUYAMA, 2011-05-29 09:44

Related issues

Related to Redmine - Feature #7517: Configurable path of executable for scm adaptersClosedToshi MARUYAMA2011-02-02

Actions
Related to Redmine - Defect #1604: Provide a more meaningful error when running an earlier version of the svn clientClosed2008-07-08

Actions
Related to Redmine - Feature #2799: Support for Bazaar's shared reposetories (created with init-repo)New2009-02-21

Actions
Actions #1

Updated by Jean-Philippe Lang about 15 years ago

  • Priority changed from Low to Normal
  • Target version set to 1.0.0 (RC)

That would help indeed.

Actions #2

Updated by Asher Baker almost 15 years ago

(for example, tortoisesvn client has no svn executable), so you must recommend to install SVN server with standard svn.exe available and which supports standard SVN commands (like tortoise svn does not)

Actually it is included, since TortoisSVN is only an interface for the command line client, and afaik also added to the path.
Other than that note, it's a great idea.

Actions #3

Updated by Eric Davis over 14 years ago

  • Subject changed from "svn" availability automatic check in administration panel to SCM binary availability automatic check in administration panel
  • Estimated time deleted (3.00 h)
Actions #4

Updated by Eric Davis over 14 years ago

  • Target version deleted (1.0.0 (RC))

No patch uploaded and we are already well past the feature freeze for 1.0. Maybe in 1.1.

Actions #5

Updated by Toshi MARUYAMA almost 14 years ago

  • Category changed from Administration to SCM
Actions #6

Updated by Toshi MARUYAMA almost 14 years ago

  • Subject changed from SCM binary availability automatic check in administration panel to SCM command availability automatic check in administration panel
  • Assignee set to Toshi MARUYAMA

I change subject "binary" to "command".
Because Mercurial /usr/bin/hg is python script.

$ file /usr/bin/hg
/usr/bin/hg: a /usr/bin/python script text executable
$ file /usr/bin/bzr
/usr/bin/bzr: a /usr/bin/python script text executable
Actions #7

Updated by Toshi MARUYAMA almost 14 years ago

I start to implement this feature.

Actions #8

Updated by Toshi MARUYAMA almost 14 years ago

This is showing SCM info patch.
Please review.

Actions #9

Updated by Etienne Massip almost 14 years ago

Patch is based on "a" and "b" project paths, could you make it based on project root ?

At first glance, I'd say that code is neat and that "SCM" title should not be the same size than "Information".

Just a thought : SCM information could also be located in / linked to the Administration/Settings/Repositories/activated SCM list if you plan to change its behavior so that the administrator immediately understand the reason he can't activate such scm.

I'll test it later.

Actions #10

Updated by Toshi MARUYAMA almost 14 years ago

Thank you for reviewing.

This is select list patch.

Actions #11

Updated by Etienne Massip almost 14 years ago

Got a HTTP 500 rendering admin/info :

SCM command failed, make sure that your SCM binary (eg. svn) is in PATH (...): "darcs" --version
  with: No such file or directory - "darcs" --version

Redmine::Scm::Adapters::CommandFailed (No such file or directory - "darcs" --version):
  lib/redmine/scm/adapters/abstract_adapter.rb:211:in `shellout'
  lib/redmine/scm/adapters/darcs_adapter.rb:49:in `darcs_binary_version_from_command_line'
  lib/redmine/scm/adapters/darcs_adapter.rb:42:in `darcs_binary_version'
  lib/redmine/scm/adapters/darcs_adapter.rb:38:in `client_version'
  lib/redmine/scm/adapters/abstract_adapter.rb:41:in `client_version_string'
  app/models/repository.rb:225:in `scm_version_string'
  app/controllers/admin_controller.rb:90:in `info'
  app/controllers/admin_controller.rb:86:in `each'
  app/controllers/admin_controller.rb:86:in `info'

The only SCM installed is Subversion (and FS, of course).

Actions #12

Updated by Etienne Massip almost 14 years ago

Toshi MARUYAMA wrote:

Thank you for reviewing.

This is select list patch.

Can't you just disable the checkboxes ?

Actions #13

Updated by Toshi MARUYAMA almost 14 years ago

Etienne Massip wrote:

Toshi MARUYAMA wrote:

Thank you for reviewing.

This is select list patch.

Can't you just disable the checkboxes ?

I am not good at HTML coding. Could you try?

Actions #14

Updated by Toshi MARUYAMA almost 14 years ago

Etienne Massip wrote:

Got a HTTP 500 rendering admin/info :

[...]

The only SCM installed is Subversion (and FS, of course).

Japan is midnight.
I will fix tomorrow.

Actions #15

Updated by Etienne Massip almost 14 years ago

Good night then =)

Sorry, I was mistaken : I thought the 2nd patch was for the Administration/Settings/Repositories/activated SCM checkboxes list.

Handling checkboxes state in this list would require some changes in setting_multiselect() in source:trunk/app/helpers/settings_helper.rb (like adding a yield block returning a map of additional options ?) and probably also a bit in source:trunk/app/views/settings/_repositories.rhtml.

About the select list patch, going in the project Settings tab throws a HTTP 500 error too, still in the shellout() method this time called by hg adapter.

Actions #16

Updated by Toshi MARUYAMA almost 14 years ago

I fixed in r4882.

Actions #17

Updated by Etienne Massip almost 14 years ago

Both works fine now.

My remarks :

Concerning info panel :
  • "SCM" title should be in lower size than section title "Information"
  • column titles and column values are not well justified

You should handle checkboxes state in screen "Administration/Settings/Repositories/activated SCM" depending upon SCM availability, as stated in my previous notes.

Actions #18

Updated by Toshi MARUYAMA over 13 years ago

  • File hg.png hg.png added
  • File bzr.png bzr.png added
  • Status changed from New to Closed
  • Target version set to 1.2.0
  • % Done changed from 40 to 0
  • Resolution set to Fixed

I finished implementing in r5634.


Actions #19

Updated by Etienne Massip over 13 years ago

Why not do this control in SCM availability selection in Administration/Settings instead of Project settings, since the SCM list in Project settings is already filtered depending upon this selection in Administration/Settings ?

Actions #20

Updated by Toshi MARUYAMA over 13 years ago

Etienne Massip wrote:

Why not do this control in SCM availability selection in Administration/Settings instead of Project settings, since the SCM list in Project settings is already filtered depending upon this selection in Administration/Settings ?

Default list (exclude filesystem) is default setting.
There is no chance to check whether SCM commands are available or not.

And, it is difficult in case of machine replacing or recovering from database.

Actions #21

Updated by Asher Baker over 13 years ago

Toshi MARUYAMA wrote:

Default list (exclude filesystem) is default setting.
There is no chance to check whether SCM commands are available or not.

But the whole point of a feature request is to add a feature.
Denying it because it's not the current functionality is counter-intuitive.

Actions #22

Updated by Etienne Massip over 13 years ago

Moreover, actually, project managers who are not admins will see the command path, this is odd.

Actions #23

Updated by Etienne Massip over 13 years ago

  • Status changed from Closed to Reopened

Please discuss the actual behavior.

Actions #24

Updated by Toshi MARUYAMA over 13 years ago

  • Target version deleted (1.2.0)
Actions #25

Updated by Etienne Massip over 13 years ago

But you did commit some changes to trunk / 1.2, didn't you ?

Actions #26

Updated by Toshi MARUYAMA over 13 years ago

The followings are FAQ.

  • TortoiseSVN does not have svn.exe
  • /usr/local/bin/git is not PATH for web server
  • hg.cmd and bzr.bat can not be used.

So, I think this feature is beneficial to administrators and project managers.

Actions #27

Updated by Etienne Massip over 13 years ago

Don't get me wrong, I'd like this feature very much, but not the way it is implemented as for now :

I think that as it is the administrator's job to configure the Redmine instance, only him and no project manager should be aware of technical details such as the path of SCM executable or the SCM command called behind the scenes.

That's the main reason why I think the SCM info you added in project settings under the SCM combo :
should be moved to admin settings active SCM list :

Actions #28

Updated by Etienne Massip over 13 years ago

  • Target version set to 1.2.0

Just to get JPL's mind about already committed changes.

Actions #29

Updated by Toshi MARUYAMA over 13 years ago

I start implementing.

Actions #30

Updated by Jean-Philippe Lang over 13 years ago

It really makes more sense on the administration panel. Toshi, please update this ticket as soon as it is done, 1.2 is about to be released.

Actions #31

Updated by Toshi MARUYAMA over 13 years ago

Jean-Philippe Lang wrote:

It really makes more sense on the administration panel. Toshi, please update this ticket as soon as it is done, 1.2 is about to be released.

I see.

Actions #32

Updated by Toshi MARUYAMA over 13 years ago

  • Resolution deleted (Fixed)
Actions #33

Updated by Toshi MARUYAMA over 13 years ago

I have committed in trunk.
Please review it.

Actions #34

Updated by Jean-Philippe Lang over 13 years ago

  • Status changed from Reopened to Closed
  • Resolution set to Fixed

Looks much better, thanks :-) I've just made a few UI changes in r5960.
I think we can close it now.

Actions #35

Updated by Toshi MARUYAMA over 13 years ago

Jean-Philippe Lang wrote:

Looks much better, thanks :-) I've just made a few UI changes in r5960.
I think we can close it now.

Thanks, I will merge to 1.2-stable.

Actions #36

Updated by Jean-Philippe Lang over 13 years ago

Merged in 1.2-stable in r5961.

Actions #37

Updated by Toshi MARUYAMA over 13 years ago

Jean-Philippe Lang wrote:

Merged in 1.2-stable in r5961.

Thanks!!

Actions

Also available in: Atom PDF