John Lawrence Aspden
John Lawrence Aspden

Reputation: 17470

Can I add 'sticky notes' to mercurial revisions?

Is it possible to add 'sticky notes' to revisions in mercurial?

Really I just want to graffiti on the repository.

One possible use case: Say I'm working through a branch trying to find where a bug was introduced, can I check out a revision, try it, and then add a working or a broken tag to show me that I've already tried that one.

Revision comments would be great for this if they could be edited.

Bookmarks and tags and such aren't suitable for this, since they move around and you can't have two the same. A mechanism like those, but with less significance would be nice.

Bonus points if the graffiti can be made to appear in tortoise hg's log window.

hg bisect is a great tool for solving the particular case above, but I can think of many other uses for such a mechanism.

Upvotes: 4

Views: 157

Answers (2)

John Lawrence Aspden
John Lawrence Aspden

Reputation: 17470

After much hunting, I think the best solution really is to use tags. There's a problem in that you can't have two tags with the same value, so you have to work round it by adding random numbers, eg working5101.

This is a pretty awful answer, but its the best I have come up with, and I use it all the time.

hg review is great for what it does, but it's far too heavyweight for my 'short comments that appear in hgtk log' needs.

It seems a shame that mercurial won't allow duplicate tags. Perhaps if you had to use --force to create one?

Upvotes: 0

Macke
Macke

Reputation: 25680

If you're hunting for bugs, look at the bisect command.

This command helps to find changesets which introduce problems. To use, mark the earliest changeset you know exhibits the problem as bad, then mark the latest changeset which is free from the problem as good. Bisect will update your working directory to a revision for testing (unless the -U/--noupdate option is specified). Once you have performed tests, mark the working directory as good or bad, and bisect will either update to another candidate changeset or announce that it has found the bad revision.

Upvotes: 4

Related Questions