プロジェクト

全般

プロフィール

Vote #74096

完了

CVS root_url not recognized when connection string does not include port

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

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

0%

予定工数:
category_id:
3
version_id:
73
issue_org_id:
14422
author_id:
69456
assigned_to_id:
1
comments:
8
status_id:
5
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

The patch fixes a bug in the CVS SCM module of the standard version of redmine (2.3.1).
Without this bugfix, the revisions are not handled correctly. Each revision-number (e.g. 1.4) is only accepted once by the redmine repository, although each file has its own revision-numbers.

In our case the CVSROOT looks like this:

:pserver:cvs_user:cvs_password@123.456.789.123:9876/repo

The problem is located in \lib\redmine\scm\adapters\cvs_adapter.rb in the method root_url_path
--> RegExp was changed from

/:.+:\d*/
to
/:.++@\d+(.\d+)+/

This lets the property return the correct part of the CVSROOT-URL
("/repo" instead of ":cvs_password@123.456.789.123:9876/repo")
And now the function 'fetch_changesets' works as expected with CVS.

Find attached the patch file.


journals

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Test added in r12017, it passes without your proposed fix. Would you have a failing test?
--------------------------------------------------------------------------------
Good morning.
Sorry, I was wrong in my description and copy-pasted the wrong CVSROOT. This happened, because I already put wrong comments to my source code when I implemented the patch some weeks ago ;-)
What I meant was:
<pre>:pserver:cvs_user:cvs_password@123.456.789.123/repo</pre>
So without the explicit port after the IP-Address.
So the correct test would be:
<pre>
def test_root_url_path
adapter = Redmine::Scm::Adapters::CvsAdapter.new('foo', ':pserver:cvs_user:cvs_password@123.456.789.123/repo')
assert_equal '/repo', adapter.send(:root_url_path)
end
</pre>
Regards
--------------------------------------------------------------------------------
The proposed patch matches an IP adress only. It won't work if a host name is used.
A different fix is committed in r12027, thanks for pointing this out.
--------------------------------------------------------------------------------
Hey, you're right, I forgot the hostname possibility.Thank you for the improvement!
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Merged.
--------------------------------------------------------------------------------

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

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

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

いいね!0
いいね!0