문제

My ASP.NET website references refresh files that are being excluded because they reside in the ...\bin\ directory of projects.

What can I add to my .hgignore file to ensure just the ...\bin\*.refresh files are NOT excluded?

Note: I understand I could use hg add ...\bin\my.dll.refresh for each of the references and continue with my .hgignore, but I'd like to avoid needing to manually add specific files types as this is error prone and easy to forget.

# use glob syntax
syntax: glob

# Ignore Visual Studio 2008 files
src/**.obj
src/**.exe
src/**.pdb
src/**.user
src/**.aps
src/**.pch
src/**.vspscc
src/**_i.c
src/**_p.c
src/**.ncb
src/**.suo
src/**.tlb
src/**.tlh
src/**.bak
src/**.cache
src/**.ilk
src/**.log
src/**.lib
src/**.sbr
src/**.scc
src/***/[Bb]in      <---- Problem child
src/***/[Dd]ebug*/
src/***/obj/*
src/***/[Rr]elease*/
src/*_ReSharper*/
src/*[Tt]est[Rr]esult*
src/*[Bb]uild[Ll]og.*
src/*.[Pp]ublish.xml
src/***/PrecompiledWeb/
도움이 되었습니까?

해결책

For "all except some names" you must use:

  • regexp pattern
  • add negative lookahead in regexp "all files"(get "all except in this subset" as result)

syntax: regexp

bin/(?!.*\.refresh$).+

in any case, check and debug this expression, using filenames with pattern bin\*.*refresh* and hg status command

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top