# HG changeset patch # User Boris Feld # Date 1542245935 -3600 # Node ID 64cdfcc73706bf75d8304917ed0666f313221ab6 # Parent 47e3f554df35245c95cbb87a30cc8ba557259427 cache: create `cache` directory at init time The cache directory will be needed very quickly, so it seems simpler to create it early to make sure it has the same owner and permission than the other directory in the repository. diff -r 47e3f554df35 -r 64cdfcc73706 mercurial/localrepo.py --- a/mercurial/localrepo.py Thu Nov 15 17:08:23 2018 +0100 +++ b/mercurial/localrepo.py Thu Nov 15 02:38:55 2018 +0100 @@ -3010,6 +3010,8 @@ wdirvfs.makedirs() hgvfs.makedir(notindexed=True) + if 'sharedrepo' not in createopts: + hgvfs.mkdir(b'cache') if b'store' in requirements and 'sharedrepo' not in createopts: hgvfs.mkdir(b'store') diff -r 47e3f554df35 -r 64cdfcc73706 tests/test-empty.t --- a/tests/test-empty.t Thu Nov 15 17:08:23 2018 +0100 +++ b/tests/test-empty.t Thu Nov 15 02:38:55 2018 +0100 @@ -20,6 +20,7 @@ $ ls .hg 00changelog.i + cache requires store diff -r 47e3f554df35 -r 64cdfcc73706 tests/test-inherit-mode.t --- a/tests/test-inherit-mode.t Thu Nov 15 17:08:23 2018 +0100 +++ b/tests/test-inherit-mode.t Thu Nov 15 02:38:55 2018 +0100 @@ -42,7 +42,7 @@ $ hg init repo $ cd repo - $ chmod 0770 .hg/store + $ chmod 0770 .hg/store .hg/cache before commit store can be written by the group, other files cannot @@ -51,6 +51,7 @@ $ "$PYTHON" ../printmodes.py . 00700 ./.hg/ 00600 ./.hg/00changelog.i + 00770 ./.hg/cache/ 00600 ./.hg/requires 00770 ./.hg/store/ @@ -116,6 +117,7 @@ $ "$PYTHON" ../printmodes.py ../push 00770 ../push/.hg/ 00660 ../push/.hg/00changelog.i + 00770 ../push/.hg/cache/ 00660 ../push/.hg/requires 00770 ../push/.hg/store/