| Summary: | Trac repository connector should handle trailing slash | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Eugene Kuleshov <ekuleshov> | ||||||
| Component: | Mylyn | Assignee: | Steffen Pingel <steffen.pingel> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P1 | ||||||||
| Version: | dev | ||||||||
| Target Milestone: | --- | ||||||||
| Hardware: | PC | ||||||||
| OS: | All | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
|
Description
Eugene Kuleshov
I do not allow trailing slashes for Trac repository urls because a slash is appended by the connector when requests are made. Why do we need to support this? (In reply to comment #1) > I do not allow trailing slashes for Trac repository urls because a slash is > appended by the connector when requests are made. Why do we need to support > this? It is just beter user experience. You can cut that slash on save or do smarter concatenation if slash already there, so it would be transparent to the user. Steffen: as Eugene indicates the user shouldn't have to care about the trailing slash, so just turn it into the form you're expecting if it is missing. If I remove all trailing slashes before saving the task repository object this may be a bit odd because the user would expect to see exactly the entered url and not some normalized version. If I allow trailing slashes and remove the slashes when connecting to the repository this may cause i ambiguity. Two repositories e.g http://trac.edgewall.org/ and http://trac.edgewall.org could be created which would both share the same task handles e.g. "http://trac.edgewall.org/ticket/1-1". Mik, do you have any preference on how to solve this? How does Bugzilla handle this? Allow the user to enter the trailing slash, but do not save it, e.g. by adding a stripTralingSlash(String) method. As you indicate we would never want two repositories of that kind. Put the code for stripping it into tasks.core, since this behavior should be generic. This is guaranteed to cause users to think that the Trac connector isn't working (e.g. bug 151077), and while not critical would be best to fix for 0.6.1. If not fixed the FAQ entry needs to be updated: http://wiki.eclipse.org/index.php/Mylar_FAQ#Trac_Connector_troubleshooting (In reply to comment #6) > This is guaranteed to cause users to think that the Trac connector isn't > working (e.g. bug 151077), and while not critical would be best to fix for > 0.6.1. Actually it should not be possible to create repositories with a trailing slash although this can be circumvented easily be adding a space. I'll look into getting this fixed as suggested in comment #5 today. Created attachment 46989 [details]
Strips slashes from repository url
The patch removes trailing slashes and whitespaces from the repository url when saving the url. Some of the test cases failed when running AllTests but I don't think the errors are related to the patch.
Patch applied and AllTests pass. I see problems with DuplicateDetectionTest and am looking into that now... Created attachment 46991 [details]
mylar/context/zip
|