3

3

Each time we update the production server with the latest version of the code, we add a tag in mercurial.

Is there a simple way of getting a list of what has changed since a given tag, so it will be easier to upload stuff?

Is there a smarter way of doing what we are doing? I am new to mercurial.

flag

2 Answers

3

You can always see what has happened between two changesets (tags or otherwise) simply by passing the revision range to the appropriate log or diff command.

To see all of the changesets that were introduced between, say, the tags v1.0 and v1.1, run:

hg log -r v1.0:v1.1

To see the net sum of differences introduced in those revisions, you'd instead run:

hg diff -r v1.0:v1.1

If you are curious simply of everything that was introduced since the last tag (assuming the last tag was v1.0), simply substitute the word tip for the second tag. E.g.:

hg log -r v1.0:tip

will show you everything you've done since 1.0.

Mercurial can even format this output in changelog-style, if you want. Simply add the --style changelog parameter:

hg log -r v1.0:v1.1 --style changelog
link|flag
1

Probably the easiest way would be to have two repos, one stable that you cut builds to your production server from, and one for development. When you're working, you push all your changes to the devel repo. Once everything in devel is ready to go to the production server, you can use the "Outgoing" tab to see what changes have happened since the last time you pushed your code. Once you've reviewed everything and it looks good, you can push it to stable, tag it and cut the build.

alt text

This also has the nice feature of allowing you to fast-track bug fixes directly into stable for things that need to be fixed quickly. Right before you push devel to stable, you'll pull all of stable's changes into devel and merge them in, so devel will have the bugfixes too.

link|flag
That sounds great, only the "outgoing" tab in kiln does not actually list the files that have changed. It only lists the changesets. Is there a way of getting it to list the files involved? – rikh Feb 25 2010 at 12:40
If you do a code review all of those changesets, there's a Files tab in the Code Review page, at top right. It will show you the sum of all changes for all files changed. – Tyler Hicks-Wright Feb 25 2010 at 14:23

Your Answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.