Patchwork D6057: split: add tests which demonstrate the issue5864

login
register
mail settings
Submitter phabricator
Date March 3, 2019, 10:37 p.m.
Message ID <differential-rev-PHID-DREV-bzgrj3tcemmyqzuylwft-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/39024/
State Superseded
Headers show

Comments

phabricator - March 3, 2019, 10:37 p.m.
khanchi97 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D6057

AFFECTED FILES
  tests/test-split.t

CHANGE DETAILS




To: khanchi97, #hg-reviewers
Cc: mercurial-devel
phabricator - March 8, 2019, 6:36 p.m.
khanchi97 added a comment.


  Ping for review!

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D6057

To: khanchi97, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/tests/test-split.t b/tests/test-split.t
--- a/tests/test-split.t
+++ b/tests/test-split.t
@@ -709,3 +709,45 @@ 
   EDITOR: HG: branch 'default'
   EDITOR: HG: changed foo
   saved backup bundle to $TESTTMP/f/b/.hg/strip-backup/904c80b40a4a-47fb907f-split.hg (obsstore-off !)
+
+
+Testing the case in split when commiting flag-only file changes (issue5864)
+---------------------------------------------------------------------------
+  $ hg init $TESTTMP/issue5864
+  $ cd $TESTTMP/issue5864
+  $ echo foo > foo
+  $ hg add foo
+  $ hg ci -m "initial"
+  $ chmod +x foo
+  $ hg ci -m "make executable"
+
+  $ hg glog
+  @  1:3a2125f0f4cb make executable
+  |
+  o  0:51f273a58d82 initial
+  
+
+  $ printf 'y\ny\ny\n' | hg split
+  diff --git a/foo b/foo
+  old mode 100644
+  new mode 100755
+  examine changes to 'foo'? [Ynesfdaq?] y
+  
+  no changes to record
+  diff --git a/foo b/foo
+  old mode 100644
+  new mode 100755
+  examine changes to 'foo'? [Ynesfdaq?] y
+  
+  no changes to record
+  diff --git a/foo b/foo
+  old mode 100644
+  new mode 100755
+  examine changes to 'foo'? [Ynesfdaq?] y
+  
+  no changes to record
+  diff --git a/foo b/foo
+  old mode 100644
+  new mode 100755
+  examine changes to 'foo'? [Ynesfdaq?] abort: response expected
+  [255]