From eb1c18565ce822ca1e03c9388209726d06fde6d4 Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Fri, 6 Sep 2019 09:20:55 +0900 Subject: [PATCH 01/14] CLI: Remove unused externalized strings Change-Id: Id44117dd72b0e71e9bf0046a3c965eeae64cf3ea Signed-off-by: David Pursehouse --- .../org/eclipse/jgit/pgm/internal/CLIText.properties | 4 ---- .../src/org/eclipse/jgit/pgm/internal/CLIText.java | 4 ---- 2 files changed, 8 deletions(-) diff --git a/org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/internal/CLIText.properties b/org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/internal/CLIText.properties index 8ff9c6bb1..08a3d7e7d 100644 --- a/org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/internal/CLIText.properties +++ b/org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/internal/CLIText.properties @@ -24,7 +24,6 @@ branchNameRequired=branch name required branchNotFound=branch ''{0}'' not found. cacheTreePathInfo="{0}": {1} entries, {2} children cannotBeRenamed={0} cannot be renamed -cannotChekoutNoHeadsAdvertisedByRemote=cannot checkout; no HEAD advertised by remote cannotCombineSquashWithNoff=You cannot combine --squash with --no-ff. cannotCreateCommand=Cannot create command {0} cannotCreateOutputStream=cannot create output stream @@ -33,7 +32,6 @@ cannotDeleteFile=error: The following file could not be deleted: cannotDeleteTheBranchWhichYouAreCurrentlyOn=Cannot delete the branch ''{0}'' which you are currently on. cannotGuessLocalNameFrom=cannot guess local name from {0} cannotLock=Cannot lock {0} -cannotMergeDetachedHead=Cannot merge into detached HEAD cannotReadBecause=cannot read {0}: {1} cannotReadPackageInformation=Cannot read package information. cannotRenameDetachedHEAD=Cannot rename detached HEAD @@ -64,7 +62,6 @@ expectedNumberOfbytes=Expected {0} bytes. exporting=Exporting {0} failedToCommitIndex=failed to commit index failedToLockIndex=failed to lock index -failedToLockTag=Failed to lock tag {0}: {1} fatalError=fatal: {0} fatalThisProgramWillDestroyTheRepository=fatal: This program will destroy the repository\nfatal:\nfatal:\nfatal: {0}\nfatal:\nfatal: To continue, add {1} to the command line\nfatal: fetchingSubmodule=Fetching submodule {0} @@ -154,7 +151,6 @@ needSingleRevision=Needed a single revision noGitRepositoryConfigured=No Git repository configured. noNamesFound=No names found, cannot describe anything. noSuchFile=no such file: {0} -noSuchRemoteRef=no such remote ref: ''{0}'' noSystemConsoleAvailable=No System.console available noTREESectionInIndex=no 'TREE' section in index nonFastForward=non-fast forward diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/internal/CLIText.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/internal/CLIText.java index b3ad8bf40..013ee1cf2 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/internal/CLIText.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/internal/CLIText.java @@ -138,7 +138,6 @@ public class CLIText extends TranslationBundle { /***/ public String cacheTreePathInfo; /***/ public String configFileNotFound; /***/ public String cannotBeRenamed; - /***/ public String cannotChekoutNoHeadsAdvertisedByRemote; /***/ public String cannotCombineSquashWithNoff; /***/ public String cannotCreateCommand; /***/ public String cannotCreateOutputStream; @@ -147,7 +146,6 @@ public class CLIText extends TranslationBundle { /***/ public String cannotDeleteTheBranchWhichYouAreCurrentlyOn; /***/ public String cannotGuessLocalNameFrom; /***/ public String cannotLock; - /***/ public String cannotMergeDetachedHead; /***/ public String cannotReadBecause; /***/ public String cannotReadPackageInformation; /***/ public String cannotRenameDetachedHEAD; @@ -177,7 +175,6 @@ public class CLIText extends TranslationBundle { /***/ public String exporting; /***/ public String failedToCommitIndex; /***/ public String failedToLockIndex; - /***/ public String failedToLockTag; /***/ public String fatalError; /***/ public String fatalThisProgramWillDestroyTheRepository; /***/ public String fetchingSubmodule; @@ -257,7 +254,6 @@ public class CLIText extends TranslationBundle { /***/ public String noGitRepositoryConfigured; /***/ public String noNamesFound; /***/ public String noSuchFile; - /***/ public String noSuchRemoteRef; /***/ public String noTREESectionInIndex; /***/ public String nonFastForward; /***/ public String noSystemConsoleAvailable; From 689474248c2e5f1897edc589636c8bf98c11b2c7 Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Fri, 6 Sep 2019 10:04:42 +0900 Subject: [PATCH 02/14] RepoText: Remove unused externalized string Change-Id: Ida47637f54afdb76513be9b04aae32107567d4e3 Signed-off-by: David Pursehouse --- .../org/eclipse/jgit/gitrepo/internal/RepoText.properties | 1 - .../src/org/eclipse/jgit/gitrepo/internal/RepoText.java | 1 - 2 files changed, 2 deletions(-) diff --git a/org.eclipse.jgit/resources/org/eclipse/jgit/gitrepo/internal/RepoText.properties b/org.eclipse.jgit/resources/org/eclipse/jgit/gitrepo/internal/RepoText.properties index e942038a3..64805109e 100644 --- a/org.eclipse.jgit/resources/org/eclipse/jgit/gitrepo/internal/RepoText.properties +++ b/org.eclipse.jgit/resources/org/eclipse/jgit/gitrepo/internal/RepoText.properties @@ -1,4 +1,3 @@ -copyFileFailed=Error occurred during execution of copyfile rule. errorIncludeFile=Error: unable to read include file {0} errorIncludeNotImplemented=Error: tag not supported as no callback defined. errorNoDefault=Error: no default remote in manifest file. diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/internal/RepoText.java b/org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/internal/RepoText.java index ccafff667..9723e5b2f 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/internal/RepoText.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/internal/RepoText.java @@ -61,7 +61,6 @@ public class RepoText extends TranslationBundle { } // @formatter:off - /***/ public String copyFileFailed; /***/ public String errorIncludeFile; /***/ public String errorIncludeNotImplemented; /***/ public String errorNoDefault; From 8792743c5123032634b6ea8835fc00862996c0e9 Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Fri, 6 Sep 2019 11:06:33 +0900 Subject: [PATCH 03/14] JGitText: Remove unused externalized strings Change-Id: I995d7a1b6ab2866221eee9f5cb828b97192daf4a Signed-off-by: David Pursehouse --- .../eclipse/jgit/internal/JGitText.properties | 66 ------------------- .../org/eclipse/jgit/internal/JGitText.java | 66 ------------------- 2 files changed, 132 deletions(-) diff --git a/org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties b/org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties index dc1db8140..918ec41b2 100644 --- a/org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties +++ b/org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties @@ -35,13 +35,10 @@ badRef=Bad ref: {0}: {1} badSectionEntry=Bad section entry: {0} badShallowLine=Bad shallow line: {0} bareRepositoryNoWorkdirAndIndex=Bare Repository has neither a working tree, nor an index -base64InputNotProperlyPadded=Base64 input not properly padded. baseLengthIncorrect=base length incorrect bitmapMissingObject=Bitmap at {0} is missing {1}. bitmapsMustBePrepared=Bitmaps must be prepared before they may be written. blameNotCommittedYet=Not Committed Yet -blobNotFound=Blob not found: {0} -blobNotFoundForPath=Blob not found: {0} for path: {1} blockLimitNotMultipleOfBlockSize=blockLimit {0} must be a multiple of blockSize {1} blockLimitNotPositive=blockLimit must be positive: {0} blockSizeNotPowerOf2=blockSize must be a power of 2 @@ -54,7 +51,6 @@ cannotAccessLastModifiedForSafeDeletion=Unable to access lastModifiedTime of fil cannotBeCombined=Cannot be combined. cannotBeRecursiveWhenTreesAreIncluded=TreeWalk shouldn't be recursive when tree objects are included. cannotChangeActionOnComment=Cannot change action on comment line in git-rebase-todo file, old action: {0}, new action: {1}. -cannotChangeToComment=Cannot change a non-comment line to a comment line. cannotCheckoutFromUnbornBranch=Cannot checkout from unborn branch cannotCheckoutOursSwitchBranch=Checking out ours/theirs is only possible when checking out index, not when switching branches. cannotCombineSquashWithNoff=Cannot combine --squash with --no-ff. @@ -71,8 +67,6 @@ cannotCreateTempDir=Cannot create a temp dir cannotDeleteCheckedOutBranch=Branch {0} is checked out and cannot be deleted cannotDeleteFile=Cannot delete file: {0} cannotDeleteObjectsPath=Cannot delete {0}/{1}: {2} -cannotDeleteStaleTrackingRef=Cannot delete stale tracking ref {0} -cannotDeleteStaleTrackingRef2=Cannot delete stale tracking ref {0}: {1} cannotDetermineProxyFor=Cannot determine proxy for {0} cannotDownload=Cannot download {0} cannotEnterObjectsPath=Cannot enter {0}/objects: {1} @@ -104,20 +98,16 @@ cannotReadObject=Cannot read object cannotReadObjectsPath=Cannot read {0}/{1}: {2} cannotReadTree=Cannot read tree {0} cannotRebaseWithoutCurrentHead=Can not rebase without a current HEAD -cannotResolveLocalTrackingRefForUpdating=Cannot resolve local tracking ref {0} for updating. cannotSaveConfig=Cannot save config file ''{0}'' cannotSquashFixupWithoutPreviousCommit=Cannot {0} without previous commit. cannotStoreObjects=cannot store objects cannotResolveUniquelyAbbrevObjectId=Could not resolve uniquely the abbreviated object ID -cannotUnloadAModifiedTree=Cannot unload a modified tree. cannotUpdateUnbornBranch=Cannot update unborn branch -cannotWorkWithOtherStagesThanZeroRightNow=Cannot work with other stages than zero right now. Won't write corrupt index. cannotWriteObjectsPath=Cannot write {0}/{1}: {2} canOnlyCherryPickCommitsWithOneParent=Cannot cherry-pick commit ''{0}'' because it has {1} parents, only commits with exactly one parent are supported. canOnlyRevertCommitsWithOneParent=Cannot revert commit ''{0}'' because it has {1} parents, only commits with exactly one parent are supported commitDoesNotHaveGivenParent=The commit ''{0}'' does not have a parent number {1}. cantFindObjectInReversePackIndexForTheSpecifiedOffset=Can''t find object in (reverse) pack index for the specified offset {0} -cantPassMeATree=Can't pass me a tree! channelMustBeInRange1_255=channel {0} must be in range [1, 255] characterClassIsNotSupported=The character class {0} is not supported. checkingOutFiles=Checking out files @@ -132,7 +122,6 @@ collisionOn=Collision on {0} commandClosedStderrButDidntExit=Command {0} closed stderr stream but didn''t exit within timeout {1} seconds commandRejectedByHook=Rejected by "{0}" hook.\n{1} commandWasCalledInTheWrongState=Command {0} was called in the wrong state -commitAlreadyExists=exists {0} commitMessageNotSpecified=commit message not specified commitOnRepoWithoutHEADCurrentlyNotSupported=Commit on repo without HEAD currently not supported commitAmendOnInitialNotPossible=Amending is not possible on initial commit. @@ -148,14 +137,11 @@ corruptionDetectedReReadingAt=Corruption detected re-reading at {0} corruptObjectBadDate=bad date corruptObjectBadEmail=bad email corruptObjectBadStream=bad stream -corruptObjectBadStreamCorruptHeader=bad stream, corrupt header corruptObjectBadTimezone=bad time zone corruptObjectDuplicateEntryNames=duplicate entry names corruptObjectGarbageAfterSize=garbage after size corruptObjectIncorrectLength=incorrect length corruptObjectIncorrectSorting=incorrectly sorted -corruptObjectInvalidEntryMode=invalid entry mode -corruptObjectInvalidMode=invalid mode corruptObjectInvalidModeChar=invalid mode character corruptObjectInvalidModeStartsZero=mode starts with '0' corruptObjectInvalidMode2=invalid mode {0,number,#} @@ -175,7 +161,6 @@ corruptObjectInvalidParent=invalid parent corruptObjectInvalidTree=invalid tree corruptObjectInvalidType=invalid type corruptObjectInvalidType2=invalid type {0} -corruptObjectMalformedHeader=malformed header: {0} corruptObjectMissingEmail=missing email corruptObjectNameContainsByte=name contains byte 0x%x corruptObjectNameContainsChar=name contains '%c' @@ -188,15 +173,9 @@ corruptObjectNegativeSize=negative size corruptObjectNoAuthor=no author corruptObjectNoCommitter=no committer corruptObjectNoHeader=no header -corruptObjectNoObject=no object corruptObjectNoObjectHeader=no object header -corruptObjectNoTaggerBadHeader=no tagger/bad header -corruptObjectNoTaggerHeader=no tagger header corruptObjectNoTagHeader=no tag header -corruptObjectNoTagName=no tag name -corruptObjectNotree=no tree corruptObjectNotreeHeader=no tree header -corruptObjectNoType=no type corruptObjectNoTypeHeader=no type header corruptObjectPackfileChecksumIncorrect=Packfile checksum incorrect. corruptObjectTruncatedInMode=truncated in mode @@ -204,20 +183,12 @@ corruptObjectTruncatedInName=truncated in name corruptObjectTruncatedInObjectId=truncated in object id corruptObjectZeroId=entry points to null SHA-1 corruptUseCnt=close() called when useCnt is already zero for {0} -couldNotCheckOutBecauseOfConflicts=Could not check out because of conflicts -couldNotDeleteLockFileShouldNotHappen=Could not delete lock file. Should not happen -couldNotDeleteTemporaryIndexFileShouldNotHappen=Could not delete temporary index file. Should not happen couldNotGetAdvertisedRef=Remote {0} did not advertise Ref for branch {1}. This Ref may not exist in the remote or may be hidden by permission settings. couldNotGetRepoStatistics=Could not get repository statistics couldNotLockHEAD=Could not lock HEAD -couldNotReadIndexInOneGo=Could not read index in one go, only {0} out of {1} read couldNotReadObjectWhileParsingCommit=Could not read an object while parsing commit {0} -couldNotRenameDeleteOldIndex=Could not rename delete old index -couldNotRenameTemporaryFile=Could not rename temporary file {0} to new location {1} -couldNotRenameTemporaryIndexFileToIndex=Could not rename temporary index file to index couldNotRewindToUpstreamCommit=Could not rewind to upstream commit couldNotURLEncodeToUTF8=Could not URL encode to UTF-8 -couldNotWriteFile=Could not write file {0} countingObjects=Counting objects corruptPack=Pack file {0} is corrupt, removing it from pack list createBranchFailedUnknownReason=Create branch failed for unknown reason @@ -245,8 +216,6 @@ DIRCExtensionIsTooLargeAt=DIRC extension {0} is too large at {1} bytes. DIRCExtensionNotSupportedByThisVersion=DIRC extension {0} not supported by this version. DIRCHasTooManyEntries=DIRC has too many entries. DIRCUnrecognizedExtendedFlags=Unrecognized extended flags: {0} -dirtyFilesExist=Dirty files exist. Refusing to merge -doesNotHandleMode=Does not handle mode {0} ({1}) downloadCancelled=Download cancelled downloadCancelledDuringIndexing=Download cancelled during indexing duplicateAdvertisementsOf=duplicate advertisements of {0} @@ -265,9 +234,6 @@ enumValueNotSupported0=Invalid value: {0} enumValueNotSupported2=Invalid value: {0}.{1}={2} enumValueNotSupported3=Invalid value: {0}.{1}.{2}={3} enumValuesNotAvailable=Enumerated values of type {0} not available -errorDecodingFromFile=Error decoding from file {0} -errorEncodingFromFile=Error encoding from file {0} -errorInBase64CodeReadingStream=Error in Base64 code reading stream. errorInPackedRefs=error in packed-refs errorInvalidProtocolWantedOldNewRef=error: invalid protocol: wanted 'old new ref' errorListing=Error listing {0} @@ -311,7 +277,6 @@ failureDueToOneOfTheFollowing=Failure due to one of the following: failureUpdatingFETCH_HEAD=Failure updating FETCH_HEAD: {0} failureUpdatingTrackingRef=Failure updating tracking ref {0}: {1} fileCannotBeDeleted=File cannot be deleted: {0} -fileIsTooBigForThisConvenienceMethod=File is too big for this convenience method ({0} bytes). fileIsTooLarge=File is too large: {0} fileModeNotSetForPath=FileMode not set for path {0} filterExecutionFailed=Execution of filter command ''{0}'' on file ''{1}'' failed @@ -323,9 +288,7 @@ flagNotFromThis={0} not from this. flagsAlreadyCreated={0} flags already created. funnyRefname=funny refname gcFailed=Garbage collection failed. -gcLogExists=A previous GC run reported an error: ''{0}''. Automatic gc will fail until ''{1}'' is removed. gcTooManyUnpruned=Too many loose, unpruneable objects after garbage collection. Consider adjusting gc.auto or gc.pruneExpire. -gitmodulesNotFound=.gitmodules not found in tree. headRequiredToStash=HEAD required to stash local changes hoursAgo={0} hours ago httpConfigCannotNormalizeURL=Cannot normalize URL path {0}: too many .. segments @@ -338,14 +301,10 @@ illegalArgumentNotA=Not {0} illegalCombinationOfArguments=The combination of arguments {0} and {1} is not allowed illegalHookName=Illegal hook name {0} illegalPackingPhase=Illegal packing phase {0} -illegalStateExists=exists {0} -improperlyPaddedBase64Input=Improperly padded Base64 input. incorrectHashFor=Incorrect hash for {0}; computed {1} as a {2} from {3} bytes. incorrectOBJECT_ID_LENGTH=Incorrect OBJECT_ID_LENGTH. indexFileCorruptedNegativeBucketCount=Invalid negative bucket count read from pack v2 index file: {0} -indexFileIsInUse=Index file is in use indexFileIsTooLargeForJgit=Index file is too large for jgit -indexSignatureIsInvalid=Index signature is invalid: {0} indexWriteException=Modified index could not be written initFailedBareRepoDifferentDirs=When initializing a bare repo with directory {0} and separate git-dir {1} specified both folders must point to the same location initFailedDirIsNoDirectory=Cannot set directory to ''{0}'' which is not a directory @@ -363,7 +322,6 @@ invalidAdvertisementOf=invalid advertisement of {0} invalidAncestryLength=Invalid ancestry length invalidBooleanValue=Invalid boolean value: {0}.{1}={2} invalidChannel=Invalid channel {0} -invalidCharacterInBase64Data=Invalid character in Base64 data. invalidCommitParentNumber=Invalid commit parent number invalidDepth=Invalid depth: {0} invalidEncryption=Invalid encryption @@ -388,10 +346,6 @@ invalidObject=Invalid {0} {1}: {2} invalidOldIdSent=invalid old id sent invalidPacketLineHeader=Invalid packet line header: {0} invalidPath=Invalid path: {0} -invalidPathContainsSeparator=Invalid path (contains separator ''{0}''): {1} -invalidPathPeriodAtEndWindows=Invalid path (period at end is ignored by Windows): {0} -invalidPathSpaceAtEndWindows=Invalid path (space at end is ignored by Windows): {0} -invalidPathReservedOnWindows=Invalid path (''{0}'' is reserved on Windows): {1} invalidPurgeFactor=Invalid purgeFactor {0}, values have to be in range between 0 and 1 invalidRedirectLocation=Invalid redirect location {0} -> {1} invalidRefAdvertisementLine=Invalid ref advertisement line: ''{1}'' @@ -434,7 +388,6 @@ lockError=lock error: {0} lockFailedRetry=locking {0} failed after {1} retries lockOnNotClosed=Lock on {0} not closed. lockOnNotHeld=Lock on {0} not held. -malformedpersonIdentString=Malformed PersonIdent string (no < was found): {0} maxCountMustBeNonNegative=max count must be >= 0 mergeConflictOnNonNoteEntries=Merge conflict on non-note entries: base = {0}, ours = {1}, theirs = {2} mergeConflictOnNotes=Merge conflict on note {0}. base = {1}, ours = {2}, theirs = {2} @@ -442,7 +395,6 @@ mergeStrategyAlreadyExistsAsDefault=Merge strategy "{0}" already exists as a def mergeStrategyDoesNotSupportHeads=merge strategy {0} does not support {1} heads to be merged into HEAD mergeUsingStrategyResultedInDescription=Merge of revisions {0} with base {1} using strategy {2} resulted in: {3}. {4} mergeRecursiveConflictsWhenMergingCommonAncestors=Multiple common ancestors were found and merging them resulted in a conflict: {0}, {1} -mergeRecursiveReturnedNoCommit=Merge returned no commit:\n Depth {0}\n Head one {1}\n Head two {2} mergeRecursiveTooManyMergeBasesFor = "More than {0} merge bases for:\n a {1}\n b {2} found:\n count {3}" messageAndTaggerNotAllowedInUnannotatedTags = Unannotated tags cannot have a message or tagger minutesAgo={0} minutes ago @@ -466,9 +418,6 @@ monthsAgo={0} months ago multipleMergeBasesFor=Multiple merge bases for:\n {0}\n {1} found:\n {2}\n {3} nameMustNotBeNullOrEmpty=Ref name must not be null or empty. need2Arguments=Need 2 arguments -needPackOut=need packOut -needsAtLeastOneEntry=Needs at least one entry -needsWorkdir=Needs workdir newIdMustNotBeNull=New ID must not be null newlineInQuotesNotAllowed=Newline in quotes not allowed noApplyInDelete=No apply in delete @@ -497,16 +446,13 @@ nothingToPush=Nothing to push. notMergedExceptionMessage=Branch was not deleted as it has not been merged yet; use the force option to delete it anyway noXMLParserAvailable=No XML parser available. objectAtHasBadZlibStream=Object at {0} in {1} has bad zlib stream -objectAtPathDoesNotHaveId=Object at path "{0}" does not have an id assigned. All object ids must be assigned prior to writing a tree. objectIsCorrupt=Object {0} is corrupt: {1} objectIsCorrupt3={0}: object {1}: {2} objectIsNotA=Object {0} is not a {1}. objectNotFound=Object {0} not found. objectNotFoundIn=Object {0} not found in {1}. obtainingCommitsForCherryPick=Obtaining commits that need to be cherry-picked -offsetWrittenDeltaBaseForObjectNotFoundInAPack=Offset-written delta base for object not found in a pack oldIdMustNotBeNull=Expected old ID must not be null -onlyAlreadyUpToDateAndFastForwardMergesAreAvailable=only already-up-to-date and fast forward merges are available onlyOneFetchSupported=Only one fetch supported onlyOneOperationCallPerConnectionIsSupported=Only one operation call per connection is supported. openFilesMustBeAtLeast1=Open files must be >= 1 @@ -516,7 +462,6 @@ outputHasAlreadyBeenStarted=Output has already been started. overflowedReftableBlock=Overflowed reftable block packChecksumMismatch=Pack checksum mismatch detected for pack file {0}: .pack has {1} whilst .idx has {2} packCorruptedWhileWritingToFilesystem=Pack corrupted while writing to filesystem -packDoesNotMatchIndex=Pack {0} does not match index packedRefsHandleIsStale=packed-refs handle is stale, {0}. retry packetSizeMustBeAtLeast=packet size {0} must be >= {1} packetSizeMustBeAtMost=packet size {0} must be <= {1} @@ -538,7 +483,6 @@ packWriterStatistics=Total {0,number,#0} (delta {1,number,#0}), reused {2,number panicCantRenameIndexFile=Panic: index file {0} must be renamed to replace {1}; until then repository is corrupt patchApplyException=Cannot apply: {0} patchFormatException=Format error: {0} -pathIsNotInWorkingDir=Path is not in working dir pathNotConfigured=Submodule path is not configured peeledLineBeforeRef=Peeled line before ref. peeledRefIsRequired=Peeled ref is required. @@ -551,7 +495,6 @@ progressMonUploading=Uploading {0} propertyIsAlreadyNonNull=Property is already non null pruneLoosePackedObjects=Prune loose objects also found in pack files pruneLooseUnreferencedObjects=Prune loose, unreferenced objects -pullOnRepoWithoutHEADCurrentlyNotSupported=Pull on repository without HEAD currently not supported pullTaskName=Pull pushCancelled=push cancelled pushCertificateInvalidField=Push certificate has missing or invalid value for {0} @@ -637,7 +580,6 @@ shortReadOfOptionalDIRCExtensionExpectedAnotherBytes=Short read of optional DIRC shortSkipOfBlock=Short skip of block. signingNotSupportedOnTag=Signing isn't supported on tag operations yet. similarityScoreMustBeWithinBounds=Similarity score must be between 0 and 100. -sizeExceeds2GB=Path {0} size {1} exceeds 2 GiB limit. skipMustBeNonNegative=skip must be >= 0 smartHTTPPushDisabled=smart HTTP push disabled sourceDestinationMustMatch=Source/Destination must match. @@ -658,7 +600,6 @@ sslVerifyCannotSave=Could not save setting for http.sslVerify staleRevFlagsOn=Stale RevFlags on {0} startingReadStageWithoutWrittenRequestDataPendingIsNotSupported=Starting read stage without written request data pending is not supported stashApplyConflict=Applying stashed changes resulted in a conflict -stashApplyConflictInIndex=Applying stashed index changes resulted in a conflict. Dropped index changes. stashApplyFailed=Applying stashed changes did not successfully complete stashApplyOnUnsafeRepository=Cannot apply stashed commit on a repository with state: {0} stashApplyWithoutHead=Cannot apply stashed commit in an empty repository or onto an unborn branch @@ -678,9 +619,7 @@ submoduleNameInvalid=Invalid submodule name ''{0}'' submoduleParentRemoteUrlInvalid=Cannot remove segment from remote url ''{0}'' submodulePathInvalid=Invalid submodule path ''{0}'' submoduleUrlInvalid=Invalid submodule URL ''{0}'' -submodulesNotSupported=Submodules are not supported supportOnlyPackIndexVersion2=Only support index version 2 -symlinkCannotBeWrittenAsTheLinkTarget=Symlink "{0}" cannot be written as the link target cannot be read from within Java. systemConfigFileInvalid=System wide config file {0} is invalid {1} tagAlreadyExists=tag ''{0}'' already exists tagNameInvalid=tag name {0} is invalid @@ -702,7 +641,6 @@ transportExceptionMissingAssumed=Missing assumed {0} transportExceptionReadRef=read {0} transportNeedsRepository=Transport needs repository transportProvidedRefWithNoObjectId=Transport provided ref {0} with no object id -transportProtoAmazonS3=Amazon S3 transportProtoBundleFile=Git Bundle File transportProtoFTP=FTP transportProtoGitAnon=Anonymous Git @@ -714,7 +652,6 @@ transportProtoTest=Test transportSSHRetryInterrupt=Interrupted while waiting for retry treeEntryAlreadyExists=Tree entry "{0}" already exists. treeFilterMarkerTooManyFilters=Too many markTreeFilters passed, maximum number is {0} (passed {1}) -treeIteratorDoesNotSupportRemove=TreeIterator does not support remove() treeWalkMustHaveExactlyTwoTrees=TreeWalk should have exactly two trees. truncatedHunkLinesMissingForAncestor=Truncated hunk, at least {0} lines missing for ancestor {1} truncatedHunkNewLinesMissing=Truncated hunk, at least {0} new lines is missing @@ -724,10 +661,8 @@ unableToCheckConnectivity=Unable to check connectivity. unableToCreateNewObject=Unable to create new object: {0} unableToReadPackfile=Unable to read packfile {0} unableToRemovePath=Unable to remove path ''{0}'' -unableToStore=Unable to store {0}. unableToWrite=Unable to write {0} unauthorized=Unauthorized -underflowedReftableBlock=Underflowed reftable block unencodeableFile=Unencodable file: {0} unexpectedCompareResult=Unexpected metadata comparison result: {0} unexpectedEndOfConfigFile=Unexpected end of config file @@ -743,7 +678,6 @@ unexpectedSubmoduleStatus=Unexpected submodule status: ''{0}'' unknownOrUnsupportedCommand=Unknown or unsupported command "{0}", only "{1}" is allowed. unknownDIRCVersion=Unknown DIRC version {0} unknownHost=unknown host -unknownIndexVersionOrCorruptIndex=Unknown index version (or corrupt index): {0} unknownObject=unknown object unknownObjectInIndex=unknown object {0} found in index but not in pack file unknownObjectType=Unknown object type {0}. diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java index 4c6026624..c82783447 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java @@ -96,13 +96,10 @@ public class JGitText extends TranslationBundle { /***/ public String badSectionEntry; /***/ public String badShallowLine; /***/ public String bareRepositoryNoWorkdirAndIndex; - /***/ public String base64InputNotProperlyPadded; /***/ public String baseLengthIncorrect; /***/ public String bitmapMissingObject; /***/ public String bitmapsMustBePrepared; /***/ public String blameNotCommittedYet; - /***/ public String blobNotFound; - /***/ public String blobNotFoundForPath; /***/ public String blockLimitNotMultipleOfBlockSize; /***/ public String blockLimitNotPositive; /***/ public String blockSizeNotPowerOf2; @@ -115,7 +112,6 @@ public class JGitText extends TranslationBundle { /***/ public String cannotBeCombined; /***/ public String cannotBeRecursiveWhenTreesAreIncluded; /***/ public String cannotChangeActionOnComment; - /***/ public String cannotChangeToComment; /***/ public String cannotCheckoutFromUnbornBranch; /***/ public String cannotCheckoutOursSwitchBranch; /***/ public String cannotCombineSquashWithNoff; @@ -132,8 +128,6 @@ public class JGitText extends TranslationBundle { /***/ public String cannotDeleteCheckedOutBranch; /***/ public String cannotDeleteFile; /***/ public String cannotDeleteObjectsPath; - /***/ public String cannotDeleteStaleTrackingRef; - /***/ public String cannotDeleteStaleTrackingRef2; /***/ public String cannotDetermineProxyFor; /***/ public String cannotDownload; /***/ public String cannotEnterObjectsPath; @@ -165,20 +159,16 @@ public class JGitText extends TranslationBundle { /***/ public String cannotReadObjectsPath; /***/ public String cannotReadTree; /***/ public String cannotRebaseWithoutCurrentHead; - /***/ public String cannotResolveLocalTrackingRefForUpdating; /***/ public String cannotSaveConfig; /***/ public String cannotSquashFixupWithoutPreviousCommit; /***/ public String cannotStoreObjects; /***/ public String cannotResolveUniquelyAbbrevObjectId; - /***/ public String cannotUnloadAModifiedTree; /***/ public String cannotUpdateUnbornBranch; - /***/ public String cannotWorkWithOtherStagesThanZeroRightNow; /***/ public String cannotWriteObjectsPath; /***/ public String canOnlyCherryPickCommitsWithOneParent; /***/ public String canOnlyRevertCommitsWithOneParent; /***/ public String commitDoesNotHaveGivenParent; /***/ public String cantFindObjectInReversePackIndexForTheSpecifiedOffset; - /***/ public String cantPassMeATree; /***/ public String channelMustBeInRange1_255; /***/ public String characterClassIsNotSupported; /***/ public String checkingOutFiles; @@ -193,7 +183,6 @@ public class JGitText extends TranslationBundle { /***/ public String commandClosedStderrButDidntExit; /***/ public String commandRejectedByHook; /***/ public String commandWasCalledInTheWrongState; - /***/ public String commitAlreadyExists; /***/ public String commitMessageNotSpecified; /***/ public String commitOnRepoWithoutHEADCurrentlyNotSupported; /***/ public String commitAmendOnInitialNotPossible; @@ -209,14 +198,11 @@ public class JGitText extends TranslationBundle { /***/ public String corruptObjectBadDate; /***/ public String corruptObjectBadEmail; /***/ public String corruptObjectBadStream; - /***/ public String corruptObjectBadStreamCorruptHeader; /***/ public String corruptObjectBadTimezone; /***/ public String corruptObjectDuplicateEntryNames; /***/ public String corruptObjectGarbageAfterSize; /***/ public String corruptObjectIncorrectLength; /***/ public String corruptObjectIncorrectSorting; - /***/ public String corruptObjectInvalidEntryMode; - /***/ public String corruptObjectInvalidMode; /***/ public String corruptObjectInvalidModeChar; /***/ public String corruptObjectInvalidModeStartsZero; /***/ public String corruptObjectInvalidMode2; @@ -236,7 +222,6 @@ public class JGitText extends TranslationBundle { /***/ public String corruptObjectInvalidTree; /***/ public String corruptObjectInvalidType; /***/ public String corruptObjectInvalidType2; - /***/ public String corruptObjectMalformedHeader; /***/ public String corruptObjectMissingEmail; /***/ public String corruptObjectNameContainsByte; /***/ public String corruptObjectNameContainsChar; @@ -249,15 +234,9 @@ public class JGitText extends TranslationBundle { /***/ public String corruptObjectNoAuthor; /***/ public String corruptObjectNoCommitter; /***/ public String corruptObjectNoHeader; - /***/ public String corruptObjectNoObject; /***/ public String corruptObjectNoObjectHeader; - /***/ public String corruptObjectNoTaggerBadHeader; - /***/ public String corruptObjectNoTaggerHeader; /***/ public String corruptObjectNoTagHeader; - /***/ public String corruptObjectNoTagName; - /***/ public String corruptObjectNotree; /***/ public String corruptObjectNotreeHeader; - /***/ public String corruptObjectNoType; /***/ public String corruptObjectNoTypeHeader; /***/ public String corruptObjectPackfileChecksumIncorrect; /***/ public String corruptObjectTruncatedInMode; @@ -266,20 +245,12 @@ public class JGitText extends TranslationBundle { /***/ public String corruptObjectZeroId; /***/ public String corruptPack; /***/ public String corruptUseCnt; - /***/ public String couldNotCheckOutBecauseOfConflicts; - /***/ public String couldNotDeleteLockFileShouldNotHappen; - /***/ public String couldNotDeleteTemporaryIndexFileShouldNotHappen; /***/ public String couldNotGetAdvertisedRef; /***/ public String couldNotGetRepoStatistics; /***/ public String couldNotLockHEAD; - /***/ public String couldNotReadIndexInOneGo; /***/ public String couldNotReadObjectWhileParsingCommit; - /***/ public String couldNotRenameDeleteOldIndex; - /***/ public String couldNotRenameTemporaryFile; - /***/ public String couldNotRenameTemporaryIndexFileToIndex; /***/ public String couldNotRewindToUpstreamCommit; /***/ public String couldNotURLEncodeToUTF8; - /***/ public String couldNotWriteFile; /***/ public String countingObjects; /***/ public String createBranchFailedUnknownReason; /***/ public String createBranchUnexpectedResult; @@ -306,8 +277,6 @@ public class JGitText extends TranslationBundle { /***/ public String DIRCExtensionNotSupportedByThisVersion; /***/ public String DIRCHasTooManyEntries; /***/ public String DIRCUnrecognizedExtendedFlags; - /***/ public String dirtyFilesExist; - /***/ public String doesNotHandleMode; /***/ public String downloadCancelled; /***/ public String downloadCancelledDuringIndexing; /***/ public String duplicateAdvertisementsOf; @@ -326,9 +295,6 @@ public class JGitText extends TranslationBundle { /***/ public String enumValueNotSupported2; /***/ public String enumValueNotSupported3; /***/ public String enumValuesNotAvailable; - /***/ public String errorDecodingFromFile; - /***/ public String errorEncodingFromFile; - /***/ public String errorInBase64CodeReadingStream; /***/ public String errorInPackedRefs; /***/ public String errorInvalidProtocolWantedOldNewRef; /***/ public String errorListing; @@ -372,7 +338,6 @@ public class JGitText extends TranslationBundle { /***/ public String failureUpdatingFETCH_HEAD; /***/ public String failureUpdatingTrackingRef; /***/ public String fileCannotBeDeleted; - /***/ public String fileIsTooBigForThisConvenienceMethod; /***/ public String fileIsTooLarge; /***/ public String fileModeNotSetForPath; /***/ public String filterExecutionFailed; @@ -384,9 +349,7 @@ public class JGitText extends TranslationBundle { /***/ public String flagsAlreadyCreated; /***/ public String funnyRefname; /***/ public String gcFailed; - /***/ public String gcLogExists; /***/ public String gcTooManyUnpruned; - /***/ public String gitmodulesNotFound; /***/ public String headRequiredToStash; /***/ public String hoursAgo; /***/ public String httpConfigCannotNormalizeURL; @@ -399,14 +362,10 @@ public class JGitText extends TranslationBundle { /***/ public String illegalCombinationOfArguments; /***/ public String illegalHookName; /***/ public String illegalPackingPhase; - /***/ public String illegalStateExists; - /***/ public String improperlyPaddedBase64Input; /***/ public String incorrectHashFor; /***/ public String incorrectOBJECT_ID_LENGTH; /***/ public String indexFileCorruptedNegativeBucketCount; - /***/ public String indexFileIsInUse; /***/ public String indexFileIsTooLargeForJgit; - /***/ public String indexSignatureIsInvalid; /***/ public String indexWriteException; /***/ public String initFailedBareRepoDifferentDirs; /***/ public String initFailedDirIsNoDirectory; @@ -424,7 +383,6 @@ public class JGitText extends TranslationBundle { /***/ public String invalidAncestryLength; /***/ public String invalidBooleanValue; /***/ public String invalidChannel; - /***/ public String invalidCharacterInBase64Data; /***/ public String invalidCommitParentNumber; /***/ public String invalidDepth; /***/ public String invalidEncryption; @@ -449,10 +407,6 @@ public class JGitText extends TranslationBundle { /***/ public String invalidOldIdSent; /***/ public String invalidPacketLineHeader; /***/ public String invalidPath; - /***/ public String invalidPathContainsSeparator; - /***/ public String invalidPathPeriodAtEndWindows; - /***/ public String invalidPathSpaceAtEndWindows; - /***/ public String invalidPathReservedOnWindows; /***/ public String invalidPurgeFactor; /***/ public String invalidRedirectLocation; /***/ public String invalidRefAdvertisementLine; @@ -495,7 +449,6 @@ public class JGitText extends TranslationBundle { /***/ public String lockFailedRetry; /***/ public String lockOnNotClosed; /***/ public String lockOnNotHeld; - /***/ public String malformedpersonIdentString; /***/ public String maxCountMustBeNonNegative; /***/ public String mergeConflictOnNonNoteEntries; /***/ public String mergeConflictOnNotes; @@ -503,7 +456,6 @@ public class JGitText extends TranslationBundle { /***/ public String mergeStrategyDoesNotSupportHeads; /***/ public String mergeUsingStrategyResultedInDescription; /***/ public String mergeRecursiveConflictsWhenMergingCommonAncestors; - /***/ public String mergeRecursiveReturnedNoCommit; /***/ public String mergeRecursiveTooManyMergeBasesFor; /***/ public String messageAndTaggerNotAllowedInUnannotatedTags; /***/ public String minutesAgo; @@ -527,9 +479,6 @@ public class JGitText extends TranslationBundle { /***/ public String multipleMergeBasesFor; /***/ public String nameMustNotBeNullOrEmpty; /***/ public String need2Arguments; - /***/ public String needPackOut; - /***/ public String needsAtLeastOneEntry; - /***/ public String needsWorkdir; /***/ public String newIdMustNotBeNull; /***/ public String newlineInQuotesNotAllowed; /***/ public String noApplyInDelete; @@ -558,16 +507,13 @@ public class JGitText extends TranslationBundle { /***/ public String notMergedExceptionMessage; /***/ public String noXMLParserAvailable; /***/ public String objectAtHasBadZlibStream; - /***/ public String objectAtPathDoesNotHaveId; /***/ public String objectIsCorrupt; /***/ public String objectIsCorrupt3; /***/ public String objectIsNotA; /***/ public String objectNotFound; /***/ public String objectNotFoundIn; /***/ public String obtainingCommitsForCherryPick; - /***/ public String offsetWrittenDeltaBaseForObjectNotFoundInAPack; /***/ public String oldIdMustNotBeNull; - /***/ public String onlyAlreadyUpToDateAndFastForwardMergesAreAvailable; /***/ public String onlyOneFetchSupported; /***/ public String onlyOneOperationCallPerConnectionIsSupported; /***/ public String openFilesMustBeAtLeast1; @@ -577,7 +523,6 @@ public class JGitText extends TranslationBundle { /***/ public String overflowedReftableBlock; /***/ public String packChecksumMismatch; /***/ public String packCorruptedWhileWritingToFilesystem; - /***/ public String packDoesNotMatchIndex; /***/ public String packedRefsHandleIsStale; /***/ public String packetSizeMustBeAtLeast; /***/ public String packetSizeMustBeAtMost; @@ -599,7 +544,6 @@ public class JGitText extends TranslationBundle { /***/ public String panicCantRenameIndexFile; /***/ public String patchApplyException; /***/ public String patchFormatException; - /***/ public String pathIsNotInWorkingDir; /***/ public String pathNotConfigured; /***/ public String peeledLineBeforeRef; /***/ public String peeledRefIsRequired; @@ -612,7 +556,6 @@ public class JGitText extends TranslationBundle { /***/ public String propertyIsAlreadyNonNull; /***/ public String pruneLoosePackedObjects; /***/ public String pruneLooseUnreferencedObjects; - /***/ public String pullOnRepoWithoutHEADCurrentlyNotSupported; /***/ public String pullTaskName; /***/ public String pushCancelled; /***/ public String pushCertificateInvalidField; @@ -698,7 +641,6 @@ public class JGitText extends TranslationBundle { /***/ public String shortSkipOfBlock; /***/ public String signingNotSupportedOnTag; /***/ public String similarityScoreMustBeWithinBounds; - /***/ public String sizeExceeds2GB; /***/ public String skipMustBeNonNegative; /***/ public String smartHTTPPushDisabled; /***/ public String sourceDestinationMustMatch; @@ -719,7 +661,6 @@ public class JGitText extends TranslationBundle { /***/ public String staleRevFlagsOn; /***/ public String startingReadStageWithoutWrittenRequestDataPendingIsNotSupported; /***/ public String stashApplyConflict; - /***/ public String stashApplyConflictInIndex; /***/ public String stashApplyFailed; /***/ public String stashApplyWithoutHead; /***/ public String stashApplyOnUnsafeRepository; @@ -738,10 +679,8 @@ public class JGitText extends TranslationBundle { /***/ public String submoduleNameInvalid; /***/ public String submoduleParentRemoteUrlInvalid; /***/ public String submodulePathInvalid; - /***/ public String submodulesNotSupported; /***/ public String submoduleUrlInvalid; /***/ public String supportOnlyPackIndexVersion2; - /***/ public String symlinkCannotBeWrittenAsTheLinkTarget; /***/ public String systemConfigFileInvalid; /***/ public String tagAlreadyExists; /***/ public String tagNameInvalid; @@ -762,7 +701,6 @@ public class JGitText extends TranslationBundle { /***/ public String transportExceptionMissingAssumed; /***/ public String transportExceptionReadRef; /***/ public String transportNeedsRepository; - /***/ public String transportProtoAmazonS3; /***/ public String transportProtoBundleFile; /***/ public String transportProtoFTP; /***/ public String transportProtoGitAnon; @@ -775,7 +713,6 @@ public class JGitText extends TranslationBundle { /***/ public String transportSSHRetryInterrupt; /***/ public String treeEntryAlreadyExists; /***/ public String treeFilterMarkerTooManyFilters; - /***/ public String treeIteratorDoesNotSupportRemove; /***/ public String treeWalkMustHaveExactlyTwoTrees; /***/ public String truncatedHunkLinesMissingForAncestor; /***/ public String truncatedHunkNewLinesMissing; @@ -785,10 +722,8 @@ public class JGitText extends TranslationBundle { /***/ public String unableToCreateNewObject; /***/ public String unableToReadPackfile; /***/ public String unableToRemovePath; - /***/ public String unableToStore; /***/ public String unableToWrite; /***/ public String unauthorized; - /***/ public String underflowedReftableBlock; /***/ public String unencodeableFile; /***/ public String unexpectedCompareResult; /***/ public String unexpectedEndOfConfigFile; @@ -804,7 +739,6 @@ public class JGitText extends TranslationBundle { /***/ public String unknownOrUnsupportedCommand; /***/ public String unknownDIRCVersion; /***/ public String unknownHost; - /***/ public String unknownIndexVersionOrCorruptIndex; /***/ public String unknownObject; /***/ public String unknownObjectInIndex; /***/ public String unknownObjectType; From 185dc846234608b282d7bdab0f8898dd29d4ebd3 Mon Sep 17 00:00:00 2001 From: Matthias Sohn Date: Fri, 6 Sep 2019 00:52:48 +0200 Subject: [PATCH 04/14] Fix wrong placeholder index in error message packInaccessible See: https://www.eclipse.org/lists/jgit-dev/msg03850.html Change-Id: I0e121a2b7ac399f4a663fa49ab330d27363e9a55 Signed-off-by: Matthias Sohn --- .../resources/org/eclipse/jgit/internal/JGitText.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties b/org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties index 918ec41b2..fb454d6f2 100644 --- a/org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties +++ b/org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties @@ -472,7 +472,7 @@ packfileIsTruncated=Packfile {0} is truncated. packfileIsTruncatedNoParam=Packfile is truncated. packHandleIsStale=Pack file {0} handle is stale, removing it from pack list packHasUnresolvedDeltas=pack has unresolved deltas -packInaccessible=Failed to access pack file {0}, caught {2} consecutive errors while trying to access this pack. +packInaccessible=Failed to access pack file {0}, caught {1} consecutive errors while trying to access this pack. packingCancelledDuringObjectsWriting=Packing cancelled during objects writing packObjectCountMismatch=Pack object count mismatch: pack {0} index {1}: {2} packRefs=Pack refs From f75effda4d36309da75d463eeb7239dad4272013 Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Wed, 10 Oct 2018 10:53:35 +0900 Subject: [PATCH 05/14] Bazel: Require minimum bazel version 0.17.1 Check the bazel version using the checker from bazel_skylib, and require at least version 0.17.1 which is the minimum version that does not suffer from the Java API mismatch issue [1]. The implementation is borrowed from the Gerrit project. [1] https://github.com/bazelbuild/bazel/issues/6027 Change-Id: I224250088a1f5072fcaa3ec81228f4d2cb8cb389 Signed-off-by: David Pursehouse --- WORKSPACE | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/WORKSPACE b/WORKSPACE index 02de72021..58f8eff53 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -1,5 +1,18 @@ workspace(name = "jgit") +load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") + +http_archive( + name = "bazel_skylib", + sha256 = "bbccf674aa441c266df9894182d80de104cabd19be98be002f6d478aaa31574d", + strip_prefix = "bazel-skylib-2169ae1c374aab4a09aa90e65efe1a3aad4e279b", + urls = ["https://github.com/bazelbuild/bazel-skylib/archive/2169ae1c374aab4a09aa90e65efe1a3aad4e279b.tar.gz"], +) + +load("@bazel_skylib//:lib.bzl", "versions") + +versions.check(minimum_bazel_version = "0.17.1") + load("//tools:bazlets.bzl", "load_bazlets") load_bazlets(commit = "09a035e98077dce549d5f6a7472d06c4b8f792d2") From 5ae0d152a992ebd83b8569d08bfadb37f80b9e70 Mon Sep 17 00:00:00 2001 From: David Ostrovsky Date: Sat, 8 Jun 2019 17:33:28 +0200 Subject: [PATCH 06/14] Use bazelisk to switch between used bazel version Bazelisk is utility to switch to the right Bazel version, that we used to have with Buck build tool: [1]. Bazelisk will download the right Bazel version only once and will use it in subsequent calls: $ bazelisk build :release 2019/06/06 16:22:15 Downloading \ https://releases.bazel.build/0.26.1/release/bazel-0.26.1-linux-x86_64... Bazelisk is storing the binaries in user's cache directory: [2], e.g. on Linux OS: $ ls -1 ~/.cache/bazelisk/bin bazel-0.26.1-linux-x86_64 * [1] https://github.com/bazelbuild/bazelisk * [2] https://golang.org/pkg/os/#UserCacheDir Change-Id: Ia9180fb75f8cc17a0a0232622cf33a13bfad6b60 Signed-off-by: David Ostrovsky --- .bazelversion | 1 + 1 file changed, 1 insertion(+) create mode 100644 .bazelversion diff --git a/.bazelversion b/.bazelversion new file mode 100644 index 000000000..7cca7711a --- /dev/null +++ b/.bazelversion @@ -0,0 +1 @@ +0.17.1 From 15edb0c3a71a972d4168c49c2654b2ef957cd9d1 Mon Sep 17 00:00:00 2001 From: David Ostrovsky Date: Sat, 8 Jun 2019 17:31:33 +0200 Subject: [PATCH 07/14] Bazel: Bump skylib library version to 0.8.0 Change-Id: I2089899c9f197b2c93b93390fdd55f6fe11e5ce4 Signed-off-by: David Ostrovsky --- WORKSPACE | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/WORKSPACE b/WORKSPACE index 58f8eff53..5c6ec38c3 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -4,9 +4,9 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") http_archive( name = "bazel_skylib", - sha256 = "bbccf674aa441c266df9894182d80de104cabd19be98be002f6d478aaa31574d", - strip_prefix = "bazel-skylib-2169ae1c374aab4a09aa90e65efe1a3aad4e279b", - urls = ["https://github.com/bazelbuild/bazel-skylib/archive/2169ae1c374aab4a09aa90e65efe1a3aad4e279b.tar.gz"], + sha256 = "2ea8a5ed2b448baf4a6855d3ce049c4c452a6470b1efd1504fdb7c1c134d220a", + strip_prefix = "bazel-skylib-0.8.0", + urls = ["https://github.com/bazelbuild/bazel-skylib/archive/0.8.0.tar.gz"], ) load("@bazel_skylib//:lib.bzl", "versions") From cae8d499bc4376a52e6b5f34a012f0b22081d9eb Mon Sep 17 00:00:00 2001 From: David Ostrovsky Date: Thu, 5 Sep 2019 22:07:46 +0200 Subject: [PATCH 08/14] Bazel: Bump minimum supported version to 0.29.0 Change-Id: I069e56deb964624791bb0aa3ae095629adfe3bbb Signed-off-by: David Ostrovsky --- .bazelversion | 2 +- WORKSPACE | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.bazelversion b/.bazelversion index 7cca7711a..ae6dd4e20 100644 --- a/.bazelversion +++ b/.bazelversion @@ -1 +1 @@ -0.17.1 +0.29.0 diff --git a/WORKSPACE b/WORKSPACE index 5c6ec38c3..0d5caa8c9 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -11,7 +11,7 @@ http_archive( load("@bazel_skylib//:lib.bzl", "versions") -versions.check(minimum_bazel_version = "0.17.1") +versions.check(minimum_bazel_version = "0.29.0") load("//tools:bazlets.bzl", "load_bazlets") From 85cea8c583ea08dab8cf8de2daafcb4ba9629ae5 Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Thu, 5 Sep 2019 09:46:59 +0900 Subject: [PATCH 09/14] Bazel: Add fixes for --incompatible_load_java_rules_from_bzl Change-Id: I24746335db132bf20f400cb3db400737596d4542 Signed-off-by: David Pursehouse --- lib/BUILD | 2 ++ org.eclipse.jgit.archive/BUILD | 2 ++ org.eclipse.jgit.http.apache/BUILD | 2 ++ org.eclipse.jgit.http.server/BUILD | 2 ++ org.eclipse.jgit.http.test/BUILD | 1 + org.eclipse.jgit.junit.http/BUILD | 2 ++ org.eclipse.jgit.junit/BUILD | 2 ++ org.eclipse.jgit.lfs.server.test/BUILD | 1 + org.eclipse.jgit.lfs.server/BUILD | 2 ++ org.eclipse.jgit.lfs.test/BUILD | 2 ++ org.eclipse.jgit.lfs/BUILD | 2 ++ org.eclipse.jgit.pgm.test/BUILD | 1 + org.eclipse.jgit.pgm/BUILD | 2 ++ org.eclipse.jgit.test/BUILD | 1 + org.eclipse.jgit.ui/BUILD | 2 ++ org.eclipse.jgit/BUILD | 2 ++ 16 files changed, 28 insertions(+) diff --git a/lib/BUILD b/lib/BUILD index 1b6f1d772..754f64492 100644 --- a/lib/BUILD +++ b/lib/BUILD @@ -1,3 +1,5 @@ +load("@rules_java//java:defs.bzl", "java_library") + java_library( name = "args4j", visibility = [ diff --git a/org.eclipse.jgit.archive/BUILD b/org.eclipse.jgit.archive/BUILD index 8c65fc018..3d7dbd21f 100644 --- a/org.eclipse.jgit.archive/BUILD +++ b/org.eclipse.jgit.archive/BUILD @@ -1,3 +1,5 @@ +load("@rules_java//java:defs.bzl", "java_library") + package(default_visibility = ["//visibility:public"]) java_library( diff --git a/org.eclipse.jgit.http.apache/BUILD b/org.eclipse.jgit.http.apache/BUILD index 5ea118c73..81de40e0f 100644 --- a/org.eclipse.jgit.http.apache/BUILD +++ b/org.eclipse.jgit.http.apache/BUILD @@ -1,3 +1,5 @@ +load("@rules_java//java:defs.bzl", "java_library") + package(default_visibility = ["//visibility:public"]) java_library( diff --git a/org.eclipse.jgit.http.server/BUILD b/org.eclipse.jgit.http.server/BUILD index 9d5673b14..f8aa44db9 100644 --- a/org.eclipse.jgit.http.server/BUILD +++ b/org.eclipse.jgit.http.server/BUILD @@ -1,3 +1,5 @@ +load("@rules_java//java:defs.bzl", "java_library") + package(default_visibility = ["//visibility:public"]) java_library( diff --git a/org.eclipse.jgit.http.test/BUILD b/org.eclipse.jgit.http.test/BUILD index dcffa066d..95ed57578 100644 --- a/org.eclipse.jgit.http.test/BUILD +++ b/org.eclipse.jgit.http.test/BUILD @@ -1,3 +1,4 @@ +load("@rules_java//java:defs.bzl", "java_library") load( "@com_googlesource_gerrit_bazlets//tools:junit.bzl", "junit_tests", diff --git a/org.eclipse.jgit.junit.http/BUILD b/org.eclipse.jgit.junit.http/BUILD index 2a29accd1..8e6a5089c 100644 --- a/org.eclipse.jgit.junit.http/BUILD +++ b/org.eclipse.jgit.junit.http/BUILD @@ -1,3 +1,5 @@ +load("@rules_java//java:defs.bzl", "java_library") + package(default_visibility = ["//visibility:public"]) java_library( diff --git a/org.eclipse.jgit.junit/BUILD b/org.eclipse.jgit.junit/BUILD index 74498fdf6..623c5beb2 100644 --- a/org.eclipse.jgit.junit/BUILD +++ b/org.eclipse.jgit.junit/BUILD @@ -1,3 +1,5 @@ +load("@rules_java//java:defs.bzl", "java_library") + package(default_visibility = ["//visibility:public"]) java_library( diff --git a/org.eclipse.jgit.lfs.server.test/BUILD b/org.eclipse.jgit.lfs.server.test/BUILD index fb0d6918f..9460f6f9d 100644 --- a/org.eclipse.jgit.lfs.server.test/BUILD +++ b/org.eclipse.jgit.lfs.server.test/BUILD @@ -1,3 +1,4 @@ +load("@rules_java//java:defs.bzl", "java_library") load( "@com_googlesource_gerrit_bazlets//tools:junit.bzl", "junit_tests", diff --git a/org.eclipse.jgit.lfs.server/BUILD b/org.eclipse.jgit.lfs.server/BUILD index f3b9005f9..cd1831b83 100644 --- a/org.eclipse.jgit.lfs.server/BUILD +++ b/org.eclipse.jgit.lfs.server/BUILD @@ -1,3 +1,5 @@ +load("@rules_java//java:defs.bzl", "java_library") + package(default_visibility = ["//visibility:public"]) java_library( diff --git a/org.eclipse.jgit.lfs.test/BUILD b/org.eclipse.jgit.lfs.test/BUILD index 213ba5794..504e2df72 100644 --- a/org.eclipse.jgit.lfs.test/BUILD +++ b/org.eclipse.jgit.lfs.test/BUILD @@ -1,3 +1,5 @@ +load("@rules_java//java:defs.bzl", "java_library") + package(default_visibility = ["//visibility:public"]) load( diff --git a/org.eclipse.jgit.lfs/BUILD b/org.eclipse.jgit.lfs/BUILD index cd291dadb..dbb97a157 100644 --- a/org.eclipse.jgit.lfs/BUILD +++ b/org.eclipse.jgit.lfs/BUILD @@ -1,3 +1,5 @@ +load("@rules_java//java:defs.bzl", "java_library") + package(default_visibility = ["//visibility:public"]) java_library( diff --git a/org.eclipse.jgit.pgm.test/BUILD b/org.eclipse.jgit.pgm.test/BUILD index f32fa12de..5ccd45708 100644 --- a/org.eclipse.jgit.pgm.test/BUILD +++ b/org.eclipse.jgit.pgm.test/BUILD @@ -1,3 +1,4 @@ +load("@rules_java//java:defs.bzl", "java_library") load( "@com_googlesource_gerrit_bazlets//tools:junit.bzl", "junit_tests", diff --git a/org.eclipse.jgit.pgm/BUILD b/org.eclipse.jgit.pgm/BUILD index ddc84bea0..00c48d1e0 100644 --- a/org.eclipse.jgit.pgm/BUILD +++ b/org.eclipse.jgit.pgm/BUILD @@ -1,3 +1,5 @@ +load("@rules_java//java:defs.bzl", "java_binary", "java_import", "java_library") + java_library( name = "pgm", srcs = glob(["src/**/*.java"]), diff --git a/org.eclipse.jgit.test/BUILD b/org.eclipse.jgit.test/BUILD index 89bc90f38..da88862bf 100644 --- a/org.eclipse.jgit.test/BUILD +++ b/org.eclipse.jgit.test/BUILD @@ -1,3 +1,4 @@ +load("@rules_java//java:defs.bzl", "java_import", "java_library") load(":tests.bzl", "tests") load( "@com_googlesource_gerrit_bazlets//tools:genrule2.bzl", diff --git a/org.eclipse.jgit.ui/BUILD b/org.eclipse.jgit.ui/BUILD index eec4a384d..bb38992a3 100644 --- a/org.eclipse.jgit.ui/BUILD +++ b/org.eclipse.jgit.ui/BUILD @@ -1,3 +1,5 @@ +load("@rules_java//java:defs.bzl", "java_library") + package(default_visibility = ["//visibility:public"]) java_library( diff --git a/org.eclipse.jgit/BUILD b/org.eclipse.jgit/BUILD index 6ba7796b7..0549b2316 100644 --- a/org.eclipse.jgit/BUILD +++ b/org.eclipse.jgit/BUILD @@ -1,3 +1,5 @@ +load("@rules_java//java:defs.bzl", "java_library") + package(default_visibility = ["//visibility:public"]) INSECURE_CIPHER_FACTORY = [ From 4678710c6862602df1bb45ee1035705a0c6a200b Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Sat, 7 Sep 2019 09:32:19 +0900 Subject: [PATCH 10/14] Format lib/BUILD with buildifier Change-Id: I4f0ad64371b160b67797f49b9fde521e5dea9396 Signed-off-by: David Pursehouse --- lib/BUILD | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/BUILD b/lib/BUILD index 754f64492..4e3eaf7e9 100644 --- a/lib/BUILD +++ b/lib/BUILD @@ -134,13 +134,13 @@ java_library( testonly = 1, visibility = ["//visibility:public"], exports = [ - "@bytebuddy//jar", "@bytebuddy-agent//jar", + "@bytebuddy//jar", "@hamcrest-core//jar", "@hamcrest-library//jar", "@junit//jar", "@mockito-core//jar", - "@objenesis//jar" + "@objenesis//jar", ], ) From e626c55936a6e5a969bb720c26db9e4434c46edc Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Sat, 7 Sep 2019 15:28:32 +0900 Subject: [PATCH 11/14] Bazel: Fix warning about deprecated lib.bzl Change-Id: Ifdbaaf9ec020a621070eea351f791a819d554012 Signed-off-by: David Pursehouse --- WORKSPACE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WORKSPACE b/WORKSPACE index 0d5caa8c9..de7e53081 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -9,7 +9,7 @@ http_archive( urls = ["https://github.com/bazelbuild/bazel-skylib/archive/0.8.0.tar.gz"], ) -load("@bazel_skylib//:lib.bzl", "versions") +load("@bazel_skylib//lib:versions.bzl", "versions") versions.check(minimum_bazel_version = "0.29.0") From 40ba12f3ac89bc166d62ac42338c2cb560c23b58 Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Sun, 8 Sep 2019 10:08:39 +0900 Subject: [PATCH 12/14] Bazel: Add fixes for --incompatible_load_java_rules_from_bzl Change-Id: Ifc47ae22209fdb7a5d7bede4da002640ed26a43a Signed-off-by: David Pursehouse --- org.eclipse.jgit.junit.ssh/BUILD | 2 ++ org.eclipse.jgit.ssh.apache/BUILD | 2 ++ tools/BUILD | 1 + 3 files changed, 5 insertions(+) diff --git a/org.eclipse.jgit.junit.ssh/BUILD b/org.eclipse.jgit.junit.ssh/BUILD index e9a04c717..a8b96b7fa 100644 --- a/org.eclipse.jgit.junit.ssh/BUILD +++ b/org.eclipse.jgit.junit.ssh/BUILD @@ -1,3 +1,5 @@ +load("@rules_java//java:defs.bzl", "java_library") + package(default_visibility = ["//visibility:public"]) java_library( diff --git a/org.eclipse.jgit.ssh.apache/BUILD b/org.eclipse.jgit.ssh.apache/BUILD index a1a6c8e24..42388ad9f 100644 --- a/org.eclipse.jgit.ssh.apache/BUILD +++ b/org.eclipse.jgit.ssh.apache/BUILD @@ -1,3 +1,5 @@ +load("@rules_java//java:defs.bzl", "java_library") + package(default_visibility = ["//visibility:public"]) SRCS = glob(["src/**/*.java"]) diff --git a/tools/BUILD b/tools/BUILD index 9025e0a6d..f1b1536a0 100644 --- a/tools/BUILD +++ b/tools/BUILD @@ -1,3 +1,4 @@ +load("@rules_java//java:defs.bzl", "java_package_configuration") load( "@bazel_tools//tools/jdk:default_java_toolchain.bzl", "JDK9_JVM_OPTS", From 1fd09a19a2ac7d8953ea0abed81d906aef197bab Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Sun, 8 Sep 2019 10:09:07 +0900 Subject: [PATCH 13/14] Bazel: Format BUILD files with buildifier Change-Id: I8b4abf67fba592be42b2b5b029fa0e972d746dcb Signed-off-by: David Pursehouse --- lib/BUILD | 2 +- org.eclipse.jgit.test/BUILD | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/BUILD b/lib/BUILD index a4b449185..7403ce27f 100644 --- a/lib/BUILD +++ b/lib/BUILD @@ -179,8 +179,8 @@ java_library( testonly = 1, visibility = ["//visibility:public"], exports = [ - "@bytebuddy//jar", "@bytebuddy-agent//jar", + "@bytebuddy//jar", "@mockito//jar", "@objenesis//jar", ], diff --git a/org.eclipse.jgit.test/BUILD b/org.eclipse.jgit.test/BUILD index 708dd7d19..1f33fa3d7 100644 --- a/org.eclipse.jgit.test/BUILD +++ b/org.eclipse.jgit.test/BUILD @@ -50,8 +50,8 @@ java_library( deps = [ "//lib:jsch", "//lib:junit", - "//lib:slf4j-simple", "//lib:mockito", + "//lib:slf4j-simple", "//org.eclipse.jgit:jgit", "//org.eclipse.jgit.junit:junit", ], From d4752e2900ac4c12fafa16ba91cbaa62467db7c2 Mon Sep 17 00:00:00 2001 From: Matthias Sohn Date: Sat, 7 Sep 2019 11:38:58 +0200 Subject: [PATCH 14/14] [error prone] Suppress NonAtomicVolatileUpdate in SimpleLruCache We don't need to update time atomically since it's only used to order cache entries in LRU order. Change-Id: I756fa6d90b180c519bf52925f134763744f2c1f1 Signed-off-by: Matthias Sohn --- .../src/org/eclipse/jgit/util/SimpleLruCache.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/SimpleLruCache.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/SimpleLruCache.java index 709d9ee73..3fcfd21fc 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/util/SimpleLruCache.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/SimpleLruCache.java @@ -162,7 +162,7 @@ public class SimpleLruCache { public V get(Object key) { Entry entry = map.get(key); if (entry != null) { - entry.lastAccessed = ++time; + entry.lastAccessed = tick(); return entry.value; } return null; @@ -186,13 +186,18 @@ public class SimpleLruCache { * if the specified key or value is null */ public V put(@NonNull K key, @NonNull V value) { - map.put(key, new Entry<>(key, value, ++time)); + map.put(key, new Entry<>(key, value, tick())); if (map.size() > maximumSize) { purge(); } return value; } + @SuppressWarnings("NonAtomicVolatileUpdate") + private long tick() { + return ++time; + } + /** * Returns the current size of this cache *