• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Mercurial 1.9.2: not able to track changes caused by merges

 
Martin Vajsar
Sheriff
Posts: 3752
62
Chrome Netbeans IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everyone,

I've a small problem tracking changes in Mercurial caused by merging two branches together. It can be illustrated by the following script (it is actually a Windows BAT file, I assume modifying it for Unix should be easy):

This script creates a new repository with a file named file and two named branches (default and test). A version "A" of the file is created on the default branch. Then version "B" is created on the test branch. Then the test branch is merged into the main branch (creating a revision with number 3, which contains version "B" of the file). The file is modified yet again and version "C" is committed onto the default branch.

At this point, the default branch contains three versions of the file - version "A", version "B" and version "C". However, as the log statements shows, only version "A" and version "C" are listed when I try to track the changes on the default branch. Version "B", which was introduced through a merge into the default branch and exists in revision 3, is not displayed (even Revision history of the file displayed by TortoiseHg omits the revision 3):

Now this example is rather trivial, but in a repository with hundreds of commits, several branches and a lot of merges the case is not that clear-cut. Tracking out which merge introduced a change into a branch is painful. Is it possible to obtain a revision history of a file, which would contain all of its changes on a certain branch, including merges? I'm using Mercurial 1.9.2 and TortoiseHg 2.1.3 at the moment.

Thanks in advance.
 
Martin Vajsar
Sheriff
Posts: 3752
62
Chrome Netbeans IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've digged into the issue a bit deeper and it seems that - according to this thread n Mercurial mailing list - it is not possible to obtain the history of the file as I would like, so I'm out of luck. Pity, I'd say it would be a useful feature and I'm obviously not the only one looking for it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic