bzr revert of merged and then changed file after --forget-merges leaves file on disk and reports about conflict
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Confirmed
|
Medium
|
Unassigned |
Bug Description
C:\Temp>bzr init-repo 1
Shared repository with trees (format: 1.14)
Location:
shared repository: 1
C:\Temp\1>bzr init a
Created a repository tree (format: 1.9)
Using shared repository: C:/Temp/1/
C:\Temp\1>bzr mkdir a/foo
added a/foo
C:\Temp\1>bzr ci -m1 a
Committing to: C:/Temp/1/a/
added foo
Committed revision 1.
C:\Temp\1>bzr branch a b
Branched 1 revision(s).
C:\Temp\1>bzr mkdir b/foo/bar
added b/foo/bar
C:\Temp\1>echo "hello world">
C:\Temp\1>bzr st b
added:
foo/bar/
unknown:
foo/bar/spam
C:\Temp\1>bzr add b
adding foo/bar/spam
C:\Temp\1>bzr diff b
=== added directory 'foo/bar'
=== added file 'foo/bar/spam'
--- foo/bar/spam 1970-01-01 00:00:00 +0000
+++ foo/bar/spam 2010-08-16 10:56:33 +0000
@@ -0,0 +1,1 @@
+"hello world"
C:\Temp\1>bzr ci -m2 b
Committing to: C:/Temp/1/b/
added foo/bar
added foo/bar/spam
Committed revision 2.
C:\Temp\1>bzr merge b -d a
+N foo/bar/
+N foo/bar/spam
All changes applied successfully.
C:\Temp\1>bzr st a
added:
foo/bar/
foo/bar/spam
pending merge tips: (use -v to see all merge revisions)
Alexander Belchenko 2010-08-16 2
C:\Temp\1>bzr revert a --forget-merges
C:\Temp\1>bzr st a
added:
foo/bar/
foo/bar/spam
C:\Temp\1>bzr diff a
=== added directory 'foo/bar'
=== added file 'foo/bar/spam'
--- foo/bar/spam 1970-01-01 00:00:00 +0000
+++ foo/bar/spam 2010-08-16 10:58:28 +0000
@@ -0,0 +1,1 @@
+"hello world"
C:\Temp\1>echo "hello spam">a/
C:\Temp\1>bzr diff a
=== added directory 'foo/bar'
=== added file 'foo/bar/spam'
--- foo/bar/spam 1970-01-01 00:00:00 +0000
+++ foo/bar/spam 2010-08-16 10:59:49 +0000
@@ -0,0 +1,1 @@
+"hello spam"
C:\Temp\1>bzr revert a
- foo/bar/
- foo/bar/spam
Conflict: can't delete foo/bar because it is not empty. Not deleting.
It seems bzr refuses to delete file `spam` because it was modified after merge. But I'm not sure it's the right behaviour, because user explicitly tell to forget merge.
Changed in bzr: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
tags: | added: merge revert |
tags: | added: check-for-breezy |
Also, bzr did not said anything about why it kept `spam` on the disk, therefore report about conflict is confusing: why there is conflict while I want simply revert (remove) files?
Please note if I don't change `spam` file then revert successfully removes both bar directory and spam file. Only if I have changed the file I've got this problem.