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 8638665
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T10:47:37+00:00 2026-06-12T10:47:37+00:00

I created local hg repository for new project: hg init ; hg addremove ,

  • 0

I created local hg repository for new project: hg init ; hg addremove,
then I created empty upstream repo, and pushed first version there: hg push https://remoterepo.

Now, I want to set that https://remoterepo as default upstream, so I can just do hg push/pull without giving it.

I was surprised Google did not give me a straight answer with “set mercurial upstream”, and I didn’t find a direct answer here at SO either. So, for the benefit of all the people using SO as a howto, what’s the right way to do this?

  • 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-06-12T10:47:39+00:00Added an answer on June 12, 2026 at 10:47 am

    You can do that by adding the upstream URL to /project/.hg/hgrc like this:

    [paths]
    default = ssh://test@bitbucket.com/repos/something
    upstream = ssh://test@bitbucket.com/repos/something_else
    

    and now upstream is an alias for repo something_else which you can then pull from or push to:

    hg pull upstream
    hg push upstream
    

    Reference

    hg help urls:

    URLs can all be stored in your
    configuration file with path aliases
    under the [paths] section like so:

      [paths]
      alias1 = URL1
      alias2 = URL2
      ...
    

    You can then use the alias for any
    command that uses a URL (for example
    hg pull alias1 will be treated as
    hg pull URL1).

    Two path aliases are special because
    they are used as defaults when you do
    not provide the URL to a command:

    1. default
    2. default-push
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I created a local Git repo on my laptop and then pushed the source
For a new project I have created a local folder tree with empty Visual
I created a new project, then I clicked on Import to Subversion repository but
I have created a new project and checked the create a local git repository
I created a local SVN repo (called, simply enough, svnrep ) to learn version
I have created a new branch in my local repository and after some commits,
For a new project : I created a new repo inside the project's folder.
I have just cloned a repository in my local computer. Then I've created inside
I created remote repositories (release and snapshot) from local repository. Both new remote reposotories
I have a local repository. I created the whole application, but now I want

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.