Edgewall Software
Modify

Opened 4 years ago

Closed 3 years ago

#13409 closed defect (fixed)

repository_dir record for Subversion is wrong

Reported by: Jun Omae Owned by: Jun Omae
Priority: normal Milestone: 1.5.4
Component: version control Version: 1.5.3
Severity: normal Keywords: svn
Cc: Branch:
Release Notes:

Fix incorrect repository_dir metadata for Subversion repository.

API Changes:
Internal Changes:

Description

The repository_dir should be svn:92ea810a-adf3-0310-b540-bef912dcf5ba:/home/jun66j5/var/svn/svnrepos.

sqlite> select * from repository;
1|name|
1|dir|/home/jun66j5/var/svn/svnrepos
1|type|svn
1|repository_dir|svn:b'92ea810a-adf3-0310-b540-bef912dcf5ba':/home/jun66j5/var/svn/svnrepos
1|youngest_rev|31

Attachments (0)

Change History (5)

comment:1 by Jun Omae, 3 years ago

Release Notes: modified (diff)
Resolution: fixed
Status: assignedclosed

Fixed in [17560].

comment:2 by Jun Omae, 3 years ago

Resolution: fixed
Status: closedreopened

Ah, I noticed 2 added tests failing on Windows, https://github.com/jun66j5/trac/runs/4031399923. No failures in the tests on appveyor because Subversion bindings for Python 3 is not installed.

======================================================================
FAIL: test_repos_properties (tracopt.versioncontrol.svn.tests.svn_fs.SubversionRepositoryNormalTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\a\trac\trac\tracopt\versioncontrol\svn\tests\svn_fs.py", line 157, in test_repos_properties
    self.assertEqual('svn:%s:%s' % (REPOS_UUID, REPOS_PATH),
AssertionError: 'svn:[32 chars]f5ba:c:\\users\\runneradmin\\appdata\\local\\t[22 chars]fd4n' != 'svn:[32 chars]f5ba:C:/users/runneradmin/appdata/local/temp/t[16 chars]fd4n'
- svn:92ea810a-adf3-0310-b540-bef912dcf5ba:c:\users\runneradmin\appdata\local\temp\trac-testdir-1152fd4n
?                                          ^ ^     ^           ^       ^     ^    ^
+ svn:92ea810a-adf3-0310-b540-bef912dcf5ba:C:/users/runneradmin/appdata/local/temp/trac-testdir-1152fd4n
?                                          ^ ^     ^           ^       ^     ^    ^


======================================================================
FAIL: test_repos_properties (tracopt.versioncontrol.svn.tests.svn_fs.SubversionRepositoryScopedTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\a\trac\trac\tracopt\versioncontrol\svn\tests\svn_fs.py", line 1115, in test_repos_properties
    self.assertEqual('svn:%s:%s' % (REPOS_UUID, REPOS_PATH),
AssertionError: 'svn:[32 chars]f5ba:c:\\users\\runneradmin\\appdata\\local\\t[22 chars]fd4n' != 'svn:[32 chars]f5ba:C:/users/runneradmin/appdata/local/temp/t[16 chars]fd4n'
- svn:92ea810a-adf3-0310-b540-bef912dcf5ba:c:\users\runneradmin\appdata\local\temp\trac-testdir-1152fd4n
?                                          ^ ^     ^           ^       ^     ^    ^
+ svn:92ea810a-adf3-0310-b540-bef912dcf5ba:C:/users/runneradmin/appdata/local/temp/trac-testdir-1152fd4n
?                                          ^ ^     ^           ^       ^     ^    ^

comment:3 by Jun Omae, 3 years ago

In Windows, Trac uses upper drive letter and slash characters for repository_dir.

Trac [C:\usr\var\trac\1.4]> repository add normal C:\usr\var\svn\svnrepos svn
Trac [C:\usr\var\trac\1.4]> repository add slash C:/usr/var/svn/svnrepos svn
Trac [C:\usr\var\trac\1.4]> repository add lowerdrive c:/usr/var/svn/svnrepos svn
Trac [C:\usr\var\trac\1.4]> repository list

Name        Type  Alias  Directory
------------------------------------------------
lowerdrive  svn          c:\usr\var\svn\svnrepos
normal      svn          C:\usr\var\svn\svnrepos
slash       svn          C:\usr\var\svn\svnrepos

Trac [C:\usr\var\trac\1.4]> repository sync *
...
C:> sqlite3 C:\usr\var\trac\1.4\db\trac.db "select * from repository order by id, name"
1|dir|C:\usr\var\svn\svnrepos
1|name|normal
1|repository_dir|svn:92ea810a-adf3-0310-b540-bef912dcf5ba:C:/usr/var/svn/svnrepos
1|type|svn
1|youngest_rev|31
2|dir|C:\usr\var\svn\svnrepos
2|name|slash
2|repository_dir|svn:92ea810a-adf3-0310-b540-bef912dcf5ba:C:/usr/var/svn/svnrepos
2|type|svn
2|youngest_rev|31
3|dir|c:\usr\var\svn\svnrepos
3|name|lowerdrive
3|repository_dir|svn:92ea810a-adf3-0310-b540-bef912dcf5ba:C:/usr/var/svn/svnrepos
3|type|svn
3|youngest_rev|31

comment:4 by Jun Omae, 3 years ago

Fixed in [17568], again.

comment:5 by Jun Omae, 3 years ago

Resolution: fixed
Status: reopenedclosed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jun Omae.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Jun Omae to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.