Skip to contentSkip to conversation

remote-hg: fix handling of file perms when pushing

PATCH In review Max Horn 2 participants 3 messages Jun 15, 2016

lore
Share & tools
lore

Max Horn

author
#0 lore raw

PATCH 1/1 remote-hg: fix handling of file perms when pushing

Previously, when changing and committing an executable file, the file would loose its executable bit on the hg side. Likewise, symlinks ended up as "normal" files". This was not immediately apparent on the git side unless one did a fresh clone.

---
 contrib/remote-helpers/git-remote-hg     |  2 +-
 contrib/remote-helpers/test-hg-hg-git.sh | 68 ++++++++++++++++++++++++++++++++
 2 files changed, 69 insertions(+), 1 deletion(-)
contrib/remote-helpers/git-remote-hg +1 -1
index 7c74d8b..328c2dc 100755
@@ -53,7 +53,7 @@ def gittz(tz):
     return '%+03d%02d' % (-tz / 3600, -tz % 3600 / 60)
 
 def hgmode(mode):
-    m = { '0100755': 'x', '0120000': 'l' }
+    m = { '100755': 'x', '120000': 'l' }
     return m.get(mode, '')
 
 def get_config(config):
contrib/remote-helpers/test-hg-hg-git.sh +68 -0

74 lines not on this page · raw message

Signature · 1 line
1.8.1.448.g79c577a.dirty
author
#1 lore raw
Quoted 4 lines · Max Horn

Previously, when changing and committing an executable file, the file would loose its executable bit on the hg side. Likewise, symlinks ended up as "normal" files". This was not immediately apparent on the git side unless one did a fresh clone.

Sorry, forgot to sign off, please add:

Max

#2 lore raw
Quoted 7 lines · Max Horn
Quoted 4 lines · Max Horn

Previously, when changing and committing an executable file, the file would loose its executable bit on the hg side. Likewise, symlinks ended up as "normal" files". This was not immediately apparent on the git side unless one did a fresh clone.

Quoted 5 lines

Sorry, forgot to sign off, please add:

Max

Thanks; merged together with the other patch from Felipe to 'next'.

Unfortunately I noticed the "loose" typo (I think you meant "lose") after I pushed out the results X-<.