Subrepos cannot be cloned with Mercurial 4.6rc1

Issue #984 new
Matt Harbison
created an issue

It looks like the problem is that when the redirect is issued to where the subrepo lives in the filesystem, the query string is dropped. That causes the html page for the subrepo to be fetched, instead of going through the wire protocol plumbing. Up to this point, Mercurial treated this as a server that didn't understand the "new" protocol, and fell back to 0.9.0 commands. That fallback was removed this cycle, exposing the issue.

I assume that #fragments are an issue too, but I'm not sure if they are used outside of html links.

Comments (2)

  1. Matt Harbison reporter

    There's a trivial fix to the hgnested plugin for this, but I got an access denied creating a PR for it.

    diff --git a/src/main/java/sonia/scm/hgnested/ b/src/main/java/sonia/scm/hgnested/
    --- a/src/main/java/sonia/scm/hgnested/
    +++ b/src/main/java/sonia/scm/hgnested/
    @@ -75,6 +75,13 @@ public class HgNestedUtil
           url = buffer.toString();
    +    String query = request.getQueryString();
    +    if (query != null)
    +    {
    +      url += "?" + query;
    +    }
         return url;
  2. Log in to comment