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

  • Home
  • SEARCH
  • 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 1099347
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T00:43:22+00:00 2026-05-17T00:43:22+00:00

We just started using hg and we’re using base tags for common modules in

  • 0

We just started using hg and we’re using base tags for common modules in our system. I have a few questions about how tags work.

  • (#1) When I add a tag using the following command, does it automatically check in the .hgtags file for me?

    hg tag MY_TAG

  • When I add a tag for the first time, it adds a line to the the .hgtags file. When I do a -f (force) on the tag command, it adds another entry to the file. Then, when I remove it, it adds 2 more lines to the .hgtags file. Ultimately my file ends up looking like this:

af9e9bf4cf004a7fab4f911e95d1002579fd851a MY_TAG   //from initial tag
af9e9bf4cf004a7fab4f911e95d1002579fd851a MY_TAG   //from delete (1/2)
0000000000000000000000000000000000000000 MY_TAG   //from delete (2/2)
4611114976f02dd0d4f8ec9e84266dcea161cd3f MY_TAG   //from tag after pull
0426c9e6e0ccf01e6d18d85420466d1edd1bff1f MY_TAG   //from forced tag
  • (#2) Why does it keep adding lines to the .hgtags file? When I’m doing a base tag, I only really care to have a single entry in the file. Should I care about this bloat? Do I have to manually manage the .hgtags file to work in this way?

  • (#3) Also, do the delete lines have to remain contiguous in the file?

  • (#4) Is the file read from top to bottom, or does Mercurial actually find the latest changeset and use that one when I move to a tag?

  • 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-17T00:43:23+00:00Added an answer on May 17, 2026 at 12:43 am
    1. Yes, it automatically checks it in for you, with a generated message to that effect.
    2. Mercurial uses the last tag in the .hgtags file. To keep history intact, it just adds lines.
    3. Deletes are just saying that the given tag corresponds to the “null” revision, which means they don’t exist.
    4. .hgtags is read from top to bottom. Whatever is last line that matches MY_TAG is used as the tag.

    There’s really no reason not to edit the tags file if you need to clean something up. In general, tags shouldn’t move, and if you’re wanting to move them frequently, you may want to look into bookmarks instead.

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

Sidebar

Related Questions

I just started using/learning Python and have some questions. I have a text file
Have just started using Google Chrome , and noticed in parts of our site,
I just started using Eclipse but already I have a small problem. At first
just started using log4j in one of my home-projects and I was just about
I just started using Rails a few days ago, and I'm having trouble with
Just started using Blueprint CSS and now playing with the grids but have a
I´ve just started using ASIHTTPRequest for iOs and I have a small issue with
I just started using gApps scripts and I have run into two problems with
Just started using Apache Commons StringEscapeUtils . According to http://www.w3schools.com/tags/ref_entities.asp , Ö should correspond
I just started using PyGI (on Ubuntu Natty), although I have never used pygtk

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.