changeset 3836:14a6e9ffd9c8 beta

fixed issue with web-editor that didn't preserve executable bit after editing files
author Marcin Kuzminski <marcin@python-works.com>
date Fri, 10 May 2013 23:13:04 +0200
parents 42981614c624
children dbe9a08b2bcf
files rhodecode/lib/vcs/nodes.py rhodecode/model/scm.py
diffstat 2 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/rhodecode/lib/vcs/nodes.py	Fri May 10 14:35:02 2013 +0200
+++ b/rhodecode/lib/vcs/nodes.py	Fri May 10 23:13:04 2013 +0200
@@ -418,6 +418,7 @@
         """Returns filenode extension"""
         return self.name.split('.')[-1]
 
+    @property
     def is_executable(self):
         """
         Returns ``True`` if file has executable flag turned on.
--- a/rhodecode/model/scm.py	Fri May 10 14:35:02 2013 +0200
+++ b/rhodecode/model/scm.py	Fri May 10 23:13:04 2013 +0200
@@ -517,9 +517,9 @@
         # proper backend should then translate that into required type
         message = safe_unicode(message)
         author = safe_unicode(author)
-        m = IMC(repo)
-        m.change(FileNode(path, content))
-        tip = m.commit(message=message,
+        imc = IMC(repo)
+        imc.change(FileNode(path, content, mode=cs.get_file_mode(f_path)))
+        tip = imc.commit(message=message,
                        author=author,
                        parents=[cs], branch=cs.branch)