view tests/test-update-issue1456.t @ 18316:f36375576ed5

filecache: create an entry in _filecache when __set__ is called for a missing one Preserve the invariant that if P is a filecached property on X then P in X.__dict__ => P in X._filecache. Previously, it was possible for a filecached property to become out of sync with the filesystem if it was set before getting it first, since the initial filecacheentry was created in __get__. Old behaviour: repo.prop = x repo.invalidate() # prop has no entry in _filecache, it's not removed # from __dict__ repo.prop # returns x like before without checking with the # filesystem New: repo.prop = x # an empty entry is created in _filecache repo.invalidate() # prop is removed from __dict__ repo.prop # recreates prop
author Idan Kamara <idankk86@gmail.com>
date Mon, 17 Dec 2012 15:25:45 +0200
parents f2719b387380
children 44bda93df90e
line wrap: on
line source

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

  $ rm -rf a
  $ hg init a
  $ cd a

  $ echo foo > foo
  $ hg ci -qAm0
  $ chmod +x foo
  $ hg ci -m1
  $ hg co -q 0
  $ echo dirty > foo
  $ hg up -c
  abort: uncommitted local changes
  [255]
  $ hg up -q
  $ cat foo
  dirty
  $ hg st -A
  M foo

Validate update of standalone execute bit change:

  $ hg up -C 0
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
  $ chmod -x foo
  $ hg ci -m removeexec
  nothing changed
  [1]
  $ hg up -C 0
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
  $ hg up
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
  $ hg st

  $ cd ..