Monday, September 9, 2013

Diff to other repository in Mercurial and TortoiseHg?

The trunk has:
  1. recent coworker changes
  2. a bunch of older changes
  3. the original check-in
Your shelf has:
  1. your changes
  2. recent coworker changes
  3. even more of your changes
  4. a bunch of older changes
  5. the original check-in

How may you do a diff of the two so that you may see..

  1. your changes
  2. even more of your changes

...?

There is not a way to cross compare two repositories like this. Moreover, since you have been periodically merging commits pushed up to the trunk into your own shelf your history is dirty and there is no easy way to do a diff to see only what you changed before pushing it to the trunk. Grrr. The thing to do to prevent this is to not drag in updates to the trunk to your shelf until you are ready to push your own changes to the trunk. Sure, there is a way to unmerge the "recent coworker changes" changeset, but this is much more painful than just approaching working in Mercurial the right way to begin with.

No comments:

Post a Comment