# HG changeset patch # User Matt Harbison # Date 1516760985 18000 # Node ID b91bca85ba73c5a755a9e4ae44aaeb787ee3fae2 # Parent 97bdbcb43ebf898b582362fdd9ba492247071f08 lfs: don't automatically exclude '.hg*' files from external tracking The only reasons I did this in the first place was because tracking externally seems like it would always be a mistake, and the eol extension does the same thing. Yuya and Jun thought it might be better to not do this[1], so I'll defer to them on this. If a problem with say, .hgtags or .hgeol does arise, it can be added back without breaking existing repos. [1] https://www.mercurial-scm.org/pipermail/mercurial-devel/2018-January/110371.html diff -r 97bdbcb43ebf -r b91bca85ba73 hgext/lfs/wrapper.py --- a/hgext/lfs/wrapper.py Tue Jan 23 20:50:02 2018 -0500 +++ b/hgext/lfs/wrapper.py Tue Jan 23 21:29:45 2018 -0500 @@ -131,8 +131,7 @@ lfstrack = self.opener.options['lfstrack'] - # Always exclude hg owned files - if not self.filename.startswith('.hg') and lfstrack(self.filename, textlen): + if lfstrack(self.filename, textlen): flags |= revlog.REVIDX_EXTSTORED return orig(self, text, transaction, link, p1, p2, cachedelta=cachedelta, diff -r 97bdbcb43ebf -r b91bca85ba73 tests/test-lfs.t --- a/tests/test-lfs.t Tue Jan 23 20:50:02 2018 -0500 +++ b/tests/test-lfs.t Tue Jan 23 21:29:45 2018 -0500 @@ -18,9 +18,7 @@ # Commit small file $ echo s > smallfile $ echo '**.py = LF' > .hgeol - $ hg --config lfs.track='size(">1000B") | "path:.hgeol"' commit -Aqm "add small file" - $ hg debugdata .hgeol 0 - **.py = LF + $ hg --config lfs.track='size(">1000B")' commit -Aqm "add small file" # Commit large file $ echo $LONG > largefile @@ -976,6 +974,7 @@ $ cat > .hglfs << EOF > [track] + > path:.hglfs = none() > **.test = size(">5B") > **.exclude = none() > ** = size(">10B")