Pushing repo with sub repos results in 404

Gary's Avatar


25 Apr, 2017 04:40 PM

I've just set up a new install of HG Lab and run into a few problems.
I have a lot of existing repositories to push up to the server and some have worked ok, however I've found that if I attempt to push up a repo with a sub repo, I receive an error as follows:
abort: HTTP Error 404: Not found.

This error appears after the 'bundling' process has completed and about half way through the 'sending' process.
I'm not certain that the subrepositories are the cause of the issue, but I can't see any other difference between this an other repos that are working correctly.

In a separate issue, I've found that the system really doesn't like deleting repositories and projects - and then recreating them with the same name. ;)

  1. Support Staff 1 Posted by Anton Gogolev on 26 Apr, 2017 11:59 AM

    Anton Gogolev's Avatar


    Subrepositories in their "nested" flavour are currently not supported.

  2. 2 Posted by Gary Stanton on 02 May, 2017 08:22 AM

    Gary Stanton's Avatar

    Hi Anton,

    I have removed the sub-repository and commited the now empty '.hgsub' file
    - however the system is throwing the same error.


  3. 3 Posted by Gary on 03 May, 2017 04:19 PM

    Gary's Avatar

    I have now attempted to push this repo, which no longer contains any reference to a sub repo, up to a completely different installation - new project, new repo.
    The sam error occurs. I'm not sure the issue is the sub repo - but I'm a little stuck.
    Can someone help?

  4. Support Staff 4 Posted by Anton Gogolev on 04 May, 2017 09:06 AM

    Anton Gogolev's Avatar


    Now this is weird. Can you do a "hg push --debug --verbose" and attach the
    output here?

  5. 5 Posted by Gary on 09 May, 2017 08:32 AM

    Gary's Avatar

    Hi Anton,

    The output is rather large, and doesn't give any extra info about the error, but perhaps it'll show you something:


  6. Support Staff 6 Posted by Anton Gogolev on 11 May, 2017 09:23 AM

    Anton Gogolev's Avatar


    That turns out to be not just "404", but an IIS-specific variant thereof,
    "404.13 - Content Too Large" (
    . Apparently, you have way too many binary files in your repository.

    To work around this, you can do incremental pushes as described here:
    . For example, this command will push two changesets at a time:

    hg push --rev "limit(sort(draft(), rev), 2)"

  7. 7 Posted by Gary on 15 May, 2017 08:50 AM

    Gary's Avatar

    Hi Anton,

    The repo contains about 2GB of images and unfortunately, a large majority of these were pushed in a single changeset.

    In case anyone else has the same problem:
    I resolved this issue by updating the content length allowed in the IIS settings for the site.
    Specifically increasing the maxrequestlength of the httpruntime settings and the maxAllowedContentLength in requestFiltering.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

03 Aug, 2022 01:49 PM
05 Jul, 2022 07:01 PM
28 Mar, 2022 04:42 PM
21 Jan, 2022 10:43 AM
20 Jan, 2022 10:45 AM


18 Jan, 2022 10:15 AM
19 Mar, 2021 06:13 PM
01 Mar, 2021 02:51 PM
01 Jan, 2021 02:19 AM
28 Aug, 2020 08:34 AM
23 Jun, 2020 08:29 AM