Defect #8458

Subversion: Delete invalid repository fails using the libsvn plugin

Added by André Jonsson over 6 years ago. Updated over 6 years ago.

Status:ClosedStart date:2011-05-29
Priority:NormalDue date:
Assignee:Toshi MARUYAMA% Done:

0%

Category:SCM
Target version:-
Resolution: Affected version:1.1.3

Description

Only tested with svn repositories, using the libsvn plugin.

When an unreachable repository has been entered it is impossible to delete it. Apparently it requires the repository be valid and able to connect to be deleted.

For example, entering the repos url svn://localhost will cause delete to fail with the attached log message 1.

And entering a correct repos url but with incorrect login info fails similarly, with attached log message 2.

logmessage1.txt Magnifier - log message 1 (946 Bytes) André Jonsson, 2011-05-29 12:50

logmessage2.txt Magnifier - log message 2 (991 Bytes) André Jonsson, 2011-05-29 12:50

git-scm-nil.diff Magnifier (873 Bytes) Toshi MARUYAMA, 2011-05-30 02:43


Related issues

Related to Redmine - Defect #6713: Git: Not able to Resetting Redmine project respository New 2010-10-20
Related to Redmine - Defect #4725: Error displaying Project's Settings when repository confi... New 2010-02-03
Related to Redmine - Feature #1406: Browse through Git branches Closed 2008-06-09

Associated revisions

Revision 6130
Added by Toshi MARUYAMA over 6 years ago

scm: return nil at model default_branch and override at git model (#8458, #6713).

Redmine Git and Mercurial adapter support branches.
Mercurial default branch is dafault.
But, it is popular to show all revisions on the top page for Mercurial GUI.

Revision 6220
Added by Toshi MARUYAMA over 6 years ago

scm: git: catch exception in model default_branch() (#8458, #6713).

Revision 6224
Added by Toshi MARUYAMA over 6 years ago

scm: subversion: add functional test of destroying valid repository (#8458, #6713, #4725).

Revision 6225
Added by Toshi MARUYAMA over 6 years ago

scm: subversion: add functional test of destroying invalid repository (#8458, #6713, #4725).

History

#1 Updated by André Jonsson over 6 years ago

For correctness I should probably mention that after changing the repos settings to something that is possible to connect with, delete works, of course.

#2 Updated by Toshi MARUYAMA over 6 years ago

  • Assignee set to Toshi MARUYAMA

#3 Updated by Toshi MARUYAMA over 6 years ago

Try this patch.

#4 Updated by André Jonsson over 6 years ago

Awesome!

However, I see that it modifies some generic part and a git-specific part (I'm not much familiar with Ruby nor the Redmine code base), but as far I've seen this problem is specific to SVN.

Of course, that doesn't exclude that this patch is the "right thing"... I'll give it a go later.

#5 Updated by Toshi MARUYAMA over 6 years ago

  • Target version set to 1.3.0

#6 Updated by André Jonsson over 6 years ago

I've tested the patch. Indeed it works!

However, I'm quite baffled as to why it works... considering it seemingly modified the behavior of managing git repositories.

#7 Updated by André Jonsson over 6 years ago

btw, sorry for the slow feedback; we had a long weekend over here and I was away a bit.

#8 Updated by Toshi MARUYAMA over 6 years ago

  • Subject changed from Delete invalid repository fails to Subversion: Delete invalid repository fails using the libsvn plugin
  • Target version deleted (1.3.0)

#9 Updated by Toshi MARUYAMA over 6 years ago

  • Status changed from New to Closed

Redmine subversion adapter#info returns nil if repository path is invalid.
source:tags/1.2.0/lib/redmine/scm/adapters/subversion_adapter.rb#L86

libsvn plugin adapter#info throws exception if repository path is invalid.
https://github.com/pplr/redmine-libsvn/blob/0662d754198723b6e8ad9c941d883fc5691b94f9/lib/redmine/scm/adapters/subversion_libsvn_adapter.rb#L87

This is plugin issue.

Also available in: Atom PDF