Opened 9 years ago
Closed 9 years ago
#12653 closed defect (fixed)
git support under "Bash for Ubuntu for Windows"
| Reported by: | Christian Boos | Owned by: | Christian Boos |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.3.2 |
| Component: | version control | Version: | 1.3dev |
| Severity: | normal | Keywords: | |
| Cc: | Branch: | ||
| Release Notes: |
Improve interoperability on Windows with the Windows subsystem for Linux (WSL). Repository paths stored as Windows paths will be converted at runtime to the equivalent POSIX paths if needed. |
||
| API Changes: |
Added |
||
| Internal Changes: | |||
Description
Trac runs fine under "Bash for Ubuntu for Windows".
However there's one glitch that would be nice to fix.
Absolute Windows paths, as they start with a drive letter, will be recognized as relative paths. This can happen in a few places, when the path comes from an external source like the trac.ini or the db. The backslashes are also going to be problematic.
This is especially critical for the configured repository directories:
140566545106688 Trac[cblaptop-trac:__init__() in /mnt/d/Trac/repos/trunk/tracopt/versioncontrol/git/PyGIT.py:401] ERROR: GIT control files missing in '/D/Trac/envs/cblaptop-trac/C:\Trac\repos\trunk\.git'
Attachments (0)
Change History (2)
comment:1 by , 9 years ago
| Owner: | set to |
|---|---|
| Status: | new → assigned |
comment:2 by , 9 years ago
| API Changes: | modified (diff) |
|---|---|
| Release Notes: | modified (diff) |
| Resolution: | → fixed |
| Status: | assigned → closed |
Applied in r15376.



As it's not completely trivial to find out when we're running in this context, maybe simply forcefully converting such a Windows path to an absolute POSIX path would be OK (and the other way round, for good measure).
As a path like
D:/Tracwould be converted to/D/Trac, you'd still have to link/Dto/mnt/D, but that's something useful to do anyway.See cboos.git@t12653:
native_pathnative_pathwhen retrieving'dir'key from repository data.native_pathutilityThe downside of this approach is that if someone really configures and wants a relative path looking like
d:\\pathord:/pathon Unix, then he would be up for some surprise.