aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'stable-6.0'Matthias Sohn2022-02-094-13/+49
|\ | | | | | | | | | | | | * stable-6.0: Stop initCause throwing in readAdvertisedRefs Change-Id: I2266814c613fd81e9dfc722532ac3daa30ca66b5
| * Merge branch 'stable-5.13' into stable-6.0Matthias Sohn2022-02-094-13/+41
| |\ | | | | | | | | | | | | | | | | | | * stable-5.13: Stop initCause throwing in readAdvertisedRefs Change-Id: I94251601aa7fae9cc65164eaddcf16471874b11e
| | * Stop initCause throwing in readAdvertisedRefsDarius Jokilehto2022-02-084-13/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BasePackConnection::readAdvertisedRefsImpl was creating an exception by calling `noRepository`, and then blindly calling `initCause` on it. As `noRepository` can be overridden, it's not guaranteed to be missing a cause. BasePackPushConnection overrides `noRepository` and initiates a fetch, which may throw a `NoRemoteRepositoryException` with a cause. In this case calling `initCause` threw an `IllegalStateException`. In order to throw the correct exception, we now return the BasePackPushConnection exception and suppress the one thrown by BasePackConnection Bug: 578511 Change-Id: Ic1018b214be1e83d895979ee6c7cbce3f6765f6f
* | | Support LFS Server URL without .git suffixNail Samatov2022-02-082-13/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to Git LFS documentation, URLs with and without .git suffix should be supported. By default, Git LFS will append .git/info/lfs to the end of a Git remote URL. To build the LFS server URL it will use: Git Remote: https://git-server.com/foo/bar LFS Server: https://git-server.com/foo/bar.git/info/lfs Git Remote: https://git-server.com/foo/bar.git LFS Server: https://git-server.com/foo/bar.git/info/lfs Fix the LfsConnectionFactory accordingly. Move a utility method to add the ".git" suffix if not present yet from FileResolver to StringUtils and use it. Bug: 578621 Change-Id: I8d3645872d5f03bb8e82c9c73647adb3e81ce484 Signed-off-by: Nail Samatov <sanail@yandex.ru> Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
* | | [rebase] InteractiveHandler2: handle Gerrit Change-IdsThomas Wolf2022-02-041-6/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a way for the handler to tell whether the commit should generate a Gerrit Change-Id. Augment the ModifyResult interface, and set the flag on the CommitCommand. This enables users to have a Change-ID be generated when squashing or rewording commits. A possibly already existing Change-Id will remain unchanged. Bug: 440211 Change-Id: I66a72e0646876d162a7011235cca969e20acf060 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
* | | Introduce a constant for the length of an abbreviated hash stringSebastian Schuberth2022-02-037-10/+40
| | | | | | | | | | | | | | | Signed-off-by: Sebastian Schuberth <sebastian.schuberth@bosch.io> Change-Id: I196d58a813f7caa1965af4cf8e2f977ed4cdc350
* | | RebaseCommand: fix commit message in "fixup" caseThomas Wolf2022-02-021-25/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | JGit accumulated in MESSAGE_FIXUP commit messages of a fixup sequence, just like it did in MESSAGE_SQUASH, and on the last step of a sequence of fixups used that file, after stripping all comment lines, as the commit message. That also stripped any lines from the original commit message that happened to start with the comment character. This is not how this is supposed to work. MESSAGE_FIXUP must contain the original commit message of the base commit that is amended, and the file contains the verbatim commit message for the final fixup.[1] Change the implementation accordingly, and add new tests. [1] https://github.com/git/git/blob/df3c41adeb/sequencer.c#L86 ff. Bug: 513726 Change-Id: I885a2b7f10d6c74460a8693aa6cbf867ee0494a1 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
* | | reftable: close old Db in FileRepository#convertToPackedRefsHan-Wen Nienhuys2022-02-021-2/+4
| | | | | | | | | | | | | | | | | | This fixes test failures on Windows. Change-Id: I701fbeb99ffd7951514ae6eae8b28cceb9aebd9f
* | | reftable: tweaks for WindowsHan-Wen Nienhuys2022-02-021-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reload the stack _before_ trying to delete the files. This ensures we don't trip over our own open file handles when deleting compacted tables. If there is another process reading the file, it may be impossible to delete the compacted tables. In this case, ignore the failure. For cleaning the garbage in this case, the protocol as described in https://www.git-scm.com/docs/reftable#_windows should be implemented. This is left for another commit. Bug: 578454 Change-Id: I7aa43508450041eb9376d9f67a0262ff7cc53c73
* | | Merge changes I11366273,I256e1572Ivan Frade2022-02-013-273/+459
|\ \ \ | | | | | | | | | | | | | | | | | | | | * changes: RepoCommand: Offer to set extra files in the destination repository RepoCommand: Move bare/regular superproject writing to their own classes
| * | | RepoCommand: Offer to set extra files in the destination repositoryIvan Frade2022-01-312-3/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We want to save in the destination repository what manifest created its structure. This helps to detect and debug failures in the manifest -> superproject translations. The src commit should be easily readable from the superproject tip. Offer an API to write a file in the destination repository. RepoCommand callers (e.g. gerrit supermanifest plugin) can use this to add a file with the repo/ref/hash of the manifest. Alternatives considered to write the source repo/ref/hash: * .gitattributes of the .gitmodules file. Some updates in the manifest don't touch the .gitmodules (e.g. a linkfile change), so it can fall out of sync. * commit message. Caller would need to follow the commit history to find the latest modification by repo command. This is not helpful e.g. for build bots that want to get the value in one call. Change-Id: I113662734a7ccd39cbc60b46ad3f73038c807682
| * | | RepoCommand: Move bare/regular superproject writing to their own classesIvan Frade2022-01-313-273/+416
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RepoCommand parses the manifest to get a list of projects, clears up conflicts and then writes to the superproject. The first steps are common but the writing is completely different for bare or "regular" (with working dir) repository. Split writing to bare and regular repos into its own classes. This simplifies RepoCommand class and makes clearer what happens on each side (e.g. many options apply only to bare repos). Change-Id: I256e15729bd53ee15fc56de88bce86a2edb2417a
* | | | Merge branch 'stable-6.0'Matthias Sohn2022-02-011-3/+2
|\ \ \ \ | | |/ / | |/| | | | | | | | | | | | | | | | | | * stable-6.0: Fix warning: The value of the parameter otp is not used Change-Id: I47996285c49ce85ab0bb835956a9ef58ed71de20
| * | | Fix warning: The value of the parameter otp is not usedAntonio Barone2022-01-201-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Silence warning by removing unused argument to the beginCopyAsIs() method. Change-Id: I94e7ff1c61cf8b03752de2974baa24b9c061c163
* | | | Fix FS_Win32 if a non-directory is listedThomas Wolf2022-02-011-0/+4
| |/ / |/| | | | | | | | | | | | | | | | | | | | FS.list() is supposed to return an empty array if the File given is not a directory. Bug: 550111 Change-Id: I245da5f1f2bdafd9dfb38fb8d7eff27d900cd5a8 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
* | | Merge conflict messages: prefix conflict lines with a hashThomas Wolf2022-01-314-14/+40
| | | | | | | | | | | | | | | | | | | | | | | | C git also does so. Note that currently the comment character is hard-coded as the hash '#' throughout JGit. Bug: 548529 Change-Id: I4a5597694082a9e5b07412b365cfaf41fa034cfa Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
* | | RebaseCommand: better commit message rewordingThomas Wolf2022-01-311-27/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Respect git config commit.cleanup for rewording. Note that by default this is CleanupMode.STRIP, whereas before this change, JGit would take the reworded message verbatim. Squashing was the only place in JGit where it automatically and unconditionally removed comment lines from commit messages. In other places it didn't do so, and client code needed to do so. Unconditionally removing comments is problematic if the commit message _should_ contain some line starting with a hash, which can easily occur with the way Github, Gitlab, and other git web servers link to issues or PRs: they all allow the short-hand "#<number>". Introduce a new InteractiveHandler2 extension interface, which can return the edited message _and_ a clean-up mode. This way, client code can decide on its own how to clean the message, and if JGit shouldn't do any further cleaning, it can return CleanupMode.VERBATIM. Or CleanupMode.WHITESPACE. (In the case of SQUASH, it is then of course the client's responsibility to remove the squash comment lines.) If the old InteractiveHandler interface is used, CleanupMode.STRIP is applied unconditionally for squashing, as before. Bug: 578173 Change-Id: Ia0040c247884e684587dd45d6cb85f8b72a4b876 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
* | | CommitCommand: commit message cleanupThomas Wolf2022-01-311-3/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use CommitConfig.CleanupMode to implement git commit --cleanup. Add setters for the clean-up mode, the comment character, and for the default default clean-up mode. Behavior of existing client code is unchanged as the default clean-up mode is set to "verbatim". To use git config defaults, one can call setCleanupMode(CleanupMode.DEFAULT). The default comment character is hard-coded as '#' for now, as in other parts of JGit. Implementing full support for core.commentChar shall be done in a separate change. Bug: 553065 Change-Id: I470785e464a762d3f409f163f1cbdbb98dd81aaf Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
* | | Provide git config commit.cleanupThomas Wolf2022-01-312-0/+187
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add an enumeration for the possible values, and a method to resolve the "default" value. Give CommitConfig a static method to process a text according to a given clean-up mode and comment character. (The core.commentChar is not yet handled by JGit; it's hard-coded as #.) Bug: 553065 Change-Id: If6e384522275f73b713fbc29ffcaa1753c239dea Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
* | | ObjectWalk: close ObjectReader on close() if neededThomas Wolf2022-01-302-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the walk is created via ObjectWalk(Repository), it creates a new ObjectReader. This reader was closed only on dispose(). If such an ObjectWalk was used in a try-with-resource statement the reader might not get closed. Bug: 578458 Change-Id: I1be31829dc466530f23006a53c29b657fd5fb410 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
* | | BinaryHunkInputStream: accept CR-LFThomas Wolf2022-01-301-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | Let's be lenient and accept hunk lines terminated by CR-LF, too, not just lines terminated by LF. Bug: 550111 Change-Id: I7f796df666300ab56cc6c07f22eda45fbf4c941e Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
* | | sshd: support the ConnectTimeout ssh configThomas Wolf2022-01-301-0/+9
| | | | | | | | | | | | | | | | | | Parse the value from the ssh config and if set use it when connecting. Change-Id: I85b44c9468a5027602375706612c46ea7a99b2bd Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
* | | sshd: support the AddKeysToAgent ssh configThomas Wolf2022-01-302-0/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add parsing of the config. Implement the SSH agent protocol for adding a key. In the pubkey authentication, add keys to the agent as soon as they've been loaded successfully, before even attempting to use them for authentication. OpenSSH does the same. Bug: 577052 Change-Id: Id1c08d9676a74652256b22281c2f8fa0b6508fa6 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
* | | sshd: handle "IdentityAgent SSH_AUTH_SOCK" in ssh configThomas Wolf2022-01-302-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | OpenSSH has (for legacy reasons?) the option of specifying the default environment variable directly, instead of using ${SSH_AUTH_SOCK}. Make sure the plain variable name is not taken as a relative path name. Bug: 577053 Change-Id: If8f550dffc43887254f71aa0b487c50fa14d0627 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
* | | sshd: support IdentityAgent configThomas Wolf2022-01-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Handle the 'none' value, and change the value to select Pageant to something that looks like an absolute UNC path name to avoid it's handled as an relative path name. Bug: 577053 Change-Id: I4ccf047abbc1def50e2782319e4fa7c744069401 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
* | | Merge "PackOutputStream: Extract cancellation and digest to superclass"Ivan Frade2022-01-272-72/+129
|\ \ \
| * | | PackOutputStream: Extract cancellation and digest to superclasskylezhao2022-01-272-72/+129
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Checking the cancelled status and keeping a digest of the written data is useful for other output streams. e.g. to write commit-graphs. Pull up that functionality to a superclass, so it can be reused. Change-Id: I177b50be09c4ea631e7a144cc6127085ec2ca411 Signed-off-by: kylezhao <kylezhao@tencent.com>
* | | | Merge "DFS block cache: report index load and evict stats"Ivan Frade2022-01-212-4/+162
|\ \ \ \
| * | | | DFS block cache: report index load and evict statsAlina Djamankulova2022-01-212-4/+162
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enhance cache performance monitoring for large data such as pack and bitmap indexes. Provide details about what is loaded and evicted from cache like total number of cache hits, time in cache before eviction. Add a custom consumer to report loading events and eviction events when enabled. Signed-off-by: Alina Djamankulova <adjama@google.com> Change-Id: I5739325db7ff7ec370e4defd8f7e46f1c3f5d2dd
* | | | | Let org.eclipse.jgit.pgm use BooleanTriStateMatthias Sohn2022-01-191-1/+2
| | | | | | | | | | | | | | | | | | | | Change-Id: I575cd5e1ecd326514a8bb4c36a86a2dc71ba5457
* | | | | Merge branch 'stable-6.0'Matthias Sohn2022-01-191-0/+1
|\ \ \ \ \ | |_|/ / / |/| | / / | | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | * stable-6.0: [bazel] Skip ConfigTest#testCommitTemplatePathInHomeDirecory [errorprone] Fix InfiniteRecursion error in RecordingLogger [errorprone] Suppress Finally error in ObjectDownloadListener [errorprone] Fix implicit use of default charset in FileBasedConfigTest [errorprone] Suppress FutureReturnValueIgnored in FileRepository#autoGc Change-Id: I08d58c8f3f04e3a920da43b5fb252b1654c2b33c
| * | | Merge "[errorprone] Suppress FutureReturnValueIgnored in ↵Matthias Sohn2022-01-191-0/+1
| |\ \ \ | | | | | | | | | | | | | | | FileRepository#autoGc" into stable-6.0
| | * | | [errorprone] Suppress FutureReturnValueIgnored in FileRepository#autoGcMatthias Sohn2022-01-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ignore the FutureReturnValueIgnored warning for the unused return value of #gc. Change-Id: I4e7a2f85d404962c01726f9a1d079fe4a6430a1b
* | | | | Merge branch 'stable-6.0'Matthias Sohn2022-01-181-0/+5
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-6.0: UploadPack v2 protocol: Stop negotiation for orphan refs Complete update to servlet api 4.0.0 Change-Id: I55ab6e8fd4a76e4313e37b12f9fc5d5e4b84a681
| * | | | Merge branch 'stable-5.13' into stable-6.0Matthias Sohn2022-01-181-0/+5
| |\ \ \ \ | | |/ / / | |/| | / | | | |/ | | |/| | | | | | | | | * stable-5.13: UploadPack v2 protocol: Stop negotiation for orphan refs Change-Id: I6a9ed8338ffbf5363e48d640a2c4209e4e503549
| | * | Merge branch 'stable-5.12' into stable-5.13Matthias Sohn2022-01-181-0/+5
| | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.12: UploadPack v2 protocol: Stop negotiation for orphan refs Change-Id: Ib43068c32d9cb8effe4b873396391dc3c9197a6e
| | | * \ Merge branch 'stable-5.11' into stable-5.12Matthias Sohn2022-01-181-0/+5
| | | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.11: UploadPack v2 protocol: Stop negotiation for orphan refs Change-Id: I5db432bd416cfa8d3dd295bdce63e31d5f160a8a
| | | | * | UploadPack v2 protocol: Stop negotiation for orphan refsMarcin Czech2022-01-181-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The fetch of a single orphan ref (for example Gerrit meta ref: refs/changes/21/21/meta) did not stop the negotiation so client had to advertise all refs. This impacts the fetch performance on repositories with a large number of refs (for example on Gerrit repository it takes 20 seconds to fetch meta ref comparing to 1.2 second to fetch ref with parent). To avoid this issue UploadPack, used on the server side, now checks if all `want` refs have parents, if not this means that client doesn't need any extra objects, hence the server responds with `ready` and finishes the negotiation phase. Bug: 577937 Change-Id: Ia3001b400b415d5cf6aae45e72345ca08d3af058
* | | | | | Merge branch 'stable-6.0'Matthias Sohn2021-12-312-3/+24
|\| | | | | | |_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | * stable-6.0: Use FileSnapshot without using configs for FileBasedConfig Change-Id: Icc38ce20c1c791c8cf0ca3dcab46b1151f122805
| * | | | Merge branch 'stable-5.13' into stable-6.0Matthias Sohn2021-12-312-3/+24
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.13: Use FileSnapshot without using configs for FileBasedConfig Change-Id: Iaff40b144aea9ad5e6d0fa6b448ad7d527992832
| | * | | Merge branch 'stable-5.12' into stable-5.13Matthias Sohn2021-12-312-3/+24
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.12: Use FileSnapshot without using configs for FileBasedConfig Change-Id: I6a0266cbcaaf18d0d60f0abecb5434fd919c44b7
| | | * | Merge branch 'stable-5.11' into stable-5.12Matthias Sohn2021-12-312-3/+24
| | | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.11: Use FileSnapshot without using configs for FileBasedConfig Change-Id: I4e241860c2ca50750e22c2761c515c9895688c55
| | | | * Merge branch 'stable-5.10' into stable-5.11Matthias Sohn2021-12-312-3/+24
| | | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.10: Use FileSnapshot without using configs for FileBasedConfig Change-Id: Ie3f2d05aeb1aa04af707cfafef5780349be4d981
| | | | | * Merge branch 'stable-5.9' into stable-5.10Matthias Sohn2021-12-312-3/+24
| | | | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.9: Use FileSnapshot without using configs for FileBasedConfig Change-Id: I4f954c48ad6e8ff18826fdc72d225bff3e3ae2d9
| | | | | | * Merge branch 'stable-5.8' into stable-5.9Matthias Sohn2021-12-302-3/+24
| | | | | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.8: Use FileSnapshot without using configs for FileBasedConfig Change-Id: Ic97d38fc85daa00297abbfa186f83b779966e7ef
| | | | | | | * Merge branch 'stable-5.7' into stable-5.8stable-5.8Matthias Sohn2021-12-302-3/+24
| | | | | | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.7: Use FileSnapshot without using configs for FileBasedConfig Change-Id: If9cc2f2bae5dbead7a38218828da461540be942e
| | | | | | | | * Merge branch 'stable-5.6' into stable-5.7stable-5.7Matthias Sohn2021-12-302-3/+24
| | | | | | | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.6: Use FileSnapshot without using configs for FileBasedConfig Change-Id: I274d46d73cc896dcfde6e24c69c71f33aaa78d20
| | | | | | | | | * Merge branch 'stable-5.5' into stable-5.6stable-5.6Matthias Sohn2021-12-302-3/+24
| | | | | | | | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.5: Use FileSnapshot without using configs for FileBasedConfig Change-Id: If904289feecd1e0d8466c1fb998f160f14d54b61
| | | | | | | | | | * Merge branch 'stable-5.4' into stable-5.5stable-5.5Matthias Sohn2021-12-302-3/+24
| | | | | | | | | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.4: Use FileSnapshot without using configs for FileBasedConfig Change-Id: I84e11bdaa9306e23212dac9d8670557a18d40107
| | | | | | | | | | | * Merge branch 'stable-5.3' into stable-5.4stable-5.4Matthias Sohn2021-12-302-3/+24
| | | | | | | | | | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.3: Use FileSnapshot without using configs for FileBasedConfig Change-Id: I3d8eb2fa721e1a791db47a2342acc690ced01715