Mercurial > hg
view tests/test-update-issue1456.t @ 16110:41417443b7d0 stable
largefiles: check whether specified patterns are related to largefiles strictly
current 'lfiles_repo.status()' implementation examines whether
specified patterns are related to largefiles in working directory (not
to STANDIN) or not by NOT-EMPTY-NESS of below list:
[f for f in match.files() if f in lfdirstate]
but it can not be assumed that all in 'match.files()' are file itself
exactly, because user may only specify part of path to match whole
under subdirectories recursively.
above examination will mis-recognize such pattern as 'not related to
largefiles', and executes normal 'status()' procedure. so, 'hg status'
shows '?'(unknown) status for largefiles in working directory unexpectedly.
this patch examines relation of pattern to largefiles by applying
'match()' on each entries in lfdirstate and checking wheter there is
no matched entry.
it may increase cost of examination, because it causes of full scan of
entries in lfdirstate.
so this patch uses normal for-loop instead of list comprehensions, to
decrease cost when matching is found.
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Wed, 15 Feb 2012 23:01:09 +0900 |
parents | db0340f4b507 |
children | f2719b387380 |
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