[Bug 6964] New: hg export | hg import fails to convey executable bits
mercurial-bugs at mercurial-scm.org
mercurial-bugs at mercurial-scm.org
Fri Apr 11 13:11:00 UTC 2025
https://bz.mercurial-scm.org/show_bug.cgi?id=6964
Bug ID: 6964
Summary: hg export | hg import fails to convey executable bits
Product: Mercurial
Version: 6.8.1
Hardware: PC
OS: NetBSD
Status: UNCONFIRMED
Severity: feature
Priority: wish
Component: Mercurial
Assignee: bugzilla at mercurial-scm.org
Reporter: mercurial-bugzilla at campbell.mumble.net
CC: mercurial-devel at mercurial-scm.org
Python Version: ---
#!/usr/bin/env cram
$ export HGRCPATH="$(pwd)/.hgrc"
$ cat <<EOF >$HGRCPATH
> [ui]
> username = foo at example.com
> interactive = no
> quiet = yes
> verbose = no
> EOF
Create a repository and clone it:
$ hg init repo
$ touch repo/README
$ hg --cwd repo commit -d '1 0' -Am 'initial tree'
$ hg clone repo clone
Add an executable script to the original repository:
$ printf '#!/bin/sh\necho hello world\n' >repo/script
$ chmod 755 repo/script
$ hg --cwd repo commit -d '1 0' -Am 'add script'
Verify that the script is executable in the original, even if we delete
it and check it out again:
$ rm repo/script
$ hg --cwd repo revert -C script
$ stat -f '%p' repo/script
100755
Convey it to the clone with export | import:
$ hg --cwd repo export . | hg --cwd clone import -
Verify that the script is executable in the clone:
$ stat -f '%p' clone/script
100755
XXX OOPS -- This actually shows 100644.
Workaround: hg --config diff.git=yes export. But it seems to me that hg export
| hg import ought to faithfully reproduce any patch out of the box without
special config options (see also
https://bz.mercurial-scm.org/show_bug.cgi?id=6939).
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Mercurial-devel
mailing list