Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 3216 by dotheb...@gmail.com: hg url not created correctly if no trailing / in the repo URL, hg-history call will fail by removing the host from the URL
http://code.google.com/p/reviewboard/issues/detail?id=3216

What version are you running?
1.7.20

What's the URL of the page containing the problem?
create review request

What steps will reproduce the problem?
1.upload patch
2.fails with 'failing to retrieve ....foo.cpp



So my configured repo URL looks like that:
http://127.0.0.1:8004
this constructs the Request sent to reviewboard:
https://github.com/reviewboard/reviewboard/blob/master/reviewboard/scmtools/hg.py
....
        for rawpath in ["raw-file", "raw", "hg-history"]:
            try:
base_url = self.path.rstrip('/')<- will remove 127.0.0.1:8004 from the base url

                if rawpath == 'hg-history':
                    base_url = self.path[:self.path.rfind('/')]
-> request will go to
http://hg-history/fadf21a55c14/FOO/src/foo.cpp

Can be workarounded by configuring the repo with trailing /:
http://127.0.0.1:8002/
-> either HG-repos without trailing / have to be prohibited in the admin interface, or this code has to become more clever.

however, even the corrected pattern still fails:
http://127.0.0.1:8004/hg-history/fadf21a55c14/FOO/src/foo.cpp

my repo is run by hg version 1.4 ran by /usr/bin/hg serve --name FOO -d -p 8004


--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
You received this message because you are subscribed to the Google Groups 
"reviewboard-issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard-issues+unsubscr...@googlegroups.com.
To post to this group, send email to reviewboard-issues@googlegroups.com.
Visit this group at http://groups.google.com/group/reviewboard-issues.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to