Search code examples
bazaar

How to cope with bazaar uncommits


Hit the following situtation a couple of times today:

  1. Myself and another dev both have bazaar local checkouts of a repository.
  2. I make some changes.
  3. The other dev makes and commits some changes.
  4. I update.
  5. The other dev realises their previous changes were broken and uncommits them.
  6. I update.

Now the other dev's uncommitted changes appear as a pending merge in my local checkout, and I can't find a way to separate them from my changes and remove them from my 'local' tree.

Every time this has happened I've had to manually work out which changes are mine and which are not, save my changes, revert, and then re-apply my changes.

I've tried doing a "cherrypicking" reverse merge on my checkout between -r -1..-2, and between -r 0..-1, but neither helped. (0..-1 said "nothing to do", although I might not have done it properly. -1..-2 was the wrong set of changes and thus made things worse.)

How can I fix this situation when it happens (other than going over and smacking the other dev upside the head)?


Solution

  • It is recommended that you don't uncommit in branches that are published somehow, thus avoiding this issue.