Modify ↓
Opened 11 years ago
Last modified 14 months ago
#11205 new defect
"repository sync" fails for Subversion repository with unicode path
Reported by: | Jun Omae | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | next-stable-1.6.x |
Component: | version control | Version: | 1.0-stable |
Severity: | minor | Keywords: | svn |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
In Linux, "repository sync" command fails for Subversion repository with unicode path.
$ svnadmin create /tmp/svn-tété $ ~/venv/trac/1.0.1/bin/trac-admin /tmp/trac-1.0 initenv title sqlite:db/trac.db >/dev/null $ ~/venv/trac/1.0.1/bin/trac-admin /tmp/trac-1.0 config set components 'tracopt.versioncontrol.*' enabled $ ~/venv/trac/1.0.1/bin/trac-admin /tmp/trac-1.0 Welcome to trac-admin 1.0.1 Interactive Trac administration console. Copyright (C) 2003-2013 Edgewall Software Type: '?' or 'help' for help on commands. Trac [/tmp/trac-1.0]> repository add blah /tmp/svn-tété svn Trac [/tmp/trac-1.0]> repository list Name Type Alias Directory -------------------------------- blah svn /tmp/svn-tété Trac [/tmp/trac-1.0]> repository sync blah TracError: /tmp/svn-tété does not appear to be a Subversion repository.
The apr library on Linux, it needs to initialize with setlocale()
for the encoding of file system. If no setlocale()
, uses C
locale and 8-bits bytes for the paths.
-
trac/admin/console.py
diff --git a/trac/admin/console.py b/trac/admin/console.py index 74c2388..3091255 100755
a b def run(args=None): 596 596 597 597 if __name__ == '__main__': 598 598 pkg_resources.require('Trac==%s' % VERSION) 599 locale.setlocale(locale.LC_ALL, '') 599 600 sys.exit(run())
After the patch, the command correctly works.
$ PYTHONPATH=$PWD ~/venv/py25/bin/python trac/admin/console.py /tmp/trac-1.0 Welcome to trac-admin 1.0.2dev Interactive Trac administration console. Copyright (C) 2003-2013 Edgewall Software Type: '?' or 'help' for help on commands. Trac [/tmp/trac-1.0]> repository sync blah Resyncing repository history for blah... 0 revisions cached. Done.
Attachments (0)
Change History (4)
comment:1 by , 9 years ago
comment:2 by , 8 years ago
Milestone: | next-stable-1.0.x → next-stable-1.2.x |
---|
Moved ticket assigned to next-stable-1.0.x since maintenance of 1.0.x is coming to a close. Please move the ticket back if it's critical to fix on 1.0.x.
comment:3 by , 5 years ago
Milestone: | next-stable-1.2.x → next-stable-1.4.x |
---|
Note:
See TracTickets
for help on using tickets.
Patch for [14719].
trac/admin/console.py