bzr resolve should automatically resolve conflicted directory deletion
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
In Progress
|
High
|
Martin Packman |
Bug Description
bzr merges conflict if a deleted directory contains unversioned files, which is probably fair enough. (Arguably they should not conflict if the files are all ignored, like .pyc files, but that's a separate bug.)
If I manually resolve the conflicts by deleting the directories, bzr resolve should agree that they've been resolved. At present it does not and you apparently have to manually specify them.
Example:
mbp@grace% bzr st
unknown:
.ccache/
bzrlib/tmp.diff
bzrlib/
bzrlib/
conflicts:
Conflict: can't delete bzrlib/
Conflict: can't delete bzrlib/
mbp@grace% ls -la bzrlib/
bzrlib/
total 40
drwxr-xr-x 2 mbp mbp 4096 2009-03-17 11:40 ./
drwxr-xr-x 19 mbp mbp 20480 2009-03-17 11:40 ../
-rw-r--r-- 1 mbp mbp 3573 2008-05-02 16:10 __init__.pyc
-rw-r--r-- 1 mbp mbp 10959 2008-05-02 16:10 test_join.pyc
bzrlib/
total 36
drwxr-xr-x 2 mbp mbp 4096 2009-03-17 11:40 ./
drwxr-xr-x 19 mbp mbp 20480 2009-03-17 11:40 ../
-rw-r--r-- 1 mbp mbp 3099 2008-05-02 16:10 __init__.pyc
-rw-r--r-- 1 mbp mbp 5608 2008-05-02 16:10 test_all.pyc
mbp@grace% rm -r bzrlib/
mbp@grace% bzr st
bunknown:
.ccache/
bzrlib/tmp.diff
conflicts:
Conflict: can't delete bzrlib/
Conflict: can't delete bzrlib/
mbp@grace% bzr resolve
0 conflict(s) auto-resolved.
Remaining conflicts:
Conflict: can't delete bzrlib/
Conflict: can't delete bzrlib/
mbp@grace% bzr bzrlib/
Related branches
- bzr-core: Pending requested
-
Diff: 147 lines (+69/-7)2 files modifiedbzrlib/conflicts.py (+25/-0)
bzrlib/tests/test_conflicts.py (+44/-7)
Changed in bzr: | |
importance: | Undecided → Medium |
status: | New → Confirmed |
tags: | added: conflicts |
Changed in bzr: | |
importance: | Medium → High |
assignee: | nobody → canonical-bazaar (canonical-bazaar) |
Changed in bzr: | |
assignee: | canonical-bazaar (canonical-bazaar) → Martin Packman (gz) |
status: | Confirmed → In Progress |
This issue can be reproduced a slightly different way when switching branches. I think this is the same issue, but if not it might need to be a separate issue:
It's really annoying when creating a folder in a branch, and then switching back to a branch without that folder.
C:\dev>bzr init bug
Created a repository branch (format: unnamed)
Using shared repository: C:/dev/
C:\dev>bzr checkout bug bug-working
C:\dev>cd bug-working
C:\dev\ bug-working> bzr ignore *.tmp
C:\dev\ bug-working> bzr commit -m "ignoring temp files"
Committing to: C:/dev/bug/
added .bzrignore
Committed revision 1.
C:\dev\ bug-working> mkdir temp
C:\dev\ bug-working> echo testing > temp\123
C:\dev\ bug-working> bzr add
adding temp
adding temp/123
C:\dev\ bug-working> bzr commit -m "adding some working files"
Committing to: C:/dev/bug/
added temp
added temp/123
Committed revision 2.
C:\dev\ bug-working> echo "binary output files from a compiler" > temp\123.tmp
C:\dev\ bug-working> bzr branch \dev\bug \dev\bug-error -r1
Branched 1 revision(s).
C:\dev\ bug-working> bzr switch \dev\bug-error
Conflict: can't delete temp because it is not empty. Not deleting.
Updated to revision 1.
Switched to branch: C:/dev/bug-error/
C:\dev\ bug-working> bzr st
unknown:
temp/
conflicts:
Conflict: can't delete temp because it is not empty. Not deleting.
C:\dev\ bug-working> del temp\123.tmp
C:\dev\ bug-working> rmdir temp
C:\dev\ bug-working> dir
Volume in drive C has no label.
Volume Serial Number is 5CF1-4A0D
Directory of C:\dev\bug-working
08/06/2009 11:26 AM <DIR> .
08/06/2009 11:26 AM <DIR> ..
08/06/2009 11:19 AM 6 .bzrignore
1 File(s) 6 bytes
2 Dir(s) 98,402,717,696 bytes free
C:\dev\ bug-working> bzr resolve
0 conflict(s) auto-resolved.
Remaining conflicts:
Conflict: can't delete temp because it is not empty. Not deleting.
C:\dev\ bug-working> bzr st
conflicts:
Conflict: can't delete temp because it is not empty. Not deleting.