aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcin Kuzminski <marcin@python-works.com>2013-05-10 23:13:04 +0200
committerMarcin Kuzminski <marcin@python-works.com>2013-05-10 23:13:04 +0200
commit5766d3bb4509237cdc87071c7f3a8f9eaf6df008 (patch)
tree833164232ed4bdc768b24c651c1bf89bb8716d98
parent4add33cdb6ecbdf3f8af4ceea0bba9bceec21cae (diff)
downloadrhodecode-5766d3bb4509237cdc87071c7f3a8f9eaf6df008.tar.gz
fixed issue with web-editor that didn't preserve executable bit
after editing files --HG-- extra : source : 14a6e9ffd9c8af65662822340150b18aff0c7686
-rw-r--r--rhodecode/lib/vcs/nodes.py1
-rw-r--r--rhodecode/model/scm.py6
2 files changed, 4 insertions, 3 deletions
diff --git a/rhodecode/lib/vcs/nodes.py b/rhodecode/lib/vcs/nodes.py
index bd5214db..53b14461 100644
--- a/rhodecode/lib/vcs/nodes.py
+++ b/rhodecode/lib/vcs/nodes.py
@@ -420,6 +420,7 @@ class FileNode(Node):
"""Returns filenode extension"""
return self.name.split('.')[-1]
+ @property
def is_executable(self):
"""
Returns ``True`` if file has executable flag turned on.
diff --git a/rhodecode/model/scm.py b/rhodecode/model/scm.py
index 329c8374..20dfdbef 100644
--- a/rhodecode/model/scm.py
+++ b/rhodecode/model/scm.py
@@ -496,9 +496,9 @@ class ScmModel(BaseModel):
# 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)