[Bug 5743] New: rebase: file with changes on both sides, and rename on one side loses executable bit after rebase

mercurial-bugs at mercurial-scm.org mercurial-bugs at mercurial-scm.org
Thu Nov 16 12:36:29 EST 2017


https://bz.mercurial-scm.org/show_bug.cgi?id=5743

            Bug ID: 5743
           Summary: rebase: file with changes on both sides, and rename on
                    one side loses executable bit after rebase
           Product: Mercurial
           Version: default branch
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: bug
          Priority: wish
         Component: rebase
          Assignee: bugzilla at mercurial-scm.org
          Reporter: arcppzju+hgbug at gmail.com
                CC: mercurial-devel at mercurial-scm.org

This was discovered when rebasing https://phab.mercurial-scm.org/D1429

A minimal test case:

  $ cat >> $HGRCPATH << EOF
  > [extensions]
  > rebase=
  > EOF

  $ hg init

  $ cat > A <<EOF
  > 1
  > 2
  > 3
  > EOF
  $ chmod +x A
  $ hg commit -m A -A A

  $ cat > A <<EOF
  > 1
  > 2
  > 2.5
  > 3
  > EOF
  $ hg commit -m A-Modify

  $ hg update '.^'
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
  $ hg mv A B
  $ cat > B <<EOF
  > 1
  > 1.5
  > 2
  > 3
  > EOF
  $ hg commit -m A-Rename-Modify
  created new head

  $ hg rebase -r .
  rebasing 2:f548ec46c01e "A-Rename-Modify" (tip)
  merging A and B to B
  saved backup bundle to
$TESTTMP/.hg/strip-backup/f548ec46c01e-b9f63412-rebase.hg (glob)

  $ hg log -r . -p --config diff.git=1
  changeset:   2:bdd538f593ee
  tag:         tip
  user:        test
  date:        Thu Jan 01 00:00:00 1970 +0000
  summary:     A-Rename-Modify

  diff --git a/A b/B
  old mode 100755
  new mode 100644 <<<< UNEXPECTED
  rename from A
  rename to B
  --- a/A
  +++ b/B
  @@ -1,4 +1,5 @@
   1
  +1.5
   2
   2.5
   3

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Mercurial-devel mailing list