Edgewall Software

Opened 8 years ago

Closed 7 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 trac.util.native_path utility.

Internal Changes:


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 Christian Boos, 8 years ago

Owner: set to Christian Boos
Status: newassigned

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:/Trac would be converted to /D/Trac, you'd still have to link /D to /mnt/D, but that's something useful to do anyway.

See cboos.git@t12653:

The downside of this approach is that if someone really configures and wants a relative path looking like d:\\path or d:/path on Unix, then he would be up for some surprise.

comment:2 by Christian Boos, 7 years ago

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

Applied in r15376.

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Christian Boos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christian Boos 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.