Making a file un-exectuable from bzr doesn't work, as bzr clears svn:executable instead of deleting it
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar Subversion Plugin |
Fix Released
|
High
|
Jelmer Vernooij |
Bug Description
bzr-svn's handling of svn:executable isn't quite right. Below is a transcript that demonstrates the issue with bzr 1.9 and bzr-svn 0.4.15 (both from intrepid packages):
First, we set up the test:
~$ cd /tmp/
/tmp$ mkdir bzr-svn-
/tmp$ cd bzr-svn-
/tmp/bzr-
/tmp/bzr-
Checked out revision 0.
/tmp/bzr-
Initialising Subversion metadata cache in /home/wjlanda/
Now, we make two test files from svn:
/tmp/bzr-
/tmp/bzr-
/tmp/bzr-
/tmp/bzr-
A exe-from-svn
A non-exe-from-svn
/tmp/bzr-
property 'svn:executable' set on 'exe-from-svn'
/tmp/bzr-
Adding exe-from-svn
Adding non-exe-from-svn
Transmitting file data ..
Committed revision 1.
/tmp/bzr-
total 0
-rwxr-xr-x 1 wjlanda wjlanda 0 2008-12-03 09:35 exe-from-svn
-rw-r--r-- 1 wjlanda wjlanda 0 2008-12-03 09:34 non-exe-from-svn
Now, we make two different test files from bzr:
/tmp/bzr-
/tmp/bzr-
+N exe-from-svn
+N non-exe-from-svn
All changes applied successfully.
Updated to revision 2.
/tmp/bzr-
/tmp/bzr-
/tmp/bzr-
added exe-from-bzr
added non-exe-from-bzr
/tmp/bzr-
Committing to: /tmp/bzr-
added exe-from-bzr
added non-exe-from-bzr
Committed revision 3.
/tmp/bzr-
total 0
-rwxr-xr-x 1 wjlanda wjlanda 0 2008-12-03 09:36 exe-from-bzr
-rwxr-xr-x 1 wjlanda wjlanda 0 2008-12-03 09:35 exe-from-svn
-rw-r--r-- 1 wjlanda wjlanda 0 2008-12-03 09:36 non-exe-from-bzr
-rw-r--r-- 1 wjlanda wjlanda 0 2008-12-03 09:35 non-exe-from-svn
Now we flip the svn:executable bit on the test files made from bzr, from svn:
/tmp/bzr-
/tmp/bzr-
A non-exe-from-bzr
A exe-from-bzr
U .
Updated to revision 2.
/tmp/bzr-
total 0
-rwxr-xr-x 1 wjlanda wjlanda 0 2008-12-03 09:36 exe-from-bzr
-rwxr-xr-x 1 wjlanda wjlanda 0 2008-12-03 09:35 exe-from-svn
-rw-r--r-- 1 wjlanda wjlanda 0 2008-12-03 09:36 non-exe-from-bzr
-rw-r--r-- 1 wjlanda wjlanda 0 2008-12-03 09:34 non-exe-from-svn
/tmp/bzr-
property 'svn:executable' deleted from 'exe-from-bzr'.
/tmp/bzr-
A exe-from-
D exe-from-bzr
/tmp/bzr-
property 'svn:executable' set on 'non-exe-from-bzr'
/tmp/bzr-
A non-exe-
D non-exe-from-bzr
/tmp/bzr-
Deleting exe-from-bzr
Adding exe-from-
Deleting non-exe-from-bzr
Adding non-exe-
Committed revision 3.
/tmp/bzr-
total 0
-rw-r--r-- 1 wjlanda wjlanda 0 2008-12-03 09:37 exe-from-
-rwxr-xr-x 1 wjlanda wjlanda 0 2008-12-03 09:35 exe-from-svn
-rwxr-xr-x 1 wjlanda wjlanda 0 2008-12-03 09:38 non-exe-
-rw-r--r-- 1 wjlanda wjlanda 0 2008-12-03 09:34 non-exe-from-svn
Now we flip the x-bit on the two files from svn, from bzr:
/tmp/bzr-
/tmp/bzr-
+N exe-from-
+N non-exe-
-D exe-from-bzr
-D non-exe-from-bzr
All changes applied successfully.
Updated to revision 4.
/tmp/bzr-
total 0
-rw-r--r-- 1 wjlanda wjlanda 0 2008-12-03 09:38 exe-from-
-rwxr-xr-x 1 wjlanda wjlanda 0 2008-12-03 09:35 exe-from-svn
-rwxr-xr-x 1 wjlanda wjlanda 0 2008-12-03 09:38 non-exe-
-rw-r--r-- 1 wjlanda wjlanda 0 2008-12-03 09:35 non-exe-from-svn
/tmp/bzr-
/tmp/bzr-
non-exe-from-svn => non-exe-
/tmp/bzr-
/tmp/bzr-
exe-from-svn => exe-from-
/tmp/bzr-
Committing to: /tmp/bzr-
modified and renamed exe-from-svn => exe-from-
modified and renamed non-exe-from-svn => non-exe-
Committed revision 5.
/tmp/bzr-
total 0
-rw-r--r-- 1 wjlanda wjlanda 0 2008-12-03 09:38 exe-from-
-rw-r--r-- 1 wjlanda wjlanda 0 2008-12-03 09:35 exe-from-
-rwxr-xr-x 1 wjlanda wjlanda 0 2008-12-03 09:38 non-exe-
-rwxr-xr-x 1 wjlanda wjlanda 0 2008-12-03 09:35 non-exe-
So far so good, but here is the problem:
/tmp/bzr-
/tmp/bzr-
D exe-from-svn
D non-exe-from-svn
A exe-from-
A non-exe-
U .
Updated to revision 4.
/tmp/bzr-
total 0
-rw-r--r-- 1 wjlanda wjlanda 0 2008-12-03 09:37 exe-from-
-rwxr-xr-x 1 wjlanda wjlanda 0 2008-12-03 09:40 exe-from-
-rwxr-xr-x 1 wjlanda wjlanda 0 2008-12-03 09:38 non-exe-
-rwxr-xr-x 1 wjlanda wjlanda 0 2008-12-03 09:40 non-exe-
/tmp/bzr-
Properties on 'exe-from-
svn:executable
/tmp/bzr-
/tmp/bzr-
Note that the exe-from-
Related branches
Changed in bzr-svn: | |
assignee: | nobody → jelmer |
importance: | Undecided → High |
milestone: | none → 0.4.16 |
status: | New → Fix Committed |
Changed in bzr-svn: | |
status: | Fix Committed → Fix Released |
I think this is basically the change that's needed, but this isn't complete because there isn't actually a delete_prop implemented in the bzr-svn bindings:
Basically, instead of clearing the svn:executable value, delete it:
=== modified file 'commit.py' executable:
if child_ie. executable: PROP_EXECUTABLE _VALUE change_ prop(properties .PROP_EXECUTABL E, _VALUE)
else: change_ prop( PROP_EXECUTABLE , value) delete_ prop(properties .PROP_EXECUTABL E)
--- commit.py 2008-11-08 20:02:02 +0000
+++ commit.py 2008-12-03 16:55:27 +0000
@@ -309,11 +309,10 @@
if child_editor is not None:
if old_executable != child_ie.
- value = properties.
+ child_editor.
+ PROP_EXECUTABLE
- value = None
- child_editor.
- properties.
+ child_editor.
if old_special != (child_ie.kind == 'symlink'):
if child_ie.kind == 'symlink':