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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T12:42:41+00:00 2026-06-04T12:42:41+00:00

We have a Java application under Mercurial version control. We’re working on implementing a

  • 0

We have a Java application under Mercurial version control. We’re working on implementing a versioning schema into the application and I’m wondering how TortoiseHG can help with this. Is it possible to do something like increment the build version when commits are made, or must this be soley up to the developer? Our current plan includes creating Bookmarks for each version number when we go to push to UAT.

  • 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-04T12:42:42+00:00Added an answer on June 4, 2026 at 12:42 pm

    In principle, you have to do this outside of TortoiseHg — the job of Mercurial (and hence TortoiseHg) is to preserve the state of your working copy exactly as it was when you clicked “Commit”.

    You might get a little help, though: TortoiseHg can trigger this “outside” action with a pre-commit hook. This is a script that is run before hg commit is run and that script has a chance to change files.

    When you try to implement such a scheme, remember that Mercurial is a decentralized version control system (that should be no surprise…) and as such people make the commits locally without talking to a central server. It is therefore impossible to guarantee that a version number isn’t used by someone else. The only workaround is to use a changeset hash as a version “number”, but then you wont get nicely incrementing numbers. If you have a centralized build server, then you can let that increment the version number, though, and get back to a simple centralized world-view.

    Finally, let me mention that Mercurial has a latesttagdistance template keyword that can be very helpful for the centralized build machine: it computes the distance down to the latest tag and this distance is generally monotonically increasing on a build machine. Use it like

    hg parents --template "{latesttag}+{latesttagdistance}-{node|short}"
    

    See the Mercurial setup.py file for more inspiration.

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

Sidebar

Related Questions

I am working under java application which uses XSLT transformation. I have a lot
While working on a Java application under Mac OS X (Lion, 10.7.2, Java version
I have a problem modernizing a Java WebStart application under Java 6 u 13
I have a Java application under Tomcat, connecting to a Postgre and a MySQL
I have a java web application running under tomcat in a Sun java 6
I have inherited a Java application (servlets) that runs under Tomcat. For historical reasons,
I have a Java application that is running perfectly under windows, i go to
We have an web application running under JBoss 5 which periodically launches a 'java'
I have a Java EE application running under Glassfish. After some recent changes we
We have an issue related to a Java application running under a (rather old)

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.