bzr merge should allow user to ignore changes in deleted files

Bug #364336 reported by Jakub Turski
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Medium
Unassigned
Breezy
Triaged
Wishlist
Unassigned

Bug Description

Consider following scenario:

* two branches a and b (b was branched off of a, some time in the past)
* new changes on branch a add file x, which is not needed on branch b
* we try merge from a to b
* in order to get rid of x, we run 'bzr revert x' in b
* 'bzr commit' in b
* some time later, changes are done to x on branch a
* upon running merge from a to b, we'll get a conflict with file x - it is removed in b, yet there are changes in it to be merged.

Perhaps it would be useful to add a --ignore-changes-to-deleted-files flag to 'bzr merge'? I use bazaar for keeping configuration files, with branch 'a' being 'desktop' and 'b' - 'laptop'. Some of the files are not needed on the laptop, yet there will be changes to those in the other branch. It would be convenient to save myself from the conflicts this is going to generate.

Jakub Turski (yacoob)
tags: added: wishlist
Revision history for this message
Vincent Ladeuil (vila) wrote :

The conflict should occur only once, subsequent merges should just respect the local decision to delete the file.

Are you experiencing repeated conflicts ?

Changed in bzr:
status: New → Incomplete
Revision history for this message
Jakub Turski (yacoob) wrote :

Looks like it. In my case:

a = 'vanilla' branch
$ bzr info
Checkout (format: pack-0.92)
Location:
       checkout root: .
  checkout of branch: /Volumes/archiwum/bzr/conf/vanilla

b= 'mb-g'
$ bzr info
Checkout (format: pack-0.92)
Location:
       checkout root: /Users/yacoob/workarea/conf/mb-g
  checkout of branch: /Volumes/archiwum/bzr/conf/mb-g

Related branches:
  submit branch: /Users/yacoob/workarea/conf/vanilla

The relevant changes on the mb-g branch:
$ bzr log -r4..6
------------------------------------------------------------
revno: 6
committer: <email address hidden>
branch nick: mb-g
timestamp: Tue 2009-04-21 00:47:44 +0100
message:
  Syncphoto is no longer needed on mb.
------------------------------------------------------------
revno: 5 [merge]
committer: <email address hidden>
branch nick: mb-g
timestamp: Tue 2009-04-21 00:47:19 +0100
message:
  Merge from vanilla, without syncphoto.py.
------------------------------------------------------------
revno: 4
committer: <email address hidden>
branch nick: mb-g
timestamp: Tue 2009-04-21 00:45:02 +0100
message:
  kinit+ssh script for magi.i
------------------------------------------------------------

rev 5 was merge from vanilla to mb-g, syncphoto was removed in rev 6:
$ bzr diff -r5..6
=== removed file 'local/.bin/syncphoto'
--- local/.bin/syncphoto 2009-04-05 16:04:35 +0000
+++ local/.bin/syncphoto 1970-01-01 00:00:00 +0000
(...)

Now, I've edited local/.bin/syncphoto on vanilla, and tried to merge from vanilla to mb-g:
(in vanilla)
$ bzr diff -r9..10
=== modified file 'local/.bin/syncphoto'
--- local/.bin/syncphoto 2009-04-05 16:04:35 +0000
+++ local/.bin/syncphoto 2009-10-19 22:26:45 +0000

(in mb-g)
$ bzr merge ../vanilla
+N local/.bin/syncphoto.OTHER
 M local/.zshrc
Contents conflict in local/.bin/syncphoto
1 conflicts encountered.

$ bzr status
added:
  local/.bin/syncphoto.OTHER
unknown:
  local/.bin/syncphoto.BASE
conflicts:
  Contents conflict in local/.bin/syncphoto
pending merge tips: (use -v to see all merge revisions)
  <email address hidden> 2009-10-19 Dummy update to syncphoto in order to test a bzr bug.

If I've done something wrong during initial merge, tell me so :)

Martin Pool (mbp)
tags: added: conflicts merge
removed: wishlist
Changed in bzr:
status: Incomplete → Confirmed
importance: Undecided → Medium
Revision history for this message
John A Meinel (jameinel) wrote :

See also bug #530584. That bug is about the package-import process having some rough edges because of files that are deleted in THIS but are modified in UPSTREAM.

Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
Jelmer Vernooij (jelmer)
Changed in brz:
status: New → Triaged
importance: Undecided → Wishlist
tags: removed: check-for-breezy
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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