bzr merge --preview fails when uncommitted changes

Bug #207512 reported by Stefan Monnier
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Wishlist
Unassigned

Bug Description

If I have uncommitted changes in my tree, I cannot do "bzr merge --preview":

  % bzr merge --preview
  Merging from remembered location /home/monnier/tmp/bzr/trunk/
  bzr: ERROR: Working tree "/home/monnier/tmp/bzr/work/" has uncommitted changes.
  %

but actually, the uncommitted changes have no effect: I can understand that we disallow/discourage merging into an uncommitted tree, but "bzr merge --preview" just shows the same diff, whether or not the local changes are committed (except maybe when those changes include a pending merge from the same branch, but that's no excuse for disallowing the operation).

Revision history for this message
Martin Pool (mbp) wrote :

The uncommitted changes should affect the diff, as they are taken into account for the merge.

You should be able to work around this with --force, but I agree it should not be required.

Changed in bzr:
importance: Undecided → Wishlist
status: New → Confirmed
Revision history for this message
John A Meinel (jameinel) wrote :

--preview could just unset the "check clean" flag.

Revision history for this message
Vincent Ladeuil (vila) wrote :

See https://bugs.edge.launchpad.net/bzr/+bug/369433/comments/3 for an opposite, yet valid, point of view:
--preview is supposed to show what will happen, it would be surprising to *not* complain when using --preview,
but to complain when not using it.

So --force should be obeyed whether --preview is used or not and the checks should be the same too.

Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.