プロジェクト

全般

プロフィール

Vote #66061

完了

SCM command availability automatic check in administration panel

Admin Redmine さんが約4年前に追加. 約4年前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
SCM_3
対象バージョン:
開始日:
2009/11/23
期日:
進捗率:

0%

予定工数:
category_id:
3
version_id:
27
issue_org_id:
4273
author_id:
9772
assigned_to_id:
11192
comments:
37
status_id:
5
tracker_id:
2
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

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
x.meglio@gmail.com


journals

That would help indeed.
--------------------------------------------------------------------------------
> (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.
--------------------------------------------------------------------------------

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

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

<pre>
$ 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
</pre>
--------------------------------------------------------------------------------
I start to implement this feature.

!info.png!

!settings.png!
--------------------------------------------------------------------------------
This is showing SCM info patch.
Please review.

!info-20110218.png!
--------------------------------------------------------------------------------
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.

--------------------------------------------------------------------------------
Thank you for reviewing.

This is select list patch.

--------------------------------------------------------------------------------
Got a HTTP 500 rendering admin/info :

<pre>
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'
</pre>

The only SCM installed is Subversion (and FS, of course).
--------------------------------------------------------------------------------
Toshi MARUYAMA wrote:
> Thank you for reviewing.
>
> This is select list patch.

Can't you just disable the checkboxes ?
--------------------------------------------------------------------------------
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?

--------------------------------------------------------------------------------
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.

--------------------------------------------------------------------------------
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.

--------------------------------------------------------------------------------
I fixed in r4882.
--------------------------------------------------------------------------------
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.

--------------------------------------------------------------------------------
I finished implementing in r5634.

!hg.png!
!bzr.png!
--------------------------------------------------------------------------------
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 ?

--------------------------------------------------------------------------------
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.

--------------------------------------------------------------------------------
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.

--------------------------------------------------------------------------------
Moreover, actually, project managers who are not admins will see the command path, this is odd.
--------------------------------------------------------------------------------
Please discuss the actual behavior.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
But you did commit some changes to trunk / 1.2, didn't you ?
--------------------------------------------------------------------------------
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.
--------------------------------------------------------------------------------
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 : !hg.png!
should be moved to admin settings active SCM list : !scm_checkboxes_admin.PNG!

--------------------------------------------------------------------------------
Just to get JPL's mind about already committed changes.
--------------------------------------------------------------------------------
I start implementing.

!admin-repo.png!
--------------------------------------------------------------------------------
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.
--------------------------------------------------------------------------------
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.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
I have committed in trunk.
Please review it.
--------------------------------------------------------------------------------
Looks much better, thanks :-) I've just made a few UI changes in r5960.
I think we can close it now.
--------------------------------------------------------------------------------
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.
--------------------------------------------------------------------------------
Merged in 1.2-stable in r5961.
--------------------------------------------------------------------------------
Jean-Philippe Lang wrote:
> Merged in 1.2-stable in r5961.

Thanks!!
--------------------------------------------------------------------------------


related_issues

relates,Closed,7517,Configurable path of executable for scm adapters
relates,Closed,1604,Provide a more meaningful error when running an earlier version of the svn client
relates,New,2799,Support for Bazaar's shared reposetories (created with init-repo)

Admin Redmine さんが約4年前に更新

  • カテゴリSCM_3 にセット
  • 対象バージョン1.2.0_27 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0