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: bugzi...@mercurial-scm.org
          Reporter: mercurial-bugzi...@campbell.mumble.net
                CC: mercurial-de...@mercurial-scm.org
    Python Version: ---

#!/usr/bin/env cram

  $ export HGRCPATH="$(pwd)/.hgrc"
  $ cat <<EOF >$HGRCPATH
  > [ui]
  > username = f...@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.
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@lists.mercurial-scm.org
https://lists.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to