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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T15:22:56+00:00 2026-05-19T15:22:56+00:00

As the definite guide aptly points out (search for Tags and cloning): When you

  • 0

As the definite guide aptly points out (search for “Tags and cloning”):

When you run hg clone -r foo to clone a repository as of tag foo, the new
clone will not contain any revision newer than the one the tag refers to,
including the revision where the tag was created. The result is that you’ll
get exactly the right subset of the project’s history in the new
repository, but not the tag you might have expected.

It means hg tags in your new clone does NOT show the foo tag. Same thing happens if you had cloned before foo tag was added, and you do hg pull -r foo.

(Digression: tag is about the only thing I don’t quite get in hg. I understand there are advantages (e.g. merge) in putting it in a changeset, but it always feels weird to have meta data mixed with source code.)

It should be obvious that I’m asking for an automated way, instead of pulling the tag changeset as a separate manual step.

I know I could check for this scenario in an incoming hook (so it works for both clone and pull), or wrap clone and pull.

But is there a better/easier way?


UPDATE hg bug tracker already has this issue.

  • 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-19T15:22:57+00:00Added an answer on May 19, 2026 at 3:22 pm

    Yes it can be done by post-clone/pull hooks, but there are a couple of crooks.

    First, it only works for local repo, since you can’t get the list of tags in a remote repo.

    Second, dealing with clone/pull arguments and options is not trivial. (For clone I need to get the target repo, -r, -u, -U. For pull I need -r and -u.) I tried to use fancyopts, but it can’t deal with global options, which are processed away in dispatch. I managed to hack dispatch to give me only the args and opts of a command, but it feels and looks ugly.

    Using command wrapper would eliminate the second problem.

    I hope one day hg will add an option to clone and pull to do it cleanly.

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

Sidebar

Related Questions

I am reading A Definite Guide to SWT and JFace and I am trying
I have the following Prolog definite clause grammar: s-->[a],s,[b]. s-->[]. This will result in
Is there any definite guide how to make QWidget app portrait oriented on MeeGo
Just out of curiosity and lack of a definite answer... I was just looking
I want to search all the applications created by me with a definite package
I can't find anything definite using my favourite tool , however I thought I
I am not expecting a definite yes or no. Any knowledge you might have
My requirements are that Ads have a definite size, could be different media types
how to performed repeated task for a definite time like for 2 hours. Means
I see there is a question here but there is no definite answer. Has

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.