Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7195301
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T20:33:03+00:00 2026-05-28T20:33:03+00:00

Running Mercurial 2.0.2 on Windows: In my .hgrc: [subpaths] MYREPOS/(.*) = https://server/repos/\1 And in

  • 0

Running Mercurial 2.0.2 on Windows:

In my .hgrc:

[subpaths]
MYREPOS/(.*) = https://server/repos/\1

And in my .hgsub:

subrepo/lib = MYREPOS/lib

When I do a push, the push path of the sub repo is the concatenation of it’s path to the main repo, rather than an absolute path – the output is:

pushing to https://server/repos/main 
pushing subrepo subrepo\lib to https://server/repos/main/http%3A//server/repos/lib

I would have expected:

pushing to https://server/repos/main
pushing subrepo subrepo\lib to https://server/repos/lib

Is it because the ‘absoluteness or relativeness’ of the sub repo path is determined by right hand path in .hgsub and not the value it is mapped to? For example, MYREPOS/lib is relative, and therefore the mapped path will be treated as relative, whether it is or not?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T20:33:04+00:00Added an answer on May 28, 2026 at 8:33 pm

    The subrepository logic was changed between 1.9 and 2.0. The procedure is now:

    1. if the path in .hgsub is relative, then join it with the main repository path
    2. apply remapping rules to this final path

    Before this change, we would:

    1. apply remapping rules to the path from .hgsub
    2. if the remapped path is relative, then join it with the main repository path

    So you’re right that MYREPOS/lib is seen as a relative path in the first step. The full path for the subrepository is therefore

    https://server/repos/main/MYREPOS/lib
    

    and your remapping pattern still triggers. This explains why you see http://... in the middle of the push URL. However, there is a fallback that will revert to the old behavior. If your pattern is

    ^MYREPOS/(.*) = https://server/repos/\1
    

    then it wont match anything in the new step 2 — it will only remap MYREPOS at the beginning of the path. We notice this and use the old algorithm!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Background: this is running on a Windows 2008 Server. https://www.mercurial-scm.org/wiki/Workflows#Feature_separation_through_named_branches I'm a Mercurial newbie,
I have set Mercurial 1.51 up on a Hyper-V server running Windows 2008R2 and
Is it possible to get Mercurial to show progress of long-running push or pull
Windows fails to pick up my .hgignore file. I'm running Mercurial from the command
I'm trying to configure Mercurial for use with both a windows server (freeSSHd) and
I have been running mercurial (on Windows) for many months and I am suddenly
I'm having trouble with my hooks running on a remote server while the Mercurial
I wonder if anyone here has any experience with mercurial running on Ubuntu? I've
I'm running the latest Mercurial and Python 2.6; IIS6 is using the wildcard ISAPI
We've just recently switched over from SVN to Mercurial, but now we are running

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.