Hmm, I'm not sure what to do there. The edge case this covers is if someone has an hg repo served up from the domain only with no path.

Say my repo is at 'foo.com' - without the if, the path element will have a / added to it. I'm not sure if that would have any effect in this hypothetical case, but I wouldn't want to break a remote url that would work otherwise.

Flask is a good example of an app that behaves differently when called with or without a /, so such things do exist in the wild, albeit not in any HG repository that I've encountered.

Still want me to take it out?