Edgewall Software
Modify

Opened 20 years ago

Closed 18 years ago

#994 closed defect (fixed)

\ must be enclosed in quotes

Reported by: pLu Owned by: Matthew Good
Priority: lowest Milestone: 0.10
Component: admin/console Version: 0.8
Severity: normal Keywords: interactive escaping
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

Example:

component chown "My Component" DOMAIN\login

Results in:

Name                  Owner
-------------------------------
My Component          DOMAINlogin

I'm using Python 2.3.4 on Windows.

Attachments (0)

Change History (3)

comment:1 by anonymous, 20 years ago

Keywords: interactive escaping added; windows removed

It's not a bug, and it isn't windows-only, it's the way interactive trac-admin handles escapes. Easier than wrapping everything in quotes is to use double \'s:

component chown "My Component" DOMAIN\\login

If used as a command-line argument I don't think it needs to be escaped, but I only have a bash shell to test on and that has its own escaping. I think DOMAIN\\login on the command line should have its escapes handled by the shell and passed on to trac-admin as just DOMAIN\login, which works (that is, typing DOMAIN\\\\login is not necessary). My understanding of how the shell handles escapes is quite likely wrong, but echo -E DOMAIN\\login does output DOMAIN\login.

Whether this functionality is desirable is debatable. It's minor, but IMHO it's more bug than feature because I can't think of a single valid use of an escape in trac-admin; the only escapable character I can think of that won't be thrown out is a quotation mark which is useless and less likely to occur than the escape character itself (especially with NTLM authentication being used). Plus, if escapes are removed, quotes will still be inputable if wrapped in a differing quote type. This already works:

component chown 'A "weird" name' DOMAIN\\login

Oh, and I guess somebody in the world might have used it once to escape a space instead of wrapping the words in quotes.

comment:2 by Matthew Good, 18 years ago

Milestone: 0.10
Owner: changed from daniel to Matthew Good
Status: newassigned

This is the standard behavior of the Python cmd module that trac-admin uses, but I agree that it doesn't seem necessary for this use.

comment:3 by Matthew Good, 18 years ago

Resolution: fixed
Status: assignedclosed

Done in [3513]

Modify Ticket

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