view tests/test-execute-bit.t @ 16323:0789d1bbf6c1 stable

dirstate: fix some problems for recursive case normalization (issue3342) file in nested directory causes unexpected abort. problems below should be fixed for recursive normalization route in dirstate._normalize(): 1. rsplit() may cause unpacking into more than 2 elements. it should be called with 'maxsplit' argument to unpack into 'd, f' 2. 'd' is replaced by normalized value prefixed with 'self._root', but this makes 'folded' as absolute path, and it is unexpected one for caller of recursive normalization
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Sat, 31 Mar 2012 15:55:03 +0900
parents 9231c629ec10
children 44bda93df90e
line wrap: on
line source

  $ "$TESTDIR/hghave" execbit || exit 80

  $ hg init
  $ echo a > a
  $ hg ci -Am'not executable'
  adding a

  $ chmod +x a
  $ hg ci -m'executable'
  $ hg id
  79abf14474dc tip

Make sure we notice the change of mode if the cached size == -1:

  $ hg rm a
  $ hg revert -r 0 a
  $ hg debugstate
  n   0         -1 unset               a
  $ hg status
  M a

  $ hg up 0
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
  $ hg id
  d69afc33ff8a
  $ test -x a && echo executable -- bad || echo not executable -- good
  not executable -- good