You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by mi...@apache.org on 2021/10/17 17:00:44 UTC
[maven-scm] 01/01: [SCM-969] Remove all deprecated providers
This is an automated email from the ASF dual-hosted git repository.
michaelo pushed a commit to branch SCM-969
in repository https://gitbox.apache.org/repos/asf/maven-scm.git
commit 46d333c938fbdb5398432ceedb0009b506e7caeb
Author: Michael Osipov <mi...@apache.org>
AuthorDate: Thu Sep 16 22:41:33 2021 +0200
[SCM-969] Remove all deprecated providers
This closes #128
---
maven-scm-client/pom.xml | 44 -
.../maven-scm-provider-accurev/pom.xml | 97 -
.../apache/maven/scm/provider/accurev/AccuRev.java | 288 -
.../scm/provider/accurev/AccuRevCapability.java | 55 -
.../scm/provider/accurev/AccuRevException.java | 51 -
.../maven/scm/provider/accurev/AccuRevInfo.java | 134 -
.../scm/provider/accurev/AccuRevScmProvider.java | 419 -
.../accurev/AccuRevScmProviderRepository.java | 369 -
.../maven/scm/provider/accurev/AccuRevStat.java | 59 -
.../maven/scm/provider/accurev/AccuRevVersion.java | 79 -
.../scm/provider/accurev/CategorisedElements.java | 44 -
.../maven/scm/provider/accurev/FileDifference.java | 187 -
.../apache/maven/scm/provider/accurev/Stream.java | 192 -
.../maven/scm/provider/accurev/Transaction.java | 198 -
.../maven/scm/provider/accurev/WorkSpace.java | 53 -
.../provider/accurev/cli/AccuRevCommandLine.java | 754 --
.../scm/provider/accurev/cli/AnnotateConsumer.java | 78 -
.../provider/accurev/cli/AuthTokenConsumer.java | 55 -
.../accurev/cli/ClientVersionConsumer.java | 54 -
.../accurev/cli/CommandOutputConsumer.java | 66 -
.../scm/provider/accurev/cli/DiffConsumer.java | 79 -
.../scm/provider/accurev/cli/ErrorConsumer.java | 70 -
.../scm/provider/accurev/cli/FileConsumer.java | 83 -
.../scm/provider/accurev/cli/HistoryConsumer.java | 116 -
.../scm/provider/accurev/cli/InfoConsumer.java | 70 -
.../provider/accurev/cli/StatBackingConsumer.java | 71 -
.../scm/provider/accurev/cli/StatConsumer.java | 57 -
.../scm/provider/accurev/cli/StreamsConsumer.java | 61 -
.../provider/accurev/cli/WorkSpaceConsumer.java | 55 -
.../provider/accurev/cli/XppStreamConsumer.java | 288 -
.../accurev/command/AbstractAccuRevCommand.java | 88 -
.../AbstractAccuRevExtractSourceCommand.java | 92 -
.../accurev/command/add/AccuRevAddCommand.java | 89 -
.../accurev/command/blame/AccuRevBlameCommand.java | 80 -
.../command/changelog/AccuRevChangeLogCommand.java | 420 -
.../command/checkin/AccuRevCheckInCommand.java | 117 -
.../command/checkout/AccuRevCheckOutCommand.java | 179 -
.../command/export/AccuRevExportCommand.java | 143 -
.../accurev/command/login/AccuRevLoginCommand.java | 92 -
.../command/remove/AccuRevRemoveCommand.java | 85 -
.../command/status/AccuRevStatusCommand.java | 155 -
.../accurev/command/tag/AccuRevTagCommand.java | 92 -
.../command/update/AccuRevUpdateCommand.java | 150 -
.../command/update/AccuRevUpdateScmResult.java | 77 -
.../accurev/util/QuotedPropertyParser.java | 152 -
.../scm/provider/accurev/util/WorkspaceUtils.java | 74 -
.../src/site/apt/index.apt | 258 -
.../src/site/apt/tcktests.apt | 80 -
.../src/site/apt/todos.apt | 63 -
.../maven-scm-provider-accurev/src/site/site.xml | 38 -
.../org/apache/maven/scm/ChangeFileMatcher.java | 69 -
.../org/apache/maven/scm/ChangeSetMatcher.java | 76 -
.../apache/maven/scm/CollectionSizeMatcher.java | 59 -
.../java/org/apache/maven/scm/ScmFileMatcher.java | 66 -
.../provider/accurev/AccuRevCapabilityTest.java | 48 -
.../AccuRevScmProviderRepositoryMatcher.java | 97 -
.../accurev/AccuRevScmProviderRepositoryTest.java | 63 -
.../provider/accurev/AccurevScmProviderTest.java | 145 -
.../scm/provider/accurev/TransactionTest.java | 35 -
.../maven/scm/provider/accurev/VersionMatcher.java | 64 -
.../accurev/cli/AccuRevCommandLineTest.java | 599 --
.../scm/provider/accurev/cli/AccuRevJUnitUtil.java | 71 -
.../scm/provider/accurev/cli/AccuRevStatTest.java | 104 -
.../provider/accurev/cli/AnnotateConsumerTest.java | 65 -
.../accurev/cli/AuthTokenConsumerTest.java | 52 -
.../accurev/cli/ClientVersionConsumerTest.java | 39 -
.../scm/provider/accurev/cli/DiffConsumerTest.java | 51 -
.../scm/provider/accurev/cli/FileConsumerTest.java | 93 -
.../provider/accurev/cli/HistoryConsumerTest.java | 64 -
.../scm/provider/accurev/cli/InfoConsumerTest.java | 92 -
.../accurev/cli/StatBackingConsumerTest.java | 61 -
.../scm/provider/accurev/cli/StatConsumerTest.java | 68 -
.../provider/accurev/cli/StreamsConsumerTest.java | 61 -
.../accurev/cli/WorkSpaceConsumerTest.java | 91 -
.../accurev/cli/XppStreamConsumerTest.java | 40 -
.../command/AbstractAccuRevCommandTest.java | 101 -
.../provider/accurev/command/AccuRevTckUtil.java | 290 -
.../accurev/command/add/AccuRevAddCommandTest.java | 85 -
.../command/blame/AccuRevBlameCommandTckTest.java | 131 -
.../command/blame/AccuRevBlameCommandTest.java | 66 -
.../changelog/AccuRevChangeLogCommandTckTest.java | 233 -
.../changelog/AccuRevChangeLogCommandTest.java | 344 -
.../checkin/AccuRevCheckInCommandTckTest.java | 123 -
.../command/checkin/AccuRevCheckInCommandTest.java | 148 -
.../checkout/AccuRevCheckOutCommandTest.java | 229 -
.../checkout/AccuRevCheckoutCommandTckTest.java | 119 -
.../command/export/AccuRevExportCommandTest.java | 247 -
.../command/login/AccuRevLoginCommandTest.java | 131 -
.../command/remove/AccuRevRemoveCommandTest.java | 83 -
.../status/AccuRevStatusCommandTckTest.java | 115 -
.../command/status/AccuRevStatusCommandTest.java | 136 -
.../command/tag/AccuRevTagCommandTckTest.java | 148 -
.../accurev/command/tag/AccuRevTagCommandTest.java | 110 -
.../update/AccuRevUpdateCommandTckTest.java | 109 -
.../command/update/AccurevUpdateCommandTest.java | 152 -
.../accurev/util/QuotedPropertyParserTest.java | 48 -
.../test/resources/PlexusTestContainerConfig.xml | 19 -
.../src/test/resources/accurev.txt | 3 -
.../src/test/resources/accurev/annotatelog.txt | 0
.../src/test/resources/annotate.txt | 12 -
.../src/test/resources/diff-vvt.txt | 4 -
.../src/test/resources/diff-vvt.xml | 65 -
.../src/test/resources/elementHistory.xml | 240 -
.../src/test/resources/info.inworkspace.txt | 13 -
.../src/test/resources/info.notloggedin.txt | 9 -
.../src/test/resources/info.outsideworkspace.txt | 9 -
.../src/test/resources/showrefs.xml | 17 -
.../src/test/resources/showstreams.xml | 48 -
.../src/test/resources/showworkspaces.xml | 17 -
.../src/test/resources/stat.backed.txt | 8 -
.../src/test/resources/stat.backed.xml | 17 -
.../src/test/resources/stat.ignored.txt | 0
.../src/test/resources/stat.ignored.xml | 4 -
.../src/test/resources/stat.noelement.xml | 11 -
.../src/test/resources/stat.noworkspace.txt | 1 -
.../src/test/resources/stat.noworkspace.xml | 0
.../src/test/resources/streamHistory.xml | 108 -
.../src/test/resources/workspaceHistory.xml | 122 -
.../maven-scm-provider-bazaar/Readme.txt | 27 -
.../maven-scm-provider-bazaar/pom.xml | 53 -
.../maven/scm/provider/bazaar/BazaarConfig.java | 280 -
.../scm/provider/bazaar/BazaarScmProvider.java | 248 -
.../maven/scm/provider/bazaar/BazaarUtils.java | 240 -
.../provider/bazaar/command/BazaarConstants.java | 136 -
.../provider/bazaar/command/BazaarConsumer.java | 180 -
.../bazaar/command/add/BazaarAddCommand.java | 58 -
.../bazaar/command/add/BazaarAddConsumer.java | 78 -
.../bazaar/command/blame/BazaarBlameCommand.java | 54 -
.../bazaar/command/blame/BazaarBlameConsumer.java | 70 -
.../command/changelog/BazaarChangeLogCommand.java | 116 -
.../command/changelog/BazaarChangeLogConsumer.java | 206 -
.../command/checkin/BazaarCheckInCommand.java | 107 -
.../command/checkout/BazaarCheckOutCommand.java | 95 -
.../command/checkout/BazaarCheckOutConsumer.java | 64 -
.../bazaar/command/diff/BazaarDiffCommand.java | 70 -
.../bazaar/command/diff/BazaarDiffConsumer.java | 194 -
.../bazaar/command/remove/BazaarRemoveCommand.java | 56 -
.../command/remove/BazaarRemoveConsumer.java | 79 -
.../bazaar/command/status/BazaarStatusCommand.java | 60 -
.../command/status/BazaarStatusConsumer.java | 98 -
.../bazaar/command/tag/BazaarLsConsumer.java | 81 -
.../bazaar/command/tag/BazaarTagCommand.java | 98 -
.../bazaar/command/update/BazaarUpdateCommand.java | 117 -
.../repository/BazaarScmProviderRepository.java | 306 -
.../src/site/apt/index.apt | 28 -
.../maven-scm-provider-bazaar/src/site/site.xml | 37 -
.../maven/scm/provider/bazaar/BazaarRepoUtils.java | 126 -
.../command/blame/BazaarBlameCommandTckTest.java | 59 -
.../changelog/BazaarChangeLogCommandTckTest.java | 39 -
.../changelog/BazaarChangeLogConsumerTest.java | 64 -
.../checkin/BazaarCheckInCommandTckTest.java | 42 -
.../checkout/BazaarCheckOutCommandTckTest.java | 42 -
.../command/diff/BazaarDiffCommandTckTest.java | 39 -
.../command/status/BazaarStatusCommandTckTest.java | 42 -
.../command/tag/BazaarTagCommandTckTest.java | 38 -
.../command/update/BazaarUpdateCommandTckTest.java | 42 -
.../BazaarScmProviderRepositoryTest.java | 166 -
.../test/resources/bazaar/changeLogWithMerge.txt | 52 -
.../maven-scm-provider-clearcase/pom.xml | 73 -
.../provider/clearcase/ClearCaseScmProvider.java | 181 -
.../clearcase/command/ClearCaseCommand.java | 28 -
.../clearcase/command/add/ClearCaseAddCommand.java | 148 -
.../command/add/ClearCaseAddConsumer.java | 77 -
.../command/blame/ClearCaseBlameCommand.java | 104 -
.../command/blame/ClearCaseBlameConsumer.java | 76 -
.../changelog/ClearCaseChangeLogCommand.java | 158 -
.../changelog/ClearCaseChangeLogConsumer.java | 284 -
.../command/checkin/ClearCaseCheckInCommand.java | 128 -
.../command/checkin/ClearCaseCheckInConsumer.java | 77 -
.../command/checkout/ClearCaseCheckOutCommand.java | 445 --
.../checkout/ClearCaseCheckOutConsumer.java | 73 -
.../command/edit/ClearCaseEditCommand.java | 153 -
.../command/edit/ClearCaseEditConsumer.java | 77 -
.../command/remove/ClearCaseRemoveCommand.java | 152 -
.../command/remove/ClearCaseRemoveConsumer.java | 78 -
.../command/status/ClearCaseStatusCommand.java | 103 -
.../command/status/ClearCaseStatusConsumer.java | 77 -
.../clearcase/command/tag/ClearCaseTagCommand.java | 160 -
.../command/tag/ClearCaseTagConsumer.java | 85 -
.../command/unedit/ClearCaseUnEditCommand.java | 108 -
.../command/unedit/ClearCaseUnEditConsumer.java | 81 -
.../command/update/ClearCaseUpdateCommand.java | 116 -
.../command/update/ClearCaseUpdateConsumer.java | 81 -
.../repository/ClearCaseScmProviderRepository.java | 395 -
.../scm/provider/clearcase/util/ClearCaseUtil.java | 106 -
.../src/main/mdo/clearcase-settings.mdo | 69 -
.../clearcase/command/clearcase.properties | 18 -
.../clearcase/command/clearcase_en.properties | 23 -
.../clearcase/command/clearcase_ja.properties | 18 -
.../src/site/apt/index.apt | 28 -
.../maven-scm-provider-clearcase/src/site/site.xml | 37 -
.../command/add/ClearCaseAddCommandTest.java | 41 -
.../command/add/ClearCaseAddConsumerTest.java | 65 -
.../command/blame/ClearCaseBlameConsumerTest.java | 69 -
.../changelog/ClearCaseChangeLogCommandTest.java | 110 -
.../checkin/ClearCaseCheckInCommandTest.java | 44 -
.../checkin/ClearCaseCheckInConsumerTest.java | 65 -
.../checkout/ClearCaseCheckOutCommandTest.java | 141 -
.../command/edit/ClearCaseEditCommandTest.java | 43 -
.../command/edit/ClearCaseEditConsumerTest.java | 65 -
.../command/remove/ClearCaseRemoveCommandTest.java | 42 -
.../remove/ClearCaseRemoveConsumerTest.java | 65 -
.../command/status/ClearCaseStatusCommandTest.java | 41 -
.../status/ClearCaseStatusConsumerTest.java | 71 -
.../command/tag/ClearCaseTagCommandTest.java | 41 -
.../command/tag/ClearCaseTagConsumerTest.java | 65 -
.../command/unedit/ClearCaseUnEditCommandTest.java | 42 -
.../unedit/ClearCaseUnEditConsumerTest.java | 65 -
.../command/update/ClearCaseUpdateCommandTest.java | 39 -
.../update/ClearCaseUpdateConsumerTest.java | 104 -
.../ClearCaseScmProviderRepositoryTest.java | 223 -
.../src/test/resources/clearcase/add/add.txt | 1 -
.../test/resources/clearcase/blame/clearcase.log | 12 -
.../clearcase/changelog/clearcase-settings.xml | 3 -
.../resources/clearcase/changelog/clearcaselog.txt | 18 -
.../test/resources/clearcase/checkin/checkin.txt | 1 -
.../src/test/resources/clearcase/edit/edit.txt | 1 -
.../src/test/resources/clearcase/remove/remove.txt | 1 -
.../src/test/resources/clearcase/status/status.txt | 1 -
.../src/test/resources/clearcase/tag/tag.txt | 1 -
.../src/test/resources/clearcase/unedit/unedit.txt | 2 -
.../src/test/resources/clearcase/update/update.txt | 51 -
.../test/resources/clearcase/update/update_en.txt | 51 -
.../test/resources/clearcase/update/update_ja.txt | 52 -
.../maven-scm-provider-integrity/pom.xml | 124 -
.../maven/scm/provider/integrity/APISession.java | 284 -
.../scm/provider/integrity/ExceptionHandler.java | 127 -
.../provider/integrity/IntegrityScmProvider.java | 412 -
.../maven/scm/provider/integrity/Member.java | 260 -
.../maven/scm/provider/integrity/Project.java | 391 -
.../maven/scm/provider/integrity/Sandbox.java | 836 --
.../integrity/command/add/IntegrityAddCommand.java | 70 -
.../command/blame/IntegrityBlameCommand.java | 147 -
.../command/blame/IntegrityBlameConsumer.java | 96 -
.../command/branch/IntegrityBranchCommand.java | 88 -
.../changelog/IntegrityChangeLogCommand.java | 92 -
.../command/checkin/IntegrityCheckInCommand.java | 68 -
.../command/checkout/IntegrityCheckOutCommand.java | 120 -
.../command/diff/IntegrityDiffCommand.java | 102 -
.../command/diff/IntegrityDiffConsumer.java | 52 -
.../command/edit/IntegrityEditCommand.java | 73 -
.../command/export/IntegrityExportCommand.java | 119 -
.../command/fileinfo/IntegrityFileInfoCommand.java | 109 -
.../fileinfo/IntegrityFileInfoConsumer.java | 54 -
.../command/list/IntegrityListCommand.java | 86 -
.../command/lock/IntegrityLockCommand.java | 94 -
.../command/login/IntegrityLoginCommand.java | 87 -
.../command/mkdir/IntegrityMkdirCommand.java | 100 -
.../command/remove/IntegrityRemoveCommand.java | 72 -
.../command/status/IntegrityStatusCommand.java | 115 -
.../integrity/command/tag/IntegrityTagCommand.java | 132 -
.../command/unedit/IntegrityUnEditCommand.java | 72 -
.../command/unlock/IntegrityUnlockCommand.java | 108 -
.../command/update/IntegrityUpdateCommand.java | 117 -
.../repository/IntegrityScmProviderRepository.java | 132 -
.../src/site/apt/index.apt | 28 -
.../maven-scm-provider-integrity/src/site/site.xml | 37 -
.../integrity/command/IntegrityCommandTest.java | 96 -
.../command/add/IntegrityAddCommandTest.java | 61 -
.../command/branch/IntegrityBranchCommandTest.java | 60 -
.../changelog/IntegrityChangeLogCommandTest.java | 64 -
.../checkin/IntegrityCheckInCommandTest.java | 74 -
.../checkout/IntegrityCheckOutCommandTest.java | 54 -
.../command/export/IntegrityExportCommandTest.java | 57 -
.../command/list/IntegrityListCommandTest.java | 62 -
.../command/lock/IntegrityLockCommandTest.java | 58 -
.../command/status/IntegrityStatusCommandTest.java | 55 -
.../command/tag/IntegrityTagCommandTest.java | 59 -
.../command/unedit/IntegrityUnEditCommandTest.java | 55 -
.../command/update/IntegrityUpdateCommandTest.java | 64 -
.../IntegrityScmProviderRepositoryTest.java | 184 -
.../maven-scm-provider-jazz/pom.xml | 168 -
.../maven/scm/provider/jazz/JazzScmProvider.java | 449 --
.../scm/provider/jazz/command/JazzConstants.java | 284 -
.../scm/provider/jazz/command/JazzScmCommand.java | 280 -
.../provider/jazz/command/add/JazzAddCommand.java | 203 -
.../provider/jazz/command/add/JazzAddConsumer.java | 122 -
.../jazz/command/blame/JazzBlameCommand.java | 92 -
.../jazz/command/blame/JazzBlameConsumer.java | 96 -
.../jazz/command/branch/JazzBranchCommand.java | 64 -
.../command/changelog/JazzChangeLogCommand.java | 148 -
.../command/changelog/JazzHistoryConsumer.java | 87 -
.../changelog/JazzListChangesetConsumer.java | 541 --
.../jazz/command/checkin/JazzCheckInCommand.java | 282 -
.../jazz/command/checkin/JazzCheckInConsumer.java | 122 -
.../jazz/command/checkout/JazzCheckOutCommand.java | 121 -
.../command/checkout/JazzCheckOutConsumer.java | 81 -
.../consumer/AbstractRepositoryConsumer.java | 92 -
.../jazz/command/consumer/DebugLoggerConsumer.java | 61 -
.../jazz/command/consumer/ErrorConsumer.java | 52 -
.../jazz/command/diff/JazzDiffCommand.java | 165 -
.../jazz/command/edit/JazzEditCommand.java | 110 -
.../jazz/command/list/JazzListCommand.java | 94 -
.../jazz/command/list/JazzListConsumer.java | 68 -
.../jazz/command/status/JazzStatusCommand.java | 98 -
.../jazz/command/status/JazzStatusConsumer.java | 553 --
.../provider/jazz/command/tag/JazzTagCommand.java | 245 -
.../jazz/command/unedit/JazzUnEditCommand.java | 112 -
.../jazz/command/update/JazzUpdateCommand.java | 126 -
.../jazz/command/update/JazzUpdateConsumer.java | 153 -
.../jazz/repository/JazzScmProviderRepository.java | 299 -
.../maven-scm-provider-jazz/src/site/apt/index.apt | 273 -
.../src/site/apt/releases.apt | 189 -
.../src/site/apt/tcktests.apt | 113 -
.../src/site/resources/images/FlowDiagram.png | Bin 17647 -> 0 bytes
.../images/FlowDiagramWithMultipleStreams.png | Bin 27302 -> 0 bytes
.../src/site/resources/images/WorkspaceOnly.png | Bin 106926 -> 0 bytes
.../site/resources/images/WorkspaceWithStream.png | Bin 127663 -> 0 bytes
.../maven-scm-provider-jazz/src/site/site.xml | 39 -
.../maven/scm/provider/jazz/JazzScmTestCase.java | 81 -
.../provider/jazz/command/JazzScmCommandTest.java | 106 -
.../scm/provider/jazz/command/JazzTckUtil.java | 248 -
.../jazz/command/add/JazzAddCommandTest.java | 92 -
.../command/blame/JazzBlameCommandTckTest.java | 113 -
.../jazz/command/blame/JazzBlameCommandTest.java | 77 -
.../jazz/command/branch/JazzBranchCommandTest.java | 36 -
.../changelog/JazzChangeLogCommandTckTest.java | 84 -
.../changelog/JazzChangeLogCommandTest.java | 405 -
.../command/checkin/JazzCheckInCommandTckTest.java | 98 -
.../command/checkin/JazzCheckInCommandTest.java | 127 -
.../checkout/JazzCheckOutCommandTckTest.java | 84 -
.../command/checkout/JazzCheckOutCommandTest.java | 92 -
.../command/consumer/DebugLoggerConsumerTest.java | 49 -
.../jazz/command/consumer/ErrorConsumerTest.java | 45 -
.../jazz/command/diff/JazzDiffCommandTckTest.java | 84 -
.../jazz/command/diff/JazzDiffCommandTest.java | 50 -
.../jazz/command/edit/JazzEditCommandTest.java | 64 -
.../jazz/command/list/JazzListCommandTest.java | 99 -
.../command/status/JazzStatusCommandTckTest.java | 95 -
.../jazz/command/status/JazzStatusCommandTest.java | 527 --
.../command/status/JazzStatusConsumerTest.java | 60 -
.../jazz/command/tag/JazzTagCommandTckTest.java | 84 -
.../jazz/command/tag/JazzTagCommandTest.java | 88 -
.../jazz/command/unedit/JazzUnEditCommandTest.java | 64 -
.../command/update/JazzUpdateCommandTckTest.java | 96 -
.../jazz/command/update/JazzUpdateCommandTest.java | 49 -
.../repository/JazzScmProviderRepositoryTest.java | 299 -
.../maven-scm-provider-perforce/pom.xml | 69 -
.../scm/provider/perforce/PerforceScmProvider.java | 553 --
.../perforce/command/AbstractPerforceConsumer.java | 45 -
.../provider/perforce/command/PerforceCommand.java | 28 -
.../perforce/command/PerforceInfoCommand.java | 166 -
.../perforce/command/PerforceVerbMapper.java | 68 -
.../perforce/command/PerforceWhereCommand.java | 166 -
.../perforce/command/add/PerforceAddCommand.java | 91 -
.../perforce/command/add/PerforceAddConsumer.java | 72 -
.../command/blame/PerforceBlameCommand.java | 140 -
.../command/blame/PerforceBlameConsumer.java | 66 -
.../command/blame/PerforceFilelogConsumer.java | 77 -
.../changelog/PerforceChangeLogCommand.java | 220 -
.../changelog/PerforceChangeLogConsumer.java | 264 -
.../command/changelog/PerforceChangesConsumer.java | 71 -
.../changelog/PerforceDescribeConsumer.java | 277 -
.../command/checkin/PerforceCheckInCommand.java | 181 -
.../command/checkin/PerforceCheckInConsumer.java | 160 -
.../command/checkout/PerforceCheckOutCommand.java | 351 -
.../command/checkout/PerforceCheckOutConsumer.java | 138 -
.../perforce/command/diff/PerforceDiffCommand.java | 103 -
.../command/diff/PerforceDiffConsumer.java | 58 -
.../perforce/command/edit/PerforceEditCommand.java | 134 -
.../command/edit/PerforceEditConsumer.java | 100 -
.../command/login/PerforceLoginCommand.java | 105 -
.../command/login/PerforceLoginConsumer.java | 68 -
.../command/remove/PerforceRemoveCommand.java | 94 -
.../command/remove/PerforceRemoveConsumer.java | 86 -
.../command/status/PerforceStatusCommand.java | 140 -
.../command/status/PerforceStatusConsumer.java | 84 -
.../perforce/command/tag/PerforceTagCommand.java | 259 -
.../perforce/command/tag/PerforceTagConsumer.java | 119 -
.../command/unedit/PerforceUnEditCommand.java | 100 -
.../command/unedit/PerforceUnEditConsumer.java | 79 -
.../command/update/PerforceHaveConsumer.java | 68 -
.../command/update/PerforceUpdateCommand.java | 140 -
.../repository/PerforceScmProviderRepository.java | 69 -
.../src/site/apt/index.apt | 70 -
.../maven-scm-provider-perforce/src/site/site.xml | 37 -
.../provider/perforce/PerforceScmProviderTest.java | 189 -
.../perforce/command/PerforceInfoCommandTest.java | 60 -
.../command/add/PerforceAddCommandTest.java | 81 -
.../command/add/PerforceAddConsumerTest.java | 51 -
.../command/blame/PerforceBlameConsumerTest.java | 55 -
.../command/blame/PerforceFilelogConsumerTest.java | 51 -
.../changelog/PerforceChangeLogCommandTest.java | 133 -
.../changelog/PerforceChangeLogConsumerTest.java | 52 -
.../changelog/PerforceDescribeConsumerTest.java | 62 -
.../checkin/PerforceCheckInCommandTest.java | 106 -
.../checkin/PerforceCheckInConsumerTest.java | 72 -
.../checkout/PerforceCheckOutCommandTest.java | 88 -
.../checkout/PerforceCheckOutConsumerTest.java | 84 -
.../command/diff/PerforceDiffCommandTest.java | 69 -
.../command/diff/PerforceDiffConsumerTest.java | 48 -
.../command/edit/PerforceEditCommandTest.java | 98 -
.../command/edit/PerforceEditConsumerTest.java | 51 -
.../command/login/PerforceLoginCommandTest.java | 85 -
.../command/login/PerforceLoginConsumerTest.java | 58 -
.../command/remove/PerforceRemoveCommandTest.java | 80 -
.../command/remove/PerforceRemoveConsumerTest.java | 51 -
.../command/status/PerforceStatusCommandTest.java | 62 -
.../command/status/PerforceStatusConsumerTest.java | 58 -
.../command/tag/PerforceTagCommandTest.java | 68 -
.../command/tag/PerforceTagConsumerTest.java | 65 -
.../command/unedit/PerforceUnEditCommandTest.java | 66 -
.../command/unedit/PerforceUnEditConsumerTest.java | 65 -
.../src/test/resources/perforce/addlog.txt | 3 -
.../src/test/resources/perforce/annotatelog.txt | 2 -
.../src/test/resources/perforce/checkin_bad.txt | 8 -
.../src/test/resources/perforce/checkin_good.txt | 5 -
.../src/test/resources/perforce/checkin_gooder.txt | 5 -
.../src/test/resources/perforce/checkout_bad.txt | 1 -
.../src/test/resources/perforce/checkout_good.txt | 4 -
.../src/test/resources/perforce/difflog.txt | 323 -
.../src/test/resources/perforce/editlog.txt | 4 -
.../src/test/resources/perforce/filelog.txt | 6 -
.../src/test/resources/perforce/login_bad.txt | 2 -
.../src/test/resources/perforce/login_good.txt | 2 -
.../resources/perforce/perforcedescribelog.txt | 69 -
.../src/test/resources/perforce/perforcelog.txt | 32 -
.../src/test/resources/perforce/removelog.txt | 3 -
.../src/test/resources/perforce/status_good.txt | 4 -
.../src/test/resources/perforce/tag_bad.txt | 2 -
.../src/test/resources/perforce/tag_good.txt | 3 -
.../src/test/resources/perforce/unedit_bad.txt | 2 -
.../src/test/resources/perforce/unedit_good.txt | 2 -
.../maven-scm-provider-starteam/pom.xml | 73 -
.../scm/provider/starteam/StarteamScmProvider.java | 382 -
.../provider/starteam/command/StarteamCommand.java | 31 -
.../starteam/command/StarteamCommandLineUtils.java | 277 -
.../starteam/command/add/StarteamAddCommand.java | 97 -
.../starteam/command/add/StarteamAddConsumer.java | 143 -
.../changelog/StarteamChangeLogCommand.java | 122 -
.../changelog/StarteamChangeLogConsumer.java | 447 --
.../command/checkin/StarteamCheckInCommand.java | 165 -
.../command/checkin/StarteamCheckInConsumer.java | 156 -
.../command/checkout/StarteamCheckOutCommand.java | 104 -
.../command/checkout/StarteamCheckOutConsumer.java | 156 -
.../starteam/command/diff/StarteamDiffCommand.java | 121 -
.../command/diff/StarteamDiffConsumer.java | 217 -
.../starteam/command/edit/StarteamEditCommand.java | 107 -
.../command/edit/StarteamEditConsumer.java | 128 -
.../command/remove/StarteamRemoveCommand.java | 102 -
.../command/remove/StarteamRemoveConsumer.java | 143 -
.../command/status/StarteamStatusCommand.java | 85 -
.../command/status/StarteamStatusConsumer.java | 183 -
.../starteam/command/tag/StarteamTagCommand.java | 115 -
.../starteam/command/tag/StarteamTagConsumer.java | 58 -
.../command/unedit/StarteamUnEditCommand.java | 108 -
.../command/unedit/StarteamUnEditConsumer.java | 130 -
.../command/update/StarteamUpdateCommand.java | 191 -
.../repository/StarteamScmProviderRepository.java | 81 -
.../scm/provider/starteam/util/StarteamUtil.java | 94 -
.../src/main/mdo/starteam-settings.mdo | 58 -
.../src/site/apt/index.apt | 28 -
.../maven-scm-provider-starteam/src/site/site.xml | 37 -
.../provider/starteam/StarteamScmProviderTest.java | 105 -
.../command/add/StarteamAddCommandTest.java | 107 -
.../command/add/StarteamAddConsumerTest.java | 74 -
.../changelog/StarteamChangeLogCommandTest.java | 69 -
.../changelog/StarteamChangeLogConsumerTest.java | 125 -
.../checkin/StarteamCheckInCommandTest.java | 145 -
.../checkin/StarteamCheckInConsumerTest.java | 70 -
.../checkout/StarteamCheckOutCommandTest.java | 70 -
.../checkout/StarteamCheckOutConsumerTest.java | 88 -
.../command/diff/StarteamDiffCommandTest.java | 93 -
.../command/diff/StarteamDiffConsumerTest.java | 59 -
.../command/edit/StarteamEditCommandTest.java | 88 -
.../command/edit/StarteamEditConsumerTest.java | 60 -
.../command/remove/StarteamRemoveCommandTest.java | 86 -
.../command/remove/StarteamRemoveConsumerTest.java | 69 -
.../command/status/StarteamStatusCommandTest.java | 70 -
.../command/status/StarteamStatusConsumerTest.java | 58 -
.../command/tag/StarteamTagCommandTest.java | 62 -
.../command/unedit/StarteamUnEditCommandTest.java | 87 -
.../command/unedit/StarteamUnEditConsumerTest.java | 56 -
.../command/update/StarteamUpdateCommandTest.java | 109 -
.../StarteamScmProviderRepositoryTest.java | 122 -
.../starteam/changelog/starteamlog_en.txt | 45 -
.../starteam/changelog/starteamlog_fr.txt | 45 -
.../src/test/resources/starteam/diff/diff.txt | 59 -
.../src/test/resources/starteam/status/status.txt | 110 -
.../maven-scm-provider-synergy/pom.xml | 53 -
.../scm/provider/synergy/SynergyScmProvider.java | 185 -
.../provider/synergy/command/SynergyCommand.java | 29 -
.../synergy/command/add/SynergyAddCommand.java | 119 -
.../command/changelog/SynergyChangeLogCommand.java | 99 -
.../command/checkin/SynergyCheckInCommand.java | 84 -
.../command/checkout/SynergyCheckOutCommand.java | 155 -
.../synergy/command/edit/SynergyEditCommand.java | 118 -
.../command/remove/SynergyRemoveCommand.java | 101 -
.../command/status/SynergyStatusCommand.java | 82 -
.../synergy/command/tag/SynergyTagCommand.java | 98 -
.../command/unedit/SynergyUnEditCommand.java | 110 -
.../command/update/SynergyUpdateCommand.java | 181 -
.../consumer/SynergyCreateTaskConsumer.java | 67 -
.../consumer/SynergyGetCompletedTasksConsumer.java | 162 -
.../consumer/SynergyGetTaskObjectsConsumer.java | 85 -
.../consumer/SynergyGetWorkingFilesConsumer.java | 64 -
.../consumer/SynergyGetWorkingProjectConsumer.java | 64 -
.../consumer/SynergyShowDefaultTaskConsumer.java | 69 -
.../synergy/consumer/SynergyWorkareaConsumer.java | 84 -
.../repository/SynergyScmProviderRepository.java | 157 -
.../scm/provider/synergy/util/SynergyCCM.java | 892 ---
.../scm/provider/synergy/util/SynergyRole.java | 48 -
.../scm/provider/synergy/util/SynergyTask.java | 109 -
.../provider/synergy/util/SynergyTaskManager.java | 183 -
.../scm/provider/synergy/util/SynergyUtil.java | 901 ---
.../src/site/apt/index.apt | 28 -
.../maven-scm-provider-synergy/src/site/site.xml | 37 -
.../consumer/SynergyCreateTaskConsumerTest.java | 57 -
.../SynergyGetCompletedTasksConsumerTest.java | 131 -
.../SynergyGetTaskObjectsConsumerTest.java | 64 -
.../SynergyGetWorkingProjectConsumerTest.java | 77 -
.../SynergyShowDefaultTaskConsumerTest.java | 89 -
.../scm/provider/synergy/util/SynergyCCMTest.java | 452 --
.../src/test/resources/synergy/add/add.txt | 0
.../test/resources/synergy/changelog/changelog.txt | 0
.../src/test/resources/synergy/checkin/checkin.txt | 19 -
.../test/resources/synergy/consumer/createTask.txt | 3 -
.../synergy/consumer/getCompletedTasks.txt | 1 -
.../consumer/getCompletedTasksFrenchDate.txt | 2 -
.../resources/synergy/consumer/getTaskObjects.txt | 1 -
.../synergy/consumer/getWorkingProject.txt | 1 -
.../synergy/consumer/getWorkingProjectEmpty.txt | 0
.../synergy/consumer/showDefaultTaskNotSet.txt | 1 -
.../synergy/consumer/showDefaultTaskSet.txt | 1 -
.../src/test/resources/synergy/edit/edit.txt | 0
.../src/test/resources/synergy/remove/remove.txt | 0
.../src/test/resources/synergy/status/status.txt | 0
.../src/test/resources/synergy/tag/tag.txt | 0
.../src/test/resources/synergy/unedit/unedit.txt | 0
.../src/test/resources/synergy/update/update.txt | 16 -
maven-scm-providers/maven-scm-provider-tfs/pom.xml | 86 -
.../maven/scm/provider/tfs/TfsScmProvider.java | 272 -
.../scm/provider/tfs/TfsScmProviderRepository.java | 86 -
.../scm/provider/tfs/command/TfsAddCommand.java | 63 -
.../scm/provider/tfs/command/TfsBranchCommand.java | 74 -
.../provider/tfs/command/TfsChangeLogCommand.java | 89 -
.../provider/tfs/command/TfsCheckInCommand.java | 88 -
.../provider/tfs/command/TfsCheckOutCommand.java | 155 -
.../maven/scm/provider/tfs/command/TfsCommand.java | 139 -
.../scm/provider/tfs/command/TfsEditCommand.java | 63 -
.../scm/provider/tfs/command/TfsListCommand.java | 68 -
.../scm/provider/tfs/command/TfsStatusCommand.java | 81 -
.../scm/provider/tfs/command/TfsTagCommand.java | 96 -
.../scm/provider/tfs/command/TfsUnEditCommand.java | 60 -
.../scm/provider/tfs/command/TfsUpdateCommand.java | 84 -
.../tfs/command/blame/TfsBlameCommand.java | 77 -
.../tfs/command/blame/TfsBlameConsumer.java | 72 -
.../tfs/command/consumer/ChangedFileConsumer.java | 118 -
.../tfs/command/consumer/ErrorStreamConsumer.java | 44 -
.../tfs/command/consumer/FileListConsumer.java | 84 -
.../command/consumer/ServerFileListConsumer.java | 42 -
.../tfs/command/consumer/TfsChangeLogConsumer.java | 209 -
.../maven-scm-provider-tfs/src/site/apt/index.apt | 28 -
.../maven-scm-provider-tfs/src/site/site.xml | 37 -
.../provider/tfs/command/TfsAddCommandTest.java | 38 -
.../provider/tfs/command/TfsBranchCommandTest.java | 39 -
.../tfs/command/TfsChangeLogCommandTest.java | 110 -
.../tfs/command/TfsCheckInCommandTest.java | 41 -
.../tfs/command/TfsCheckOutCommandTest.java | 125 -
.../scm/provider/tfs/command/TfsCommandTest.java | 60 -
.../provider/tfs/command/TfsEditCommandTest.java | 65 -
.../provider/tfs/command/TfsListCommandTest.java | 84 -
.../provider/tfs/command/TfsStatusCommandTest.java | 137 -
.../provider/tfs/command/TfsTagCommandTest.java | 42 -
.../provider/tfs/command/TfsUnEditCommandTest.java | 38 -
.../provider/tfs/command/TfsUpdateCommandTest.java | 54 -
.../tfs/command/blame/TfsBlameConsumerTest.java | 57 -
.../src/test/resources/tfs/annotatelog.txt | 3 -
maven-scm-providers/maven-scm-provider-vss/pom.xml | 90 -
.../maven/scm/provider/vss/VssScmProvider.java | 231 -
.../provider/vss/commands/VssCommandLineUtils.java | 202 -
.../scm/provider/vss/commands/VssConstants.java | 199 -
.../provider/vss/commands/VssParameterContext.java | 516 --
.../provider/vss/commands/add/VssAddCommand.java | 152 -
.../provider/vss/commands/add/VssAddConsumer.java | 96 -
.../commands/changelog/VssChangeLogConsumer.java | 315 -
.../vss/commands/changelog/VssHistoryCommand.java | 130 -
.../vss/commands/checkin/VssCheckInCommand.java | 250 -
.../vss/commands/checkin/VssCheckInConsumer.java | 218 -
.../vss/commands/checkout/VssCheckOutCommand.java | 140 -
.../vss/commands/checkout/VssCheckOutConsumer.java | 217 -
.../provider/vss/commands/edit/VssEditCommand.java | 254 -
.../vss/commands/edit/VssEditConsumer.java | 216 -
.../vss/commands/status/VssStatusCommand.java | 139 -
.../vss/commands/status/VssStatusConsumer.java | 292 -
.../provider/vss/commands/tag/VssTagCommand.java | 145 -
.../provider/vss/commands/tag/VssTagConsumer.java | 217 -
.../vss/commands/update/VssUpdateCommand.java | 159 -
.../vss/commands/update/VssUpdateConsumer.java | 233 -
.../vss/repository/VssScmProviderRepository.java | 71 -
.../src/main/mdo/vss-settings.mdo | 50 -
.../maven-scm-provider-vss/src/site/apt/index.apt | 28 -
.../maven-scm-provider-vss/src/site/site.xml | 37 -
.../maven/scm/provider/vss/VssScmProviderTest.java | 75 -
.../vss/commands/VssCommandLineUtilsTest.java | 169 -
.../vss/commands/add/VssAddCommandTest.java | 75 -
.../commands/changelog/VssHistoryCommandTest.java | 71 -
.../commands/checkout/VssCheckOutCommandTest.java | 61 -
.../vss/commands/edit/VssEditCommandTest.java | 147 -
.../vss/commands/status/VssStatusCommandTest.java | 60 -
.../vss/commands/status/VssStatusConsumerTest.java | 83 -
.../vss/commands/update/VssUpdateCommandTest.java | 61 -
.../src/test/resources/test.txt | 136 -
.../maven-scm-provider-cvs-commons/pom.xml | 68 -
.../provider/cvslib/AbstractCvsScmProvider.java | 829 --
.../scm/provider/cvslib/command/CvsCommand.java | 31 -
.../provider/cvslib/command/CvsCommandUtils.java | 158 -
.../cvslib/command/add/AbstractCvsAddCommand.java | 92 -
.../command/blame/AbstractCvsBlameCommand.java | 62 -
.../cvslib/command/blame/CvsBlameConsumer.java | 82 -
.../command/branch/AbstractCvsBranchCommand.java | 69 -
.../cvslib/command/branch/CvsBranchConsumer.java | 36 -
.../changelog/AbstractCvsChangeLogCommand.java | 150 -
.../command/changelog/CvsChangeLogConsumer.java | 373 -
.../command/checkin/AbstractCvsCheckInCommand.java | 112 -
.../cvslib/command/checkin/CvsCheckInConsumer.java | 95 -
.../checkout/AbstractCvsCheckOutCommand.java | 120 -
.../command/checkout/CvsCheckOutConsumer.java | 100 -
.../command/diff/AbstractCvsDiffCommand.java | 86 -
.../cvslib/command/diff/CvsDiffConsumer.java | 199 -
.../command/export/AbstractCvsExportCommand.java | 78 -
.../command/list/AbstractCvsListCommand.java | 128 -
.../cvslib/command/list/CvsListConsumer.java | 94 -
.../cvslib/command/login/CvsLoginCommand.java | 79 -
.../scm/provider/cvslib/command/login/CvsPass.java | 218 -
.../command/mkdir/AbstractCvsMkdirCommand.java | 80 -
.../command/remove/AbstractCvsRemoveCommand.java | 85 -
.../command/status/AbstractCvsStatusCommand.java | 61 -
.../cvslib/command/status/CvsStatusConsumer.java | 135 -
.../cvslib/command/tag/AbstractCvsTagCommand.java | 94 -
.../cvslib/command/tag/CvsTagConsumer.java | 90 -
.../command/update/AbstractCvsUpdateCommand.java | 84 -
.../cvslib/command/update/CvsUpdateConsumer.java | 109 -
.../repository/CvsScmProviderRepository.java | 203 -
.../maven/scm/provider/cvslib/util/CvsUtil.java | 96 -
.../src/main/mdo/cvs-settings.mdo | 109 -
.../src/site/site.xml | 37 -
.../scm/provider/cvslib/CvsScmProviderTest.java | 91 -
.../changelog/CvsChangeLogConsumerTest.java | 78 -
.../repository/CvsScmProviderRepositoryTest.java | 345 -
.../cvslib/repository/TestCvsScmProvider.java | 106 -
.../test/resources/META-INF/plexus/components.xml | 28 -
.../src/test/resources/checkoutdir/CVS/Entries | 1 -
.../test/resources/checkoutdir/CVS/Entries.Extra | 9 -
.../resources/checkoutdir/CVS/Entries.Extra.Old | 9 -
.../src/test/resources/checkoutdir/CVS/Entries.Old | 9 -
.../src/test/resources/checkoutdir/CVS/Repository | 1 -
.../src/test/resources/checkoutdir/CVS/Root | 1 -
.../src/test/resources/checkoutdir/CVS/Template | 0
.../src/test/resources/checkoutdir/pom.xml | 111 -
.../src/test/resources/cvslib/changelog/cvslog.txt | 51 -
.../maven-scm-provider-cvsexe/pom.xml | 79 -
.../provider/cvslib/cvsexe/CvsExeScmProvider.java | 265 -
.../cvsexe/command/add/CvsExeAddCommand.java | 66 -
.../cvsexe/command/blame/CvsExeBlameCommand.java | 61 -
.../cvsexe/command/branch/CvsExeBranchCommand.java | 65 -
.../command/changelog/CvsExeChangeLogCommand.java | 72 -
.../command/checkin/CvsExeCheckInCommand.java | 78 -
.../command/checkout/CvsExeCheckOutCommand.java | 64 -
.../cvsexe/command/diff/CvsExeDiffCommand.java | 65 -
.../cvsexe/command/export/CvsExeExportCommand.java | 63 -
.../cvsexe/command/list/CvsExeListCommand.java | 64 -
.../cvsexe/command/mkdir/CvsExeMkdirCommand.java | 37 -
.../cvsexe/command/remove/CvsExeRemoveCommand.java | 67 -
.../cvsexe/command/status/CvsExeStatusCommand.java | 64 -
.../cvsexe/command/tag/CvsExeTagCommand.java | 65 -
.../cvsexe/command/update/CvsExeUpdateCommand.java | 74 -
.../src/site/apt/index.apt | 28 -
.../maven-scm-provider-cvsexe/src/site/site.xml | 37 -
.../cvslib/cvsexe/CvsExeScmProviderTest.java | 46 -
.../command/branch/CvsExeBranchCommandTckTest.java | 31 -
.../changelog/CvsExeChangeLogCommandTest.java | 31 -
.../checkin/CvsExeCheckInCommandTckTest.java | 31 -
.../checkout/CvsExeCheckOutCommandTckTest.java | 31 -
.../checkout/CvsExeCheckoutCommandTest.java | 32 -
.../command/diff/CvsExeDiffCommandTckTest.java | 31 -
.../command/mkdir/CvsExeMkdirCommandTckTest.java | 33 -
.../command/status/CvsExeStatusCommandTckTest.java | 31 -
.../command/tag/CvsExeTagCommandTckTest.java | 31 -
.../command/update/CvsExeUpdateCommandTckTest.java | 31 -
.../command/update/CvsExeUpdateCommandTest.java | 31 -
.../src/test/repository/CVSROOT/.cvsignore | 2 -
.../src/test/repository/CVSROOT/checkoutlist | 13 -
.../src/test/repository/CVSROOT/checkoutlist,v | 36 -
.../src/test/repository/CVSROOT/commitinfo | 24 -
.../src/test/repository/CVSROOT/commitinfo,v | 47 -
.../src/test/repository/CVSROOT/config | 37 -
.../src/test/repository/CVSROOT/config,v | 60 -
.../src/test/repository/CVSROOT/cvswrappers | 19 -
.../src/test/repository/CVSROOT/cvswrappers,v | 42 -
.../src/test/repository/CVSROOT/loginfo | 31 -
.../src/test/repository/CVSROOT/loginfo,v | 54 -
.../src/test/repository/CVSROOT/modules | 26 -
.../src/test/repository/CVSROOT/modules,v | 49 -
.../src/test/repository/CVSROOT/notify | 17 -
.../src/test/repository/CVSROOT/notify,v | 40 -
.../src/test/repository/CVSROOT/rcsinfo | 13 -
.../src/test/repository/CVSROOT/rcsinfo,v | 36 -
.../src/test/repository/CVSROOT/taginfo | 40 -
.../src/test/repository/CVSROOT/taginfo,v | 63 -
.../src/test/repository/CVSROOT/val-tags | 1 -
.../src/test/repository/CVSROOT/val-tags.db | Bin 3082 -> 0 bytes
.../src/test/repository/CVSROOT/verifymsg | 29 -
.../src/test/repository/CVSROOT/verifymsg,v | 52 -
.../src/java/org/apache/maven/MavenUtils.java,v | 8356 --------------------
.../test/repository/test-repo/checkout/Foo.java,v | 26 -
.../repository/test-repo/checkout/Readme.txt,v | 24 -
.../src/java/org/apache/maven/MavenUtils.java,v | 8356 --------------------
.../test/repository/test-repo/update/Foo.java,v | 34 -
.../test/repository/test-repo/update/Readme.txt,v | 24 -
.../src/test/tck-repository/CVSROOT/.cvsignore | 2 -
.../src/test/tck-repository/CVSROOT/checkoutlist | 13 -
.../src/test/tck-repository/CVSROOT/checkoutlist,v | 36 -
.../src/test/tck-repository/CVSROOT/commitinfo | 15 -
.../src/test/tck-repository/CVSROOT/commitinfo,v | 38 -
.../src/test/tck-repository/CVSROOT/config | 21 -
.../src/test/tck-repository/CVSROOT/config,v | 44 -
.../src/test/tck-repository/CVSROOT/cvswrappers | 19 -
.../src/test/tck-repository/CVSROOT/cvswrappers,v | 42 -
.../src/test/tck-repository/CVSROOT/editinfo | 21 -
.../src/test/tck-repository/CVSROOT/editinfo,v | 44 -
.../src/test/tck-repository/CVSROOT/history | 0
.../src/test/tck-repository/CVSROOT/loginfo | 26 -
.../src/test/tck-repository/CVSROOT/loginfo,v | 49 -
.../src/test/tck-repository/CVSROOT/modules | 26 -
.../src/test/tck-repository/CVSROOT/modules,v | 49 -
.../src/test/tck-repository/CVSROOT/modules.db | Bin 3072 -> 0 bytes
.../src/test/tck-repository/CVSROOT/notify | 12 -
.../src/test/tck-repository/CVSROOT/notify,v | 35 -
.../src/test/tck-repository/CVSROOT/rcsinfo | 13 -
.../src/test/tck-repository/CVSROOT/rcsinfo,v | 36 -
.../src/test/tck-repository/CVSROOT/taginfo | 20 -
.../src/test/tck-repository/CVSROOT/taginfo,v | 43 -
.../src/test/tck-repository/CVSROOT/val-tags.db | 0
.../src/test/tck-repository/CVSROOT/verifymsg | 21 -
.../src/test/tck-repository/CVSROOT/verifymsg,v | 44 -
.../test/tck-repository/test-repo/module/pom.xml,v | 38 -
.../tck-repository/test-repo/module/readme.txt,v | 38 -
.../module/src/main/java/Application.java,v | 38 -
.../test-repo/module/src/test/java/Test.java,v | 38 -
.../maven-scm-provider-cvsjava/pom.xml | 78 -
.../cvslib/cvsjava/CvsJavaScmProvider.java | 137 -
.../cvsjava/command/add/CvsJavaAddCommand.java | 67 -
.../cvsjava/command/blame/CvsJavaBlameCommand.java | 75 -
.../command/branch/CvsJavaBranchCommand.java | 80 -
.../command/changelog/CvsJavaChangeLogCommand.java | 92 -
.../command/checkin/CvsJavaCheckInCommand.java | 97 -
.../command/checkout/CvsJavaCheckOutCommand.java | 79 -
.../cvsjava/command/diff/CvsJavaDiffCommand.java | 85 -
.../command/export/CvsJavaExportCommand.java | 79 -
.../cvsjava/command/list/CvsJavaListCommand.java | 79 -
.../cvsjava/command/login/CvsJavaLoginCommand.java | 38 -
.../cvsjava/command/mkdir/CvsJavaMkdirCommand.java | 37 -
.../command/remove/CvsJavaRemoveCommand.java | 81 -
.../command/status/CvsJavaStatusCommand.java | 79 -
.../cvsjava/command/tag/CvsJavaTagCommand.java | 79 -
.../command/update/CvsJavaUpdateCommand.java | 90 -
.../cvslib/cvsjava/util/CvsConnection.java | 512 --
.../cvslib/cvsjava/util/CvsLogListener.java | 86 -
.../cvslib/cvsjava/util/ExtConnection.java | 312 -
.../src/site/apt/index.apt | 28 -
.../maven-scm-provider-cvsjava/src/site/site.xml | 37 -
.../branch/CvsJavaBranchCommandTckTest.java | 31 -
.../changelog/CvsJavaChangeLogCommandTest.java | 31 -
.../checkin/CvsJavaCheckInCommandTckTest.java | 31 -
.../checkout/CvsJavaCheckOutCommandTckTest.java | 31 -
.../checkout/CvsJavaCheckOutCommandTest.java | 31 -
.../command/mkdir/CvsJavaMkdirCommandTckTest.java | 33 -
.../status/CvsJavaStatusCommandTckTest.java | 31 -
.../command/tag/CvsJavaTagCommandTckTest.java | 31 -
.../update/CvsJavaUpdateCommandTckTest.java | 31 -
.../command/update/CvsJavaUpdateCommandTest.java | 31 -
.../src/test/repository/CVSROOT/.cvsignore | 2 -
.../src/test/repository/CVSROOT/checkoutlist | 13 -
.../src/test/repository/CVSROOT/checkoutlist,v | 36 -
.../src/test/repository/CVSROOT/commitinfo | 24 -
.../src/test/repository/CVSROOT/commitinfo,v | 47 -
.../src/test/repository/CVSROOT/config | 31 -
.../src/test/repository/CVSROOT/config,v | 60 -
.../src/test/repository/CVSROOT/cvswrappers | 19 -
.../src/test/repository/CVSROOT/cvswrappers,v | 42 -
.../src/test/repository/CVSROOT/loginfo | 31 -
.../src/test/repository/CVSROOT/loginfo,v | 54 -
.../src/test/repository/CVSROOT/modules | 26 -
.../src/test/repository/CVSROOT/modules,v | 49 -
.../src/test/repository/CVSROOT/notify | 17 -
.../src/test/repository/CVSROOT/notify,v | 40 -
.../src/test/repository/CVSROOT/rcsinfo | 13 -
.../src/test/repository/CVSROOT/rcsinfo,v | 36 -
.../src/test/repository/CVSROOT/taginfo | 40 -
.../src/test/repository/CVSROOT/taginfo,v | 63 -
.../src/test/repository/CVSROOT/val-tags | 1 -
.../src/test/repository/CVSROOT/val-tags.db | Bin 3082 -> 0 bytes
.../src/test/repository/CVSROOT/verifymsg | 29 -
.../src/test/repository/CVSROOT/verifymsg,v | 52 -
.../src/java/org/apache/maven/MavenUtils.java,v | 8356 --------------------
.../test/repository/test-repo/checkout/Foo.java,v | 26 -
.../repository/test-repo/checkout/Readme.txt,v | 24 -
.../src/java/org/apache/maven/MavenUtils.java,v | 8356 --------------------
.../test/repository/test-repo/update/Foo.java,v | 34 -
.../test/repository/test-repo/update/Readme.txt,v | 24 -
.../src/test/tck-repository/CVSROOT/.cvsignore | 2 -
.../src/test/tck-repository/CVSROOT/checkoutlist | 13 -
.../src/test/tck-repository/CVSROOT/checkoutlist,v | 36 -
.../src/test/tck-repository/CVSROOT/commitinfo | 15 -
.../src/test/tck-repository/CVSROOT/commitinfo,v | 38 -
.../src/test/tck-repository/CVSROOT/config | 21 -
.../src/test/tck-repository/CVSROOT/config,v | 44 -
.../src/test/tck-repository/CVSROOT/cvswrappers | 19 -
.../src/test/tck-repository/CVSROOT/cvswrappers,v | 42 -
.../src/test/tck-repository/CVSROOT/editinfo | 21 -
.../src/test/tck-repository/CVSROOT/editinfo,v | 44 -
.../src/test/tck-repository/CVSROOT/history | 0
.../src/test/tck-repository/CVSROOT/loginfo | 26 -
.../src/test/tck-repository/CVSROOT/loginfo,v | 49 -
.../src/test/tck-repository/CVSROOT/modules | 26 -
.../src/test/tck-repository/CVSROOT/modules,v | 49 -
.../src/test/tck-repository/CVSROOT/modules.db | Bin 3072 -> 0 bytes
.../src/test/tck-repository/CVSROOT/notify | 12 -
.../src/test/tck-repository/CVSROOT/notify,v | 35 -
.../src/test/tck-repository/CVSROOT/rcsinfo | 13 -
.../src/test/tck-repository/CVSROOT/rcsinfo,v | 36 -
.../src/test/tck-repository/CVSROOT/taginfo | 20 -
.../src/test/tck-repository/CVSROOT/taginfo,v | 43 -
.../src/test/tck-repository/CVSROOT/val-tags.db | 0
.../src/test/tck-repository/CVSROOT/verifymsg | 21 -
.../src/test/tck-repository/CVSROOT/verifymsg,v | 44 -
.../test/tck-repository/test-repo/module/pom.xml,v | 38 -
.../tck-repository/test-repo/module/readme.txt,v | 38 -
.../module/src/main/java/Application.java,v | 38 -
.../test-repo/module/src/test/java/Test.java,v | 38 -
.../maven-scm-provider-cvstest/pom.xml | 42 -
.../scm/provider/cvslib/AbstractCvsScmTest.java | 55 -
.../maven/scm/provider/cvslib/CvsScmTestUtils.java | 80 -
.../command/branch/CvsBranchCommandTckTest.java | 52 -
.../command/changelog/CvsChangeLogCommandTest.java | 104 -
.../command/checkin/CvsCheckInCommandTckTest.java | 51 -
.../checkout/CvsCheckOutCommandTckTest.java | 50 -
.../command/checkout/CvsCheckoutCommandTest.java | 135 -
.../cvslib/command/diff/CvsDiffCommandTckTest.java | 50 -
.../command/mkdir/CvsMkdirCommandTckTest.java | 63 -
.../command/status/CvsStatusCommandTckTest.java | 50 -
.../cvslib/command/tag/CvsTagCommandTckTest.java | 52 -
.../command/update/CvsUpdateCommandTckTest.java | 50 -
.../command/update/CvsUpdateCommandTest.java | 196 -
.../main/resources/repository/CVSROOT/.cvsignore | 2 -
.../main/resources/repository/CVSROOT/checkoutlist | 13 -
.../resources/repository/CVSROOT/checkoutlist,v | 36 -
.../main/resources/repository/CVSROOT/commitinfo | 24 -
.../main/resources/repository/CVSROOT/commitinfo,v | 47 -
.../src/main/resources/repository/CVSROOT/config | 37 -
.../src/main/resources/repository/CVSROOT/config,v | 60 -
.../main/resources/repository/CVSROOT/cvswrappers | 19 -
.../resources/repository/CVSROOT/cvswrappers,v | 42 -
.../src/main/resources/repository/CVSROOT/loginfo | 31 -
.../main/resources/repository/CVSROOT/loginfo,v | 54 -
.../src/main/resources/repository/CVSROOT/modules | 26 -
.../main/resources/repository/CVSROOT/modules,v | 49 -
.../src/main/resources/repository/CVSROOT/notify | 17 -
.../src/main/resources/repository/CVSROOT/notify,v | 40 -
.../src/main/resources/repository/CVSROOT/rcsinfo | 13 -
.../main/resources/repository/CVSROOT/rcsinfo,v | 36 -
.../src/main/resources/repository/CVSROOT/taginfo | 40 -
.../main/resources/repository/CVSROOT/taginfo,v | 63 -
.../src/main/resources/repository/CVSROOT/val-tags | 1 -
.../main/resources/repository/CVSROOT/val-tags.db | Bin 3082 -> 0 bytes
.../main/resources/repository/CVSROOT/verifymsg | 29 -
.../main/resources/repository/CVSROOT/verifymsg,v | 52 -
.../src/java/org/apache/maven/MavenUtils.java,v | 8356 --------------------
.../repository/test-repo/checkout/Foo.java,v | 26 -
.../repository/test-repo/checkout/Readme.txt,v | 24 -
.../src/java/org/apache/maven/MavenUtils.java,v | 8356 --------------------
.../repository/test-repo/update/Foo.java,v | 34 -
.../repository/test-repo/update/Readme.txt,v | 24 -
.../resources/tck-repository/CVSROOT/.cvsignore | 2 -
.../resources/tck-repository/CVSROOT/checkoutlist | 13 -
.../tck-repository/CVSROOT/checkoutlist,v | 36 -
.../resources/tck-repository/CVSROOT/commitinfo | 15 -
.../resources/tck-repository/CVSROOT/commitinfo,v | 38 -
.../main/resources/tck-repository/CVSROOT/config | 21 -
.../main/resources/tck-repository/CVSROOT/config,v | 44 -
.../resources/tck-repository/CVSROOT/cvswrappers | 19 -
.../resources/tck-repository/CVSROOT/cvswrappers,v | 42 -
.../main/resources/tck-repository/CVSROOT/editinfo | 21 -
.../resources/tck-repository/CVSROOT/editinfo,v | 44 -
.../main/resources/tck-repository/CVSROOT/history | 0
.../main/resources/tck-repository/CVSROOT/loginfo | 26 -
.../resources/tck-repository/CVSROOT/loginfo,v | 49 -
.../main/resources/tck-repository/CVSROOT/modules | 26 -
.../resources/tck-repository/CVSROOT/modules,v | 49 -
.../resources/tck-repository/CVSROOT/modules.db | Bin 3072 -> 0 bytes
.../main/resources/tck-repository/CVSROOT/notify | 12 -
.../main/resources/tck-repository/CVSROOT/notify,v | 35 -
.../main/resources/tck-repository/CVSROOT/rcsinfo | 13 -
.../resources/tck-repository/CVSROOT/rcsinfo,v | 36 -
.../main/resources/tck-repository/CVSROOT/taginfo | 20 -
.../resources/tck-repository/CVSROOT/taginfo,v | 43 -
.../resources/tck-repository/CVSROOT/val-tags.db | 0
.../resources/tck-repository/CVSROOT/verifymsg | 21 -
.../resources/tck-repository/CVSROOT/verifymsg,v | 44 -
.../tck-repository/test-repo/module/pom.xml,v | 38 -
.../tck-repository/test-repo/module/readme.txt,v | 38 -
.../module/src/main/java/Application.java,v | 38 -
.../test-repo/module/src/test/java/Test.java,v | 38 -
.../maven-scm-provider-cvstest/src/site/site.xml | 37 -
.../maven-scm-providers-cvs/pom.xml | 43 -
.../maven-scm-providers-cvs/src/site/site.xml | 39 -
maven-scm-providers/pom.xml | 11 -
pom.xml | 114 -
src/site/apt/accurev.apt | 41 -
src/site/apt/bazaar.apt | 62 -
src/site/apt/clearcase.apt | 228 -
src/site/apt/cvs.apt | 159 -
src/site/apt/guide/usage.apt | 2 +-
src/site/apt/jazz.apt | 197 -
src/site/apt/perforce.apt | 65 -
src/site/apt/scms-overview.apt | 56 +-
src/site/apt/starteam.apt | 73 -
src/site/apt/synergy.apt | 189 -
src/site/apt/tfs.apt | 56 -
src/site/apt/vss.apt | 77 -
src/site/site.xml | 10 -
src/site/xdoc/matrix.xml | 746 +-
923 files changed, 16 insertions(+), 133275 deletions(-)
diff --git a/maven-scm-client/pom.xml b/maven-scm-client/pom.xml
index 74cbcc5..f9bf3dc 100644
--- a/maven-scm-client/pom.xml
+++ b/maven-scm-client/pom.xml
@@ -42,26 +42,6 @@
<!-- providers declaration -->
<dependency>
<groupId>org.apache.maven.scm</groupId>
- <artifactId>maven-scm-provider-accurev</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.maven.scm</groupId>
- <artifactId>maven-scm-provider-bazaar</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.maven.scm</groupId>
- <artifactId>maven-scm-provider-clearcase</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.maven.scm</groupId>
- <artifactId>maven-scm-provider-cvsexe</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.maven.scm</groupId>
- <artifactId>maven-scm-provider-cvsjava</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.maven.scm</groupId>
<artifactId>maven-scm-provider-gitexe</artifactId>
</dependency>
<dependency>
@@ -70,36 +50,12 @@
</dependency>
<dependency>
<groupId>org.apache.maven.scm</groupId>
- <artifactId>maven-scm-provider-jazz</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.maven.scm</groupId>
<artifactId>maven-scm-provider-local</artifactId>
</dependency>
<dependency>
<groupId>org.apache.maven.scm</groupId>
- <artifactId>maven-scm-provider-perforce</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.maven.scm</groupId>
- <artifactId>maven-scm-provider-starteam</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.maven.scm</groupId>
<artifactId>maven-scm-provider-svnexe</artifactId>
</dependency>
- <dependency>
- <groupId>org.apache.maven.scm</groupId>
- <artifactId>maven-scm-provider-synergy</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.maven.scm</groupId>
- <artifactId>maven-scm-provider-vss</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.maven.scm</groupId>
- <artifactId>maven-scm-provider-tfs</artifactId>
- </dependency>
<!-- end providers declaration -->
</dependencies>
diff --git a/maven-scm-providers/maven-scm-provider-accurev/pom.xml b/maven-scm-providers/maven-scm-provider-accurev/pom.xml
deleted file mode 100644
index 28fadc5..0000000
--- a/maven-scm-providers/maven-scm-provider-accurev/pom.xml
+++ /dev/null
@@ -1,97 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one
- ~ or more contributor license agreements. See the NOTICE file
- ~ distributed with this work for additional information
- ~ regarding copyright ownership. The ASF licenses this file
- ~ to you under the Apache License, Version 2.0 (the
- ~ "License"); you may not use this file except in compliance
- ~ with the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing,
- ~ software distributed under the License is distributed on an
- ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- ~ KIND, either express or implied. See the License for the
- ~ specific language governing permissions and limitations
- ~ under the License.
- -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.maven.scm</groupId>
- <artifactId>maven-scm-providers</artifactId>
- <version>1.12.1-SNAPSHOT</version>
- </parent>
-
- <artifactId>maven-scm-provider-accurev</artifactId>
- <name>Maven SCM AccuRev Provider</name>
- <description>SCM Provider implementation for AccuRev (http://www.accurev.com/).</description>
-
- <dependencies>
- <!-- Test -->
- <dependency>
- <groupId>org.apache.maven.scm</groupId>
- <artifactId>maven-scm-test</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-core</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.hamcrest</groupId>
- <artifactId>hamcrest-library</artifactId>
- <version>1.3</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-component-metadata</artifactId>
- <executions>
- <execution>
- <id>create-component-descriptor</id>
- <phase>generate-resources</phase>
- <goals>
- <goal>generate-metadata</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <systemProperties>
- <property>
- <name>tckBaseDir</name>
- <value>${tckBaseDir}</value>
- </property>
- <property>
- <name>tckUrlPrefix</name>
- <value>${tckUrlPrefix}</value>
- </property>
- <property>
- <name>tckAllowImpliedLogin</name>
- <value>${tckAllowImpliedLogin}</value>
- </property>
- </systemProperties>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/AccuRev.java b/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/AccuRev.java
deleted file mode 100644
index 54ef6ec..0000000
--- a/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/AccuRev.java
+++ /dev/null
@@ -1,288 +0,0 @@
-package org.apache.maven.scm.provider.accurev;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.io.File;
-import java.text.DateFormat;
-import java.util.Collection;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.maven.scm.command.blame.BlameLine;
-import org.apache.maven.scm.util.ThreadSafeDateFormat;
-
-/**
- * Represents the AccuRev CLI interface
- *
- * @author ggardner
- */
-public interface AccuRev
-{
-
- String DEFAULT_ACCUREV_EXECUTABLE = "accurev";
-
- int DEFAULT_PORT = 5050;
-
- String ACCUREV_TIME_FORMAT_STRING = "yyyy/MM/dd HH:mm:ss";
-
- DateFormat ACCUREV_TIME_SPEC = new ThreadSafeDateFormat( ACCUREV_TIME_FORMAT_STRING );
-
- String DEFAULT_REMOVE_MESSAGE = "removed (maven-scm)";
-
- String DEFAULT_ADD_MESSAGE = "initial version (maven-scm)";
-
- String DEFAULT_PROMOTE_MESSAGE = "promote (maven-scm)";
-
- /**
- * Reset command process, clear command output accumulators
- */
- void reset();
-
- /**
- * Populate external to a workspace a (stream) and transactionId/time, to a specific location.
- *
- * <p>
- * You must check {@link AccuRevCapability#POPULATE_TO_TRANSACTION} before passing a tranid/time
- * to this method. If not supported should pass "now","highest" or null for tranSpec
- *
- * @param basedir
- * @param stream stream to update to
- * @param tranSpec transaction to update to or "now" if not supported.
- * @param elements (must be depot relative. if null "/./" root is used)
- * @return
- * @throws AccuRevException
- */
- List<File> popExternal( File basedir, String stream, String tranSpec, Collection<File> elements )
- throws AccuRevException;
-
- /**
- * Re populate missing files to existing workspace.
- *
- * @param basedir
- * @param elements
- * @return
- * @throws AccuRevException
- */
- List<File> pop( File basedir, Collection<File> elements )
- throws AccuRevException;
-
- /**
- * Make workspace
- *
- * @param basisStream
- * @param workspaceName
- * @param basedir
- * @return
- * @throws AccuRevException
- */
- boolean mkws( String basisStream, String workspaceName, File basedir )
- throws AccuRevException;
-
- /**
- * Update a workspace or reftree, to a particular transaction id
- *
- * @param basedir
- * @param transactionId
- * @return
- * @throws AccuRevException
- */
- List<File> update( File basedir, String transactionId )
- throws AccuRevException;
-
- /**
- * Get info about the current logged in user for the current workspace.
- *
- * @param basedir
- * @return
- */
- AccuRevInfo info( File basedir )
- throws AccuRevException;
-
- /**
- * Deactivate a workspace
- *
- * @param workSpaceName full name of the workspace, including the user suffix
- * @return
- */
- boolean rmws( String workSpaceName )
- throws AccuRevException;
-
- /**
- * Reactivate a workspace
- *
- * @param workSpaceName full name of the workspace, including the user suffix
- * @return
- */
- boolean reactivate( String workSpaceName )
- throws AccuRevException;
-
- /**
- * The accurev command line strings since last reset(), separated by ";"
- *
- * @return
- */
- String getCommandLines();
-
- /**
- * Full output of accurev command line invocations since reset
- *
- * @return
- */
- String getErrorOutput();
-
- /**
- * Add the file to the repository. File must be within a workspace
- *
- * @param basedir base directory of the workspace
- * @param files to add (relative to basedir, or absolute)
- * @param message the commit message
- */
- List<File> add( File basedir, List<File> files, String message )
- throws AccuRevException;
-
- /**
- * Remove the file from the repository. Files must be within a workspace
- *
- * @param basedir
- * @param files
- * @param message
- * @return
- * @throws AccuRevException
- */
- List<File> defunct( File basedir, List<File> files, String message )
- throws AccuRevException;
-
- /**
- * Any elements that have been kept previously or are currently modified will be promoted.
- *
- * @param basedir - location of the workspace to act on
- * @param message
- * @return
- * @throws AccuRevException
- */
- List<File> promoteAll( File basedir, String message )
- throws AccuRevException;
-
- List<File> promote( File basedir, List<File> files, String message )
- throws AccuRevException;
-
- /**
- * Relocate/reparent a workspace
- *
- * @param basedir
- * @param workSpaceName (full workspacename including user)
- * @param newBasisStream
- * @return
- * @throws AccuRevException
- */
- boolean chws( File basedir, String workSpaceName, String newBasisStream )
- throws AccuRevException;
-
- boolean mksnap( String snapShotName, String basisStream )
- throws AccuRevException;
-
- List<File> statTag( String streamName )
- throws AccuRevException;
-
- /**
- * Sorts list of elements by whether they exist in the backing stream or not.
- *
- * @param basedir
- * @param elements
- * @return
- * @throws AccuRevException
- */
- CategorisedElements statBackingStream( File basedir, Collection<File> elements )
- throws AccuRevException;
-
- /**
- * @param basedir
- * @param elements list of elements to stat, relative to basedir
- * @param statType
- * @return
- * @throws AccuRevException
- */
- List<File> stat( File basedir, Collection<File> elements, AccuRevStat statType )
- throws AccuRevException;
-
- /**
- * Accurev status of an element
- *
- * @param element
- * @return null if ignored or not in workspace
- */
- String stat( File element )
- throws AccuRevException;
-
- List<Transaction> history( String baseStream, String fromTimeSpec, String toTimeSpec, int count,
- boolean depotHistory, boolean transactionsOnly )
- throws AccuRevException;
-
- /**
- * AccuRev differences of a stream between to timespecs
- *
- * @param baseStream
- * @param fromTimeSpec
- * @param toTimeSpec
- * @return
- * @throws AccuRevException
- */
- List<FileDifference> diff( String baseStream, String fromTimeSpec, String toTimeSpec )
- throws AccuRevException;
-
- /**
- * AccuRev annotate an element
- *
- * @param file
- * @return
- * @throws AccuRevException
- */
- List<BlameLine> annotate( File baseDir, File file )
- throws AccuRevException;
-
- /**
- * Logins in as the given user, retains authtoken for use with subsequent commands.
- *
- * @param user
- * @param password
- * @return
- * @throws AccuRevException
- */
- boolean login( String user, String password )
- throws AccuRevException;
-
- Map<String, WorkSpace> showWorkSpaces()
- throws AccuRevException;
-
- Map<String, WorkSpace> showRefTrees()
- throws AccuRevException;
-
- Stream showStream( String stream )
- throws AccuRevException;
-
- String getExecutable();
-
- String getClientVersion()
- throws AccuRevException;
-
- boolean syncReplica()
- throws AccuRevException;
-
-}
\ No newline at end of file
diff --git a/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/AccuRevCapability.java b/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/AccuRevCapability.java
deleted file mode 100644
index 0765b01..0000000
--- a/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/AccuRevCapability.java
+++ /dev/null
@@ -1,55 +0,0 @@
-package org.apache.maven.scm.provider.accurev;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-/**
- *
- */
-public enum AccuRevCapability
-{
- DIFF_BETWEEN_STREAMS( "4.7.2", null ), POPULATE_TO_TRANSACTION( "4.9.0", "4.9.9" ), STAT_ADDED_NOT_PROMOTED_BUG(
- "4.9.0", "4.9.9" );
-
- public static final String DEFAULT_VERSION_FOR_TESTS = "4.9.0";
-
- private String fromVersion;
-
- private String toVersion;
-
- AccuRevCapability( String fromVersion, String toVersion )
- {
- this.fromVersion = fromVersion;
- this.toVersion = toVersion;
- }
-
- /**
- * @todo simple string compare because the version numbers have never used
- * more than one digit.
- * @param version
- * @return if the capability is available for this version
- */
- public boolean isSupported( String version )
- {
- return ( fromVersion == null || fromVersion.compareTo( version ) <= 0 )
- && ( toVersion == null || toVersion.compareTo( version ) >= 0 );
-
- }
-
-}
diff --git a/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/AccuRevException.java b/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/AccuRevException.java
deleted file mode 100644
index eaa69c0..0000000
--- a/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/AccuRevException.java
+++ /dev/null
@@ -1,51 +0,0 @@
-package org.apache.maven.scm.provider.accurev;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-/**
- *
- */
-public class AccuRevException
- extends Exception
-{
-
- private static final long serialVersionUID = 1L;
-
- public AccuRevException()
- {
- super();
- }
-
- public AccuRevException( String message, Throwable cause )
- {
- super( message, cause );
- }
-
- public AccuRevException( String message )
- {
- super( message );
- }
-
- public AccuRevException( Throwable cause )
- {
- super( cause );
- }
-
-}
diff --git a/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/AccuRevInfo.java b/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/AccuRevInfo.java
deleted file mode 100644
index 9cb2534..0000000
--- a/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/AccuRevInfo.java
+++ /dev/null
@@ -1,134 +0,0 @@
-package org.apache.maven.scm.provider.accurev;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.io.File;
-
-import org.apache.maven.scm.provider.accurev.util.WorkspaceUtils;
-
-/**
- *
- */
-public class AccuRevInfo
-{
-
- private File basedir;
-
- private String user;
-
- private String workSpace;
-
- private String basis;
-
- private String top;
-
- private String server;
-
- private int port;
-
- public int getPort()
- {
- return port;
- }
-
- public void setPort( int port )
- {
- this.port = port;
- }
-
- public String getServer()
- {
- return server;
- }
-
- public void setServer( String server )
- {
- this.server = server;
- }
-
- public String getUser()
- {
- return user;
- }
-
- public void setUser( String user )
- {
- this.user = user;
- }
-
- public String getWorkSpace()
- {
- return workSpace;
- }
-
- public void setWorkSpace( String workSpace )
- {
- this.workSpace = workSpace;
- }
-
- public String getBasis()
- {
- return basis;
- }
-
- public void setBasis( String basis )
- {
- this.basis = basis;
- }
-
- public String getTop()
- {
- return top;
- }
-
- public void setTop( String top )
- {
- this.top = top;
- }
-
- public File getBasedir()
- {
- return basedir;
- }
-
- public AccuRevInfo( File basedir )
- {
-
- this.basedir = basedir;
- }
-
- public boolean isWorkSpace()
- {
- return getWorkSpace() != null;
- }
-
-
- public boolean isLoggedIn()
- {
- return !( this.user == null || "(not logged in)".equals( this.user ) );
- }
-
- public boolean isWorkSpaceTop()
- {
- return WorkspaceUtils.isSameFile( this.getBasedir(), this.getTop() );
-
- }
-
-}
diff --git a/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/AccuRevScmProvider.java b/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/AccuRevScmProvider.java
deleted file mode 100644
index 769fbe1..0000000
--- a/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/AccuRevScmProvider.java
+++ /dev/null
@@ -1,419 +0,0 @@
-package org.apache.maven.scm.provider.accurev;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.apache.maven.scm.ChangeFile;
-import org.apache.maven.scm.ChangeSet;
-import org.apache.maven.scm.CommandParameter;
-import org.apache.maven.scm.CommandParameters;
-import org.apache.maven.scm.ScmException;
-import org.apache.maven.scm.ScmFile;
-import org.apache.maven.scm.ScmFileSet;
-import org.apache.maven.scm.ScmRevision;
-import org.apache.maven.scm.command.add.AddScmResult;
-import org.apache.maven.scm.command.blame.BlameScmResult;
-import org.apache.maven.scm.command.changelog.ChangeLogScmResult;
-import org.apache.maven.scm.command.checkin.CheckInScmResult;
-import org.apache.maven.scm.command.checkout.CheckOutScmResult;
-import org.apache.maven.scm.command.export.ExportScmResult;
-import org.apache.maven.scm.command.login.LoginScmResult;
-import org.apache.maven.scm.command.remove.RemoveScmResult;
-import org.apache.maven.scm.command.status.StatusScmResult;
-import org.apache.maven.scm.command.tag.TagScmResult;
-import org.apache.maven.scm.command.update.UpdateScmResult;
-import org.apache.maven.scm.provider.AbstractScmProvider;
-import org.apache.maven.scm.provider.ScmProviderRepository;
-import org.apache.maven.scm.provider.accurev.cli.AccuRevCommandLine;
-import org.apache.maven.scm.provider.accurev.command.add.AccuRevAddCommand;
-import org.apache.maven.scm.provider.accurev.command.blame.AccuRevBlameCommand;
-import org.apache.maven.scm.provider.accurev.command.changelog.AccuRevChangeLogCommand;
-import org.apache.maven.scm.provider.accurev.command.checkin.AccuRevCheckInCommand;
-import org.apache.maven.scm.provider.accurev.command.checkout.AccuRevCheckOutCommand;
-import org.apache.maven.scm.provider.accurev.command.export.AccuRevExportCommand;
-import org.apache.maven.scm.provider.accurev.command.login.AccuRevLoginCommand;
-import org.apache.maven.scm.provider.accurev.command.remove.AccuRevRemoveCommand;
-import org.apache.maven.scm.provider.accurev.command.status.AccuRevStatusCommand;
-import org.apache.maven.scm.provider.accurev.command.tag.AccuRevTagCommand;
-import org.apache.maven.scm.provider.accurev.command.update.AccuRevUpdateCommand;
-import org.apache.maven.scm.provider.accurev.command.update.AccuRevUpdateScmResult;
-import org.apache.maven.scm.provider.accurev.util.QuotedPropertyParser;
-import org.apache.maven.scm.repository.ScmRepositoryException;
-import org.apache.maven.scm.repository.UnknownRepositoryStructure;
-import org.codehaus.plexus.util.StringUtils;
-
-/**
- * AccuRev integration with Maven SCM
- *
- * @plexus.component role="org.apache.maven.scm.provider.ScmProvider" role-hint="accurev"
- */
-public class AccuRevScmProvider
- extends AbstractScmProvider
-{
-
- public static final String ACCUREV_EXECUTABLE_PROPERTY = "accurevExe";
-
- public static final String TAG_FORMAT_PROPERTY = "tagFormat";
-
- public static final String SYSTEM_PROPERTY_PREFIX = "maven.scm.accurev.";
-
- public String getScmType()
- {
-
- return "accurev";
- }
-
- /**
- * The basic url parsing approach is to be as loose as possible. If you specify as per the docs you'll get what you
- * expect. If you do something else the result is undefined. Don't use "/" "\" or "@" as the delimiter,
- */
- public ScmProviderRepository makeProviderScmRepository( String scmSpecificUrl, char delimiter )
- throws ScmRepositoryException
- {
-
- List<String> validationMessages = new ArrayList<String>();
-
- String[] tokens = StringUtils.split( scmSpecificUrl, Character.toString( delimiter ) );
-
- // [[user][/pass]@host[:port]][:stream][:\project\dir]
-
- String basisStream = null;
- String projectPath = null;
- int port = AccuRev.DEFAULT_PORT;
- String host = null;
- String user = null;
- String password = null;
- Map<String, String> properties = new HashMap<String, String>();
- properties.put( TAG_FORMAT_PROPERTY, AccuRevScmProviderRepository.DEFAULT_TAG_FORMAT );
- properties.put( ACCUREV_EXECUTABLE_PROPERTY, AccuRev.DEFAULT_ACCUREV_EXECUTABLE );
-
- fillSystemProperties( properties );
-
- int i = 0;
- while ( i < tokens.length )
- {
- int at = tokens[i].indexOf( '@' );
- // prefer "/", better not have a "/" or a "\\" in your password.
- int slash = tokens[i].indexOf( '/' );
- slash = slash < 0 ? tokens[i].indexOf( '\\' ) : slash;
-
- int qMark = tokens[i].indexOf( '?' );
-
- if ( qMark == 0 )
- {
- QuotedPropertyParser.parse( tokens[i].substring( 1 ), properties );
- }
- else if ( slash == 0 )
- {
- // this is the project path
- projectPath = tokens[i].substring( 1 );
- break;
- }
- else if ( ( slash > 0 || ( at >= 0 ) ) && host == null && user == null )
- {
- // user/pass@host
- int len = tokens[i].length();
- if ( at >= 0 && len > at )
- {
- // everything after the "@"
- host = tokens[i].substring( at + 1 );
- }
-
- if ( slash > 0 )
- {
- // user up to /
- user = tokens[i].substring( 0, slash );
- // pass between / and @
- password = tokens[i].substring( slash + 1, at < 0 ? len : at );
- }
- else
- {
- // no /, user from beginning to @
- user = tokens[i].substring( 0, at < 0 ? len : at );
- }
-
- }
- else if ( host != null && tokens[i].matches( "^[0-9]+$" ) )
- {
- // only valid entry with all digits is the port specification.
- port = Integer.parseInt( tokens[i] );
- }
- else
- {
- basisStream = tokens[i];
- }
-
- i++;
- }
-
- if ( i < tokens.length )
- {
- validationMessages.add( "Unknown tokens in URL " + scmSpecificUrl );
- }
-
- AccuRevScmProviderRepository repo = new AccuRevScmProviderRepository();
- repo.setLogger( getLogger() );
- if ( !StringUtils.isEmpty( user ) )
- {
- repo.setUser( user );
- }
- if ( !StringUtils.isEmpty( password ) )
- {
- repo.setPassword( password );
- }
- if ( !StringUtils.isEmpty( basisStream ) )
- {
- repo.setStreamName( basisStream );
- }
- if ( !StringUtils.isEmpty( projectPath ) )
- {
- repo.setProjectPath( projectPath );
- }
- if ( !StringUtils.isEmpty( host ) )
- {
- repo.setHost( host );
- }
- repo.setPort( port );
- repo.setTagFormat( properties.get( TAG_FORMAT_PROPERTY ) );
-
- AccuRevCommandLine accuRev = new AccuRevCommandLine( host, port );
- accuRev.setLogger( getLogger() );
- accuRev.setExecutable( properties.get( ACCUREV_EXECUTABLE_PROPERTY ) );
- repo.setAccuRev( accuRev );
-
- return repo;
-
- }
-
- private void fillSystemProperties( Map<String, String> properties )
- {
-
- Set<String> propertyKeys = properties.keySet();
- for ( String key : propertyKeys )
- {
- String systemPropertyKey = SYSTEM_PROPERTY_PREFIX + key;
- String systemProperty = System.getProperty( systemPropertyKey );
- if ( systemProperty != null )
- {
- properties.put( key, systemProperty );
- }
- }
-
- }
-
- @Override
- protected LoginScmResult login( ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters )
- throws ScmException
- {
-
- if ( getLogger().isDebugEnabled() )
- {
- getLogger().debug( repository.toString() );
- }
-
- AccuRevLoginCommand command = new AccuRevLoginCommand( getLogger() );
- return command.login( repository, fileSet, parameters );
- }
-
- @Override
- protected CheckOutScmResult checkout( ScmProviderRepository repository, ScmFileSet fileSet,
- CommandParameters parameters )
- throws ScmException
- {
-
- // workaround deprecated behaviour
- // TODO pull up to AbstractScmProvider
- AccuRevScmProviderRepository accuRevRepo = (AccuRevScmProviderRepository) repository;
- if ( !repository.isPersistCheckout() && accuRevRepo.shouldUseExportForNonPersistentCheckout() )
- {
-
- ExportScmResult result = export( repository, fileSet, parameters );
- if ( result.isSuccess() )
- {
- return new CheckOutScmResult( result.getCommandLine(), result.getExportedFiles(),
- accuRevRepo.getExportRelativePath() );
- }
- else
- {
- return new CheckOutScmResult( result.getCommandLine(), result.getProviderMessage(),
- result.getCommandOutput(), false );
- }
- }
-
- AccuRevCheckOutCommand command = new AccuRevCheckOutCommand( getLogger() );
-
- return command.checkout( repository, fileSet, parameters );
-
- }
-
- @Override
- protected CheckInScmResult checkin( ScmProviderRepository repository, ScmFileSet fileSet,
- CommandParameters parameters )
- throws ScmException
- {
-
- AccuRevCheckInCommand command = new AccuRevCheckInCommand( getLogger() );
-
- return command.checkIn( repository, fileSet, parameters );
- }
-
- @Override
- public ScmProviderRepository makeProviderScmRepository( File path )
- throws ScmRepositoryException, UnknownRepositoryStructure
- {
-
- // TODO: accurev info with current dir = "path", find workspace. Find use-case for this.
- return super.makeProviderScmRepository( path );
- }
-
- @Override
- public AddScmResult add( ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters )
- throws ScmException
- {
- AccuRevAddCommand command = new AccuRevAddCommand( getLogger() );
- return command.add( repository, fileSet, parameters );
- }
-
- @Override
- protected TagScmResult tag( ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters )
- throws ScmException
- {
-
- AccuRevTagCommand command = new AccuRevTagCommand( getLogger() );
- return command.tag( repository, fileSet, parameters );
-
- }
-
- @Override
- protected StatusScmResult status( ScmProviderRepository repository, ScmFileSet fileSet,
- CommandParameters parameters )
- throws ScmException
- {
-
- AccuRevStatusCommand command = new AccuRevStatusCommand( getLogger() );
- return command.status( repository, fileSet, parameters );
-
- }
-
- @Override
- protected UpdateScmResult update( ScmProviderRepository repository, ScmFileSet fileSet,
- CommandParameters parameters )
- throws ScmException
- {
-
- AccuRevScmProviderRepository accurevRepo = (AccuRevScmProviderRepository) repository;
-
- AccuRevUpdateCommand command = new AccuRevUpdateCommand( getLogger() );
-
- UpdateScmResult result = command.update( repository, fileSet, parameters );
-
- if ( result.isSuccess() && parameters.getBoolean( CommandParameter.RUN_CHANGELOG_WITH_UPDATE ) )
- {
- AccuRevUpdateScmResult accuRevResult = (AccuRevUpdateScmResult) result;
-
- ScmRevision fromRevision = new ScmRevision( accuRevResult.getFromRevision() );
- ScmRevision toRevision = new ScmRevision( accuRevResult.getToRevision() );
-
- parameters.setScmVersion( CommandParameter.START_SCM_VERSION, fromRevision );
- parameters.setScmVersion( CommandParameter.END_SCM_VERSION, toRevision );
-
- AccuRevVersion startVersion = accurevRepo.getAccuRevVersion( fromRevision );
- AccuRevVersion endVersion = accurevRepo.getAccuRevVersion( toRevision );
- if ( startVersion.getBasisStream().equals( endVersion.getBasisStream() ) )
- {
- ChangeLogScmResult changeLogResult = changelog( repository, fileSet, parameters );
-
- if ( changeLogResult.isSuccess() )
- {
- result.setChanges( changeLogResult.getChangeLog().getChangeSets() );
- }
- else
- {
- getLogger().warn( "Changelog from " + fromRevision + " to " + toRevision + " failed" );
- }
- }
- else
- {
- String comment = "Cross stream update result from " + startVersion + " to " + endVersion;
- String author = "";
- List<ScmFile> files = result.getUpdatedFiles();
- List<ChangeFile> changeFiles = new ArrayList<ChangeFile>( files.size() );
- for ( ScmFile scmFile : files )
- {
- changeFiles.add( new ChangeFile( scmFile.getPath() ) );
- }
- ChangeSet dummyChangeSet = new ChangeSet( new Date(), comment, author, changeFiles );
- // different streams invalidates the change log, insert a dummy change instead.
- List<ChangeSet> changeSets = Collections.singletonList( dummyChangeSet );
- result.setChanges( changeSets );
- }
-
- }
- return result;
- }
-
- @Override
- protected ExportScmResult export( ScmProviderRepository repository, ScmFileSet fileSet,
- CommandParameters parameters )
- throws ScmException
- {
-
- AccuRevExportCommand command = new AccuRevExportCommand( getLogger() );
- return command.export( repository, fileSet, parameters );
- }
-
- @Override
- protected ChangeLogScmResult changelog( ScmProviderRepository repository, ScmFileSet fileSet,
- CommandParameters parameters )
- throws ScmException
- {
-
- AccuRevChangeLogCommand command = new AccuRevChangeLogCommand( getLogger() );
- return command.changelog( repository, fileSet, parameters );
- }
-
- @Override
- protected RemoveScmResult remove( ScmProviderRepository repository, ScmFileSet fileSet,
- CommandParameters parameters )
- throws ScmException
- {
-
- AccuRevRemoveCommand command = new AccuRevRemoveCommand( getLogger() );
- return command.remove( repository, fileSet, parameters );
- }
-
- /** {@inheritDoc} */
- @Override
- protected BlameScmResult blame( ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters )
- throws ScmException
- {
-
- AccuRevBlameCommand blameCommand = new AccuRevBlameCommand( getLogger() );
- return blameCommand.blame( repository, fileSet, parameters );
- }
-}
diff --git a/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/AccuRevScmProviderRepository.java b/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/AccuRevScmProviderRepository.java
deleted file mode 100644
index 9c6e467..0000000
--- a/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/AccuRevScmProviderRepository.java
+++ /dev/null
@@ -1,369 +0,0 @@
-package org.apache.maven.scm.provider.accurev;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.io.File;
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.apache.maven.scm.ScmVersion;
-import org.apache.maven.scm.log.ScmLogger;
-import org.apache.maven.scm.provider.ScmProviderRepositoryWithHost;
-import org.apache.maven.scm.provider.accurev.util.WorkspaceUtils;
-import org.codehaus.plexus.util.StringUtils;
-
-/**
- *
- */
-public class AccuRevScmProviderRepository
- extends ScmProviderRepositoryWithHost
-{
- public static final String DEFAULT_TAG_FORMAT = "%s";
-
- private AccuRev accurev;
-
- private String streamName;
-
- private String projectPath;
-
- private String tagFormat = DEFAULT_TAG_FORMAT;
-
- private ScmLogger logger;
-
- public AccuRevScmProviderRepository()
- {
- super();
- // True is a more sensible default (ie for tck tests)
- // TODO raise jira so tck tests properly handle setPersist
- setPersistCheckout( true );
-
- setShouldUseExportForNonPersistentCheckout( true );
- }
-
- public String getTagFormat()
- {
- return tagFormat;
- }
-
- public void setTagFormat( String tagFormat )
- {
- if ( tagFormat == null || !tagFormat.contains( "%s" ) )
- {
- throw new IllegalArgumentException( "tagFormat must contain '%s' to be replaced" );
- }
- this.tagFormat = tagFormat;
- }
-
- public String getStreamName()
- {
- return streamName;
- }
-
- public void setStreamName( String streamName )
- {
- this.streamName = streamName;
- }
-
- public String getProjectPath()
- {
- return projectPath;
- }
-
- public void setProjectPath( String projectPath )
- {
- this.projectPath = projectPath;
- setCheckoutRelativePath( projectPath );
- }
-
- public AccuRev getAccuRev()
- {
- return this.accurev;
- }
-
- public void setAccuRev( AccuRev accurev )
- {
- this.accurev = accurev;
- }
-
- /**
- * @param info
- * @return true if info indicates a root of the workspace.
- */
- public boolean isWorkSpaceRoot( AccuRevInfo info )
- {
- String p = getProjectPath();
- return ( p != null && WorkspaceUtils.isSameFile( info.getBasedir(), new File( info.getTop(), p ) ) )
- || isWorkSpaceTop( info );
- }
-
- public boolean isWorkSpaceTop( AccuRevInfo info )
- {
- return info.isWorkSpaceTop();
-
- }
-
- String tagToStream( String tagName )
- {
- return String.format( getTagFormat(), tagName );
- }
-
- String streamToTag( String streamName )
- {
- tagFormat = getTagFormat();
- // TODO - strictly we should quote either side of the %s
- String tagPatternString = tagToStream( "(.*)" );
- Pattern tagPattern = Pattern.compile( tagPatternString );
-
- Matcher tagMatcher = tagPattern.matcher( streamName );
- if ( tagMatcher.matches() )
- {
- return tagMatcher.group( 1 );
- }
- else
- {
- return streamName;
- }
-
- }
-
- public void setLogger( ScmLogger logger )
- {
- this.logger = logger;
- }
-
- // TODO raise JIRA to pull up these methods to ScmProviderRepository
-
- private String checkoutRelativePath;
-
- private boolean shouldUseExportForNonPersistentCheckout = true;
-
- /**
- * The relative path of the directory of the checked out project in comparison to the checkout directory, or an
- * empty String in case the checkout directory equals the project directory.
- * <p/>
- * With most SCMs, this is just an empty String, meaning that the checkout directory equals the project directory.
- * But there are cases (e.g. ClearCase) where within the checkout directory, the directory structure of the SCM
- * system is repeated. E.g. if you check out the project "my/project" to "/some/dir", the project sources are
- * actually checked out to "some/dir/my/project". In this example, relativePathProjectDirectory would contain
- * "my/project".
- */
- public String getCheckoutRelativePath()
- {
- if ( this.checkoutRelativePath == null )
- {
- return "";
- }
- return this.checkoutRelativePath;
- }
-
- public void setCheckoutRelativePath( String checkoutRelativePath )
- {
- this.checkoutRelativePath = checkoutRelativePath;
- }
-
- /**
- * Relative project path for export
- *
- * @return default same as {@link #getCheckoutRelativePath()}
- */
- public String getExportRelativePath()
- {
- return getCheckoutRelativePath();
- }
-
- /**
- * When checkout is not expected to be refreshed or committed, should export be used instead? Perforce, Clearcase
- * and AccuRev store their meta-data about file status within the server rather than files in the source tree. This
- * makes checkouts within checkouts (eg release:perform) difficult. Typically there is a way to do a lightweight
- * export instead which can be implemented as the "export" command. This is a hint to downstream applications that
- * "export" is available and should be used in preference to "checkout" in cases where "update" and "commit" are not
- * intended to be used. (ie release:perform)
- *
- * @return false by default
- */
- public boolean shouldUseExportForNonPersistentCheckout()
- {
- return this.shouldUseExportForNonPersistentCheckout;
- }
-
- public void setShouldUseExportForNonPersistentCheckout( boolean shouldUseExportForNonPersistentCheckout )
- {
- this.shouldUseExportForNonPersistentCheckout = shouldUseExportForNonPersistentCheckout;
- }
-
- public String getDepotRelativeProjectPath()
- {
- return "/./" + ( projectPath == null ? "" : projectPath );
- }
-
- public AccuRevVersion getAccuRevVersion( ScmVersion scmVersion )
- {
-
- String tran = null;
- String basisStream = null;
-
- if ( scmVersion == null )
- {
- basisStream = getStreamName();
- }
- else
- {
- String name = StringUtils.clean( scmVersion.getName() );
-
- String[] versionComponents = name.split( "[/\\\\]", 2 );
- basisStream = versionComponents[0];
- if ( basisStream.length() == 0 )
- {
- // Use the default stream from the URL
- basisStream = getStreamName();
- }
- else
- {
- // name is a tag name - convert to a stream.
- basisStream = tagToStream( basisStream );
- }
-
- if ( versionComponents.length == 2 && versionComponents[1].length() > 0 )
- {
- tran = versionComponents[1];
- }
- }
-
- return new AccuRevVersion( basisStream, tran );
- }
-
- public String getSnapshotName( String tagName )
- {
- return tagToStream( tagName );
- }
-
- public String getRevision( String streamName, Date date )
- {
- return getRevision( streamName, AccuRev.ACCUREV_TIME_SPEC.format( date == null ? new Date() : date ) );
- }
-
- public String getRevision( String stream, long fromTranId )
- {
- return getRevision( stream, Long.toString( fromTranId ) );
- }
-
- public String getRevision( String streamName, String transaction )
- {
- return streamToTag( streamName ) + "/" + transaction;
- }
-
- public String getWorkSpaceRevision( String workspace )
- throws AccuRevException
- {
- return getRevision( workspace, Long.toString( getCurrentTransactionId( workspace ) ) );
- }
-
- public Transaction getDepotTransaction( String stream, String tranSpec )
- throws AccuRevException
- {
-
- if ( tranSpec == null )
- {
- tranSpec = "now";
- }
-
- List<Transaction> transactions = getAccuRev().history( stream, tranSpec, null, 1, true, true );
-
- if ( transactions == null || transactions.isEmpty() )
- {
- logger.warn( "Unable to find transaction for tranSpec=" + tranSpec );
- return null;
- }
- else
- {
- return transactions.get( 0 );
- }
-
- }
-
- public String getDepotTransactionId( String stream, String tranSpec )
- throws AccuRevException
- {
- Transaction t = getDepotTransaction( stream, tranSpec );
-
- return t == null ? tranSpec : Long.toString( t.getTranId() );
- }
-
- private long getCurrentTransactionId( String workSpaceName )
- throws AccuRevException
- {
- // AccuRev does not have a way to get at this workspace info by name.
- // So we have to do it the hard way...
-
- AccuRev accuRev = getAccuRev();
-
- Map<String, WorkSpace> workSpaces = accuRev.showWorkSpaces();
-
- WorkSpace workspace = workSpaces.get( workSpaceName );
-
- if ( workspace == null )
- {
- // Must be a reftree
- workSpaces = accuRev.showRefTrees();
- workspace = workSpaces.get( workSpaceName );
- }
-
- if ( workspace == null )
- {
- throw new AccuRevException( "Can't find workspace " + workSpaceName );
- }
- return workspace.getTransactionId();
- }
-
- public String toString()
- {
- StringBuilder buff = new StringBuilder( "AccuRevScmProviderRepository" );
- buff.append( " user=" );
- buff.append( getUser() );
- buff.append( " pass=" );
- buff.append( getPassword() == null ? "null" : StringUtils.repeat( "*", getPassword().length() ) );
- buff.append( " host=" );
- buff.append( getHost() );
- buff.append( " port=" );
- buff.append( getPort() );
- buff.append( " stream=" );
- buff.append( getStreamName() );
- buff.append( " projectPath=" );
- buff.append( getProjectPath() );
-
- return buff.toString();
- }
-
- public static String formatTimeSpec( Date when )
- {
-
- if ( when == null )
- {
- return "now";
- }
-
- return AccuRev.ACCUREV_TIME_SPEC.format( when );
-
- }
-
-}
diff --git a/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/AccuRevStat.java b/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/AccuRevStat.java
deleted file mode 100644
index 09275e4..0000000
--- a/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/AccuRevStat.java
+++ /dev/null
@@ -1,59 +0,0 @@
-package org.apache.maven.scm.provider.accurev;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.util.regex.Pattern;
-
-/**
- *
- */
-public enum AccuRevStat
-{
- DEFUNCT( "-D", "defunct" ),
- MODIFIED( "-m", "modified" ),
- KEPT( "-k", "kept" ),
- MISSING( "-M", "missing" ),
- EXTERNAL( "-x", "external" )
- // TODO Test KEPT pattern skips items that are both (kept) and (defunct).
- ;
-
- private String statArg;
-
- private Pattern matchPattern;
-
- AccuRevStat( String statArg, String indicator )
- {
- String pattern = "\\s*(\\S+)\\s+.*\\(" + indicator + "\\).*";
- matchPattern = Pattern.compile( pattern );
- this.statArg = statArg;
- }
-
- public String getStatArg()
- {
- return statArg;
- }
-
- public Pattern getMatchPattern()
- {
-
- return matchPattern;
- }
-
-}
diff --git a/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/AccuRevVersion.java b/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/AccuRevVersion.java
deleted file mode 100644
index 6833ebe..0000000
--- a/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/AccuRevVersion.java
+++ /dev/null
@@ -1,79 +0,0 @@
-package org.apache.maven.scm.provider.accurev;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.util.Date;
-
-import org.codehaus.plexus.util.StringUtils;
-
-/**
- *
- */
-public class AccuRevVersion
-{
-
- private String basisStream;
-
- private String timeSpec;
-
- public AccuRevVersion( String basisStream, String tran )
- {
-
- this.basisStream = basisStream;
- this.timeSpec = tran;
- }
-
- public String getBasisStream()
- {
- return basisStream;
- }
-
- public String getTimeSpec()
- {
- return timeSpec;
- }
-
- public AccuRevVersion( String basis, Date startDate )
- {
- this( basis, AccuRev.ACCUREV_TIME_SPEC.format( startDate ) );
- }
-
- public AccuRevVersion( String basis, long transactionId )
- {
- this( basis, Long.toString( transactionId ) );
- }
-
- public boolean isNow()
- {
- return isNow( this.timeSpec );
- }
-
- @Override
- public String toString()
- {
- return String.format( "AccuRevVersion: stream = %s, transaction= %s", basisStream, timeSpec );
- }
-
- public static boolean isNow( String timeSpec )
- {
- return StringUtils.isBlank( timeSpec ) || "highest".equalsIgnoreCase( timeSpec )
- || "now".equalsIgnoreCase( timeSpec );
- }
-}
diff --git a/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/CategorisedElements.java b/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/CategorisedElements.java
deleted file mode 100644
index f17ee20..0000000
--- a/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/CategorisedElements.java
+++ /dev/null
@@ -1,44 +0,0 @@
-package org.apache.maven.scm.provider.accurev;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- *
- */
-public class CategorisedElements
-{
- private List<File> memberElements = new ArrayList<File>();
-
- private List<File> nonMemberElements = new ArrayList<File>();
-
- public List<File> getMemberElements()
- {
- return memberElements;
- }
-
- public List<File> getNonMemberElements()
- {
- return nonMemberElements;
- }
-}
\ No newline at end of file
diff --git a/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/FileDifference.java b/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/FileDifference.java
deleted file mode 100644
index a8c9ffb..0000000
--- a/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/FileDifference.java
+++ /dev/null
@@ -1,187 +0,0 @@
-package org.apache.maven.scm.provider.accurev;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.io.File;
-
-/**
- *
- */
-public class FileDifference
-{
-
- private String oldVersionSpec = null;
-
- private File oldFile = null;
-
- private String newVersionSpec = null;
-
- private File newFile = null;
-
- private long elementId = -1;
-
- public FileDifference( long elementId, String newPath, String newVersion, String oldPath, String oldVersion )
- {
- setElementId( elementId );
- setNewVersion( newPath, newVersion );
- setOldVersion( oldPath, oldVersion );
- }
-
- public FileDifference()
- {
-
- }
-
- public String getOldVersionSpec()
- {
- return oldVersionSpec;
- }
-
- public File getOldFile()
- {
- return oldFile;
- }
-
- public String getNewVersionSpec()
- {
- return newVersionSpec;
- }
-
- public File getNewFile()
- {
- return newFile;
- }
-
- public long getElementId()
- {
- return elementId;
- }
-
- public void setElementId( long elementId )
- {
- this.elementId = elementId;
- }
-
- public void setNewVersion( String path, String version )
- {
-
- this.newFile =
- ( oldFile != null && oldFile.getPath().equals( path ) ) ? oldFile : path == null ? null : new File( path );
- this.newVersionSpec = version;
-
- }
-
- public void setOldVersion( String path, String version )
- {
-
- this.oldFile =
- ( newFile != null && newFile.getPath().equals( path ) ) ? newFile : path == null ? null : new File( path );
- this.oldVersionSpec = version;
-
- }
-
- @Override
- public String toString()
- {
- return "FileDifference [elementId=" + elementId + ", newFile=" + newFile + ", newVersionSpec=" + newVersionSpec
- + ", oldFile=" + oldFile + ", oldVersionSpec=" + oldVersionSpec + "]";
- }
-
- @Override
- public int hashCode()
- {
- final int prime = 31;
- int result = 1;
- result = prime * result + (int) ( elementId ^ ( elementId >>> 32 ) );
- result = prime * result + ( ( newFile == null ) ? 0 : newFile.hashCode() );
- result = prime * result + ( ( newVersionSpec == null ) ? 0 : newVersionSpec.hashCode() );
- result = prime * result + ( ( oldFile == null ) ? 0 : oldFile.hashCode() );
- result = prime * result + ( ( oldVersionSpec == null ) ? 0 : oldVersionSpec.hashCode() );
- return result;
- }
-
- @Override
- public boolean equals( Object obj )
- {
- if ( this == obj )
- {
- return true;
- }
- if ( obj == null )
- {
- return false;
- }
- if ( getClass() != obj.getClass() )
- {
- return false;
- }
- FileDifference other = (FileDifference) obj;
- if ( elementId != other.elementId )
- {
- return false;
- }
- if ( newFile == null )
- {
- if ( other.newFile != null )
- {
- return false;
- }
- }
- else if ( !newFile.equals( other.newFile ) )
- {
- return false;
- }
- if ( newVersionSpec == null )
- {
- if ( other.newVersionSpec != null )
- {
- return false;
- }
- }
- else if ( !newVersionSpec.equals( other.newVersionSpec ) )
- {
- return false;
- }
- if ( oldFile == null )
- {
- if ( other.oldFile != null )
- {
- return false;
- }
- }
- else if ( !oldFile.equals( other.oldFile ) )
- {
- return false;
- }
- if ( oldVersionSpec == null )
- {
- if ( other.oldVersionSpec != null )
- {
- return false;
- }
- }
- else if ( !oldVersionSpec.equals( other.oldVersionSpec ) )
- {
- return false;
- }
- return true;
- }
-
-}
diff --git a/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/Stream.java b/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/Stream.java
deleted file mode 100644
index 3dc4c5b..0000000
--- a/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/Stream.java
+++ /dev/null
@@ -1,192 +0,0 @@
-package org.apache.maven.scm.provider.accurev;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.util.Date;
-
-/**
- *
- */
-public class Stream
-{
-
- private String name;
-
- private long id;
-
- private String basis;
-
- private long basisId;
-
- private String depot;
-
- private Date startDate;
-
- private String streamType;
-
- public Stream( String name, long id, String basis, long basisId, String depot, Date startDate, String streamType )
- {
- this.name = name;
- this.id = id;
- this.basis = basis;
- this.basisId = basisId;
- this.depot = depot;
- this.startDate = startDate;
- this.streamType = streamType;
- }
-
- @Override
- public int hashCode()
- {
- final int prime = 31;
- int result = 1;
- result = prime * result + ( ( basis == null ) ? 0 : basis.hashCode() );
- result = prime * result + (int) ( basisId ^ ( basisId >>> 32 ) );
- result = prime * result + ( ( depot == null ) ? 0 : depot.hashCode() );
- result = prime * result + (int) ( id ^ ( id >>> 32 ) );
- result = prime * result + ( ( name == null ) ? 0 : name.hashCode() );
- result = prime * result + ( ( startDate == null ) ? 0 : startDate.hashCode() );
- result = prime * result + ( ( streamType == null ) ? 0 : streamType.hashCode() );
- return result;
- }
-
- @Override
- public boolean equals( Object obj )
- {
- if ( this == obj )
- {
- return true;
- }
- if ( obj == null )
- {
- return false;
- }
- if ( getClass() != obj.getClass() )
- {
- return false;
- }
- Stream other = (Stream) obj;
- if ( basis == null )
- {
- if ( other.basis != null )
- {
- return false;
- }
- }
- else if ( !basis.equals( other.basis ) )
- {
- return false;
- }
- if ( basisId != other.basisId )
- {
- return false;
- }
- if ( depot == null )
- {
- if ( other.depot != null )
- {
- return false;
- }
- }
- else if ( !depot.equals( other.depot ) )
- {
- return false;
- }
- if ( id != other.id )
- {
- return false;
- }
- if ( name == null )
- {
- if ( other.name != null )
- {
- return false;
- }
- }
- else if ( !name.equals( other.name ) )
- {
- return false;
- }
- if ( startDate == null )
- {
- if ( other.startDate != null )
- {
- return false;
- }
- }
- else if ( !startDate.equals( other.startDate ) )
- {
- return false;
- }
- if ( streamType == null )
- {
- if ( other.streamType != null )
- {
- return false;
- }
- }
- else if ( !streamType.equals( other.streamType ) )
- {
- return false;
- }
- return true;
- }
-
- public String getName()
- {
- return name;
- }
-
- public long getId()
- {
- return id;
- }
-
- public String getBasis()
- {
- return basis;
- }
-
- public long getBasisId()
- {
- return basisId;
- }
-
- public String getDepot()
- {
- return depot;
- }
-
- public Date getStartDate()
- {
- return startDate;
- }
-
- public String getStreamType()
- {
- return streamType;
- }
-
- public Boolean isWorkspace()
- {
- return "workspace".equals( streamType );
- }
-
-}
diff --git a/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/Transaction.java b/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/Transaction.java
deleted file mode 100644
index 1e3f696..0000000
--- a/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/Transaction.java
+++ /dev/null
@@ -1,198 +0,0 @@
-package org.apache.maven.scm.provider.accurev;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.util.Collection;
-import java.util.Date;
-import java.util.HashSet;
-
-/**
- *
- */
-public class Transaction
-{
-
- /**
- *
- */
- public class Version
- {
-
- private String realSpec;
-
- private String virtualSpec;
-
- private String ancestorSpec;
-
- private Long elementId;
-
- private String elementName;
-
- private Version( Long id, String elementName, String virtualSpec, String realSpec, String ancestor )
- {
- this.elementId = id;
- this.virtualSpec = virtualSpec;
- this.realSpec = realSpec;
- this.ancestorSpec = ancestor;
- this.elementName = elementName;
- }
-
- public String getVirtualSpec()
- {
- return virtualSpec;
- }
-
- public void setVirtualSpec( String virtualSpec )
- {
- this.virtualSpec = virtualSpec;
- }
-
- public String getAncestorSpec()
- {
- return ancestorSpec;
- }
-
- public void setAncestorSpec( String ancestorSpec )
- {
- this.ancestorSpec = ancestorSpec;
- }
-
- public void setRealSpec( String realSpec )
- {
- this.realSpec = realSpec;
- }
-
- public void setElementId( Long elementId )
- {
- this.elementId = elementId;
- }
-
- public String getRealSpec()
- {
- return realSpec;
- }
-
- public Long getElementId()
- {
- return elementId;
- }
-
- public Transaction getTransaction()
- {
- return getOuterTransaction();
- }
-
- public String getElementName()
- {
- return elementName;
- }
-
- @Override
- public String toString()
- {
- return String.format( "Version: %s (%d) %s (%s) anc=%s", elementName, elementId, virtualSpec, realSpec,
- ancestorSpec );
- }
-
- }
-
- private Collection<Version> versions = new HashSet<Version>();
-
- private long id;
-
- public Transaction( Long id, Date when, String tranType, String user )
- {
- this.id = id;
- this.tranType = tranType;
- this.when = when;
- this.author = user;
- }
-
- public long getId()
- {
- return id;
- }
-
- public String getTranType()
- {
- return tranType;
- }
-
- public String getComment()
- {
- return comment;
- }
-
- public void setComment( String comment )
- {
- this.comment = comment;
- }
-
- private Date when;
-
- private String tranType;
-
- private String author;
-
- private String comment;
-
- public long getTranId()
- {
- return id;
- }
-
- private Transaction getOuterTransaction()
- {
- return this;
- }
-
- public Collection<Version> getVersions()
- {
- return versions;
- }
-
- public Date getWhen()
- {
- return when;
- }
-
- public String getType()
- {
- return tranType;
- }
-
- public String getAuthor()
- {
- return author;
- }
-
- public void addVersion( Long id, String name, String virtualSpec, String realSpec, String ancestor )
- {
- Transaction.Version v = new Version( id, name, virtualSpec, realSpec, ancestor );
- versions.add( v );
-
- }
-
- public String toString()
- {
- return String.format( "Transaction: %d, %s at %tc by %s -'%s'", this.getId(), this.getTranType(),
- this.getWhen(), this.getAuthor(), this.getComment() );
- }
-}
diff --git a/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/WorkSpace.java b/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/WorkSpace.java
deleted file mode 100644
index 77b0fba..0000000
--- a/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/WorkSpace.java
+++ /dev/null
@@ -1,53 +0,0 @@
-package org.apache.maven.scm.provider.accurev;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-/**
- *
- */
-public class WorkSpace
-{
-
- private long transactionId;
-
- private String name;
-
- public String getName()
- {
- return name;
- }
-
- public WorkSpace( String name, long transactionId )
- {
- this.transactionId = transactionId;
- this.name = name;
- }
-
- public long getTransactionId()
- {
- return transactionId;
- }
-
- public String toString()
- {
- return name;
- }
-
-}
diff --git a/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/cli/AccuRevCommandLine.java b/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/cli/AccuRevCommandLine.java
deleted file mode 100644
index 70ba195..0000000
--- a/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/cli/AccuRevCommandLine.java
+++ /dev/null
@@ -1,754 +0,0 @@
-package org.apache.maven.scm.provider.accurev.cli;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.io.ByteArrayInputStream;
-import java.io.File;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.regex.Pattern;
-
-import org.apache.maven.scm.command.blame.BlameLine;
-import org.apache.maven.scm.log.ScmLogger;
-import org.apache.maven.scm.provider.accurev.AccuRev;
-import org.apache.maven.scm.provider.accurev.AccuRevException;
-import org.apache.maven.scm.provider.accurev.AccuRevInfo;
-import org.apache.maven.scm.provider.accurev.AccuRevStat;
-import org.apache.maven.scm.provider.accurev.AccuRevVersion;
-import org.apache.maven.scm.provider.accurev.CategorisedElements;
-import org.apache.maven.scm.provider.accurev.FileDifference;
-import org.apache.maven.scm.provider.accurev.Stream;
-import org.apache.maven.scm.provider.accurev.Transaction;
-import org.apache.maven.scm.provider.accurev.WorkSpace;
-import org.codehaus.plexus.util.Os;
-import org.codehaus.plexus.util.StringUtils;
-import org.codehaus.plexus.util.cli.CommandLineException;
-import org.codehaus.plexus.util.cli.CommandLineUtils;
-import org.codehaus.plexus.util.cli.Commandline;
-import org.codehaus.plexus.util.cli.StreamConsumer;
-
-/**
- *
- */
-public class AccuRevCommandLine
- implements AccuRev
-{
-
- private static final String[] EMPTY_STRING_ARRAY = new String[] {};
-
- private static final File CURRENT_DIR = new File( "." );
-
- private ScmLogger logger;
-
- private Commandline cl = new Commandline();
-
- private StringBuilder commandLines = new StringBuilder();
-
- private StringBuilder errorOutput = new StringBuilder();
-
- private StreamConsumer systemErr;
-
- private String[] hostArgs = EMPTY_STRING_ARRAY;
-
- private String[] authArgs = EMPTY_STRING_ARRAY;
-
- private String executable = "accurev";
-
- private long executableModTime;
-
- private String clientVersion;
-
- public AccuRevCommandLine()
- {
- super();
- reset();
- }
-
- public AccuRevCommandLine( String host, int port )
- {
- this();
- setServer( host, port );
- }
-
- public void setServer( String host, int port )
- {
-
- if ( host != null )
- {
- hostArgs = new String[] { "-H", host + ":" + port };
- }
- else
- {
- hostArgs = EMPTY_STRING_ARRAY;
- }
-
- }
-
- public void setExecutable( String accuRevExe )
- {
-
- executable = accuRevExe;
- reset();
- }
-
- private boolean executeCommandLine( File basedir, String[] args, Iterable<File> elements, Pattern matchPattern,
- List<File> matchedFiles )
- throws AccuRevException
- {
-
- FileConsumer stdoutConsumer = new FileConsumer( matchedFiles, matchPattern );
-
- return executeCommandLine( basedir, args, elements, stdoutConsumer );
- }
-
- private boolean executeCommandLine( File basedir, String[] args, Iterable<File> elements,
- StreamConsumer stdoutConsumer )
- throws AccuRevException
- {
-
- setWorkingDirectory( basedir );
- setCommandLineArgs( args );
-
- if ( elements != null )
- {
- for ( File file : elements )
- {
- String path = file.getPath();
- // Hack for Windows "/./". TODO find a nicer way to handle this.
- if ( "\\.".equals( path ) )
- {
- path = "\\.\\";
- }
- cl.createArg().setValue( path );
- }
- }
- return executeCommandLine( null, stdoutConsumer ) == 0;
- }
-
- private void setCommandLineArgs( String[] args )
- {
-
- cl.clearArgs();
-
- if ( args.length > 0 )
- {
- // First arg is the accurev command
- cl.createArg().setValue( args[0] );
-
- // Inject -H <host:port> and -A <token> here
- cl.addArguments( hostArgs );
- cl.addArguments( authArgs );
- }
-
- for ( int i = 1; i < args.length; i++ )
- {
- cl.createArg().setValue( args[i] );
- }
-
- }
-
- private boolean executeCommandLine( String[] args )
- throws AccuRevException
- {
-
- return executeCommandLine( args, null, null ) == 0;
- }
-
- private int executeCommandLine( String[] args, InputStream stdin, StreamConsumer stdout )
- throws AccuRevException
- {
-
- setCommandLineArgs( args );
-
- return executeCommandLine( stdin, stdout );
-
- }
-
- private int executeCommandLine( InputStream stdin, StreamConsumer stdout )
- throws AccuRevException
- {
-
- commandLines.append( cl.toString() );
- commandLines.append( ';' );
-
- if ( getLogger().isDebugEnabled() )
- {
- getLogger().debug( cl.toString() );
- }
- try
- {
-
- int result = executeCommandLine( cl, stdin, new CommandOutputConsumer( getLogger(), stdout ), systemErr );
- if ( result != 0 )
- {
- getLogger().debug( "Non zero result - " + result );
- }
- return result;
- }
- catch ( CommandLineException ex )
- {
- throw new AccuRevException( "Error executing command " + cl.toString(), ex );
- }
-
- }
-
- /**
- * Extracted so test class can override
- *
- * @param stdin
- * @param stdout
- * @param stderr
- * @return
- * @throws CommandLineException
- */
- protected int executeCommandLine( Commandline cl, InputStream stdin, CommandOutputConsumer stdout,
- StreamConsumer stderr )
- throws CommandLineException
- {
-
- int result = CommandLineUtils.executeCommandLine( cl, stdin, stdout, stderr );
- stdout.waitComplete();
-
- return result;
- }
-
- protected Commandline getCommandline()
- {
-
- return cl;
- }
-
- public void reset()
- {
-
- // TODO find out why Commandline allows executable, args etc to be initialised to
- // null, but not allowing them to be reset to null. This results is weird "clear"
- // behaviour. It is just safer to start again.
-
- cl = new Commandline();
- commandLines = new StringBuilder();
- errorOutput = new StringBuilder();
- systemErr = new ErrorConsumer( getLogger(), errorOutput );
- cl.getShell().setQuotedArgumentsEnabled( true );
- cl.setExecutable( executable );
-
- try
- {
- cl.addSystemEnvironment();
- }
- catch ( Exception e )
- {
- if ( getLogger().isDebugEnabled() )
- {
- getLogger().debug( "Unable to obtain system environment", e );
- }
- else
- {
- getLogger().warn( "Unable to obtain system environment" );
- }
- }
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean mkws( String basisStream, String workspaceName, File basedir )
- throws AccuRevException
- {
-
- setWorkingDirectory( basedir );
- String[] mkws = { "mkws", "-b", basisStream, "-w", workspaceName, "-l", basedir.getAbsolutePath() };
-
- return executeCommandLine( mkws );
- }
-
- /**
- * {@inheritDoc}
- */
- public List<File> update( File baseDir, String transactionId )
- throws AccuRevException
- {
-
- if ( transactionId == null )
- {
- transactionId = "highest";
- }
- String[] update = { "update", "-t", transactionId };
- setWorkingDirectory( baseDir );
-
- List<File> updatedFiles = new ArrayList<File>();
- int ret = executeCommandLine( update, null, new FileConsumer( updatedFiles, FileConsumer.UPDATE_PATTERN ) );
- return ret == 0 ? updatedFiles : null;
-
- }
-
- /**
- * {@inheritDoc}
- */
- public List<File> add( File basedir, List<File> elements, String message )
- throws AccuRevException
- {
-
- if ( StringUtils.isBlank( message ) )
- {
- message = AccuRev.DEFAULT_ADD_MESSAGE;
- }
-
- boolean recursive = false;
-
- if ( elements == null || elements.isEmpty() )
- {
- elements = Collections.singletonList( CURRENT_DIR );
- recursive = true;
- }
- else if ( elements.size() == 1 && elements.toArray()[0].equals( CURRENT_DIR ) )
- {
- recursive = true;
- }
-
- List<File> addedFiles = new ArrayList<File>();
- return executeCommandLine( basedir, new String[] { "add", "-c", message, recursive ? "-R" : null }, elements,
- FileConsumer.ADD_PATTERN, addedFiles ) ? addedFiles : null;
-
- }
-
- public List<File> defunct( File basedir, List<File> files, String message )
- throws AccuRevException
- {
-
- if ( StringUtils.isBlank( message ) )
- {
- message = AccuRev.DEFAULT_REMOVE_MESSAGE;
- }
-
- if ( files == null || files.isEmpty() )
- {
- files = Collections.singletonList( CURRENT_DIR );
- }
-
- ArrayList<File> defunctFiles = new ArrayList<File>();
- return executeCommandLine( basedir, new String[] { "defunct", "-c", message }, files,
- FileConsumer.DEFUNCT_PATTERN, defunctFiles ) ? defunctFiles : null;
- }
-
- public List<File> promote( File basedir, List<File> files, String message )
- throws AccuRevException
- {
-
- if ( StringUtils.isBlank( message ) )
- {
- message = AccuRev.DEFAULT_PROMOTE_MESSAGE;
- }
- List<File> promotedFiles = new ArrayList<File>();
- return executeCommandLine( basedir, new String[] { "promote", "-K", "-c", message }, files,
- FileConsumer.PROMOTE_PATTERN, promotedFiles ) ? promotedFiles : null;
-
- }
-
- public String getCommandLines()
- {
-
- return commandLines.toString();
- }
-
- public String getErrorOutput()
- {
-
- return errorOutput.toString();
- }
-
- public void setLogger( ScmLogger logger )
- {
- this.logger = logger;
- }
-
- public ScmLogger getLogger()
- {
-
- return logger;
- }
-
- public boolean mkdepot( String depotName )
- throws AccuRevException
- {
-
- String[] mkdepot = { "mkdepot", "-p", depotName };
-
- return executeCommandLine( mkdepot );
-
- }
-
- public boolean mkstream( String backingStream, String newStreamName )
- throws AccuRevException
- {
- String[] mkstream = { "mkstream", "-b", backingStream, "-s", newStreamName };
- return executeCommandLine( mkstream );
-
- }
-
- public boolean promoteStream( String subStream, String commitMessage, List<File> promotedFiles )
- throws AccuRevException
- {
- String[] promote = { "promote", "-s", subStream, "-d" };
- return executeCommandLine( promote );
-
- }
-
- /**
- * {@inheritDoc}
- */
- public List<File> promoteAll( File baseDir, String commitMessage )
- throws AccuRevException
- {
- setWorkingDirectory( baseDir );
- String[] promote = { "promote", "-p", "-K", "-c", commitMessage };
-
- List<File> promotedFiles = new ArrayList<File>();
- int ret = executeCommandLine( promote, null, new FileConsumer( promotedFiles, FileConsumer.PROMOTE_PATTERN ) );
- return ret == 0 ? promotedFiles : null;
- }
-
- public AccuRevInfo info( File basedir )
- throws AccuRevException
- {
-
- setWorkingDirectory( basedir );
- String[] info = { "info" };
- AccuRevInfo result = new AccuRevInfo( basedir );
-
- executeCommandLine( info, null, new InfoConsumer( result ) );
- return result;
- }
-
- private void setWorkingDirectory( File basedir )
- {
-
- // TODO raise bug against plexus. Null is OK for working directory
- // but once set to not-null cannot be set back to null!
- // this is a problem if the old workingdir has been deleted
- // probably safer to use a new commandline
-
- if ( basedir == null )
- {
- cl.setWorkingDirectory( "." );
- }
- cl.setWorkingDirectory( basedir );
- }
-
- public boolean reactivate( String workSpaceName )
- throws AccuRevException
- {
-
- String[] reactivate = { "reactivate", "wspace", workSpaceName };
-
- return executeCommandLine( reactivate, null, new CommandOutputConsumer( getLogger(), null ) ) == 0;
-
- }
-
- public boolean rmws( String workSpaceName )
- throws AccuRevException
- {
-
- String[] rmws = { "rmws", "-s", workSpaceName };
-
- return executeCommandLine( rmws );
-
- }
-
- public String stat( File element )
- throws AccuRevException
- {
-
- String[] stat = { "stat", "-fx", element.getAbsolutePath() };
-
- StatConsumer statConsumer = new StatConsumer( getLogger() );
- executeCommandLine( stat, null, statConsumer );
- return statConsumer.getStatus();
-
- }
-
- public boolean chws( File basedir, String workSpaceName, String newBasisStream )
- throws AccuRevException
- {
-
- setWorkingDirectory( basedir );
- return executeCommandLine( new String[] { "chws", "-s", workSpaceName, "-b", newBasisStream, "-l", "." } );
-
- }
-
- public boolean mksnap( String snapShotName, String basisStream )
- throws AccuRevException
- {
- return executeCommandLine( new String[] { "mksnap", "-s", snapShotName, "-b", basisStream, "-t", "now" } );
- }
-
- public List<File> statTag( String streamName )
- throws AccuRevException
- {
-
- List<File> taggedFiles = new ArrayList<File>();
- String[] stat = new String[] { "stat", "-a", "-ffl", "-s", streamName };
- return executeCommandLine( null, stat, null, FileConsumer.STAT_PATTERN, taggedFiles ) ? taggedFiles : null;
- }
-
- public List<File> stat( File basedir, Collection<File> elements, AccuRevStat statType )
- throws AccuRevException
- {
-
- boolean recursive = false;
-
- if ( elements == null || elements.isEmpty() )
- {
- elements = Collections.singletonList( CURRENT_DIR );
- recursive = true;
- }
- else if ( elements.size() == 1 && elements.toArray()[0].equals( CURRENT_DIR ) )
- {
- recursive = true;
- }
-
- String[] args = { "stat", "-ffr", statType.getStatArg(), recursive ? "-R" : null };
-
- List<File> matchingElements = new ArrayList<File>();
- boolean ret = executeCommandLine( basedir, args, elements, statType.getMatchPattern(), matchingElements );
- return ret ? matchingElements : null;
- }
-
- public List<File> pop( File basedir, Collection<File> elements )
- throws AccuRevException
- {
-
- if ( elements == null || elements.isEmpty() )
- {
- elements = Collections.singletonList( CURRENT_DIR );
- }
-
- String[] popws = { "pop", "-R" };
-
- List<File> poppedFiles = new ArrayList<File>();
- boolean ret = executeCommandLine( basedir, popws, elements, FileConsumer.POPULATE_PATTERN, poppedFiles );
- return ret ? poppedFiles : null;
- }
-
- public List<File> popExternal( File basedir, String versionSpec, String tranSpec, Collection<File> elements )
- throws AccuRevException
- {
-
- if ( elements == null || elements.isEmpty() )
- {
- elements = Collections.singletonList( new File( "/./" ) );
- }
-
- if ( StringUtils.isBlank( tranSpec ) )
- {
- tranSpec = "now";
- }
-
- String[] popArgs;
- if ( AccuRevVersion.isNow( tranSpec ) )
- {
- popArgs = new String[] { "pop", "-v", versionSpec, "-L", basedir.getAbsolutePath(), "-R" };
- }
- else
- // this will BARF for pre 4.9.0, but clients are expected to check AccuRevCapability before calling.
- {
- popArgs = new String[] { "pop", "-v", versionSpec, "-L", basedir.getAbsolutePath(), "-t", tranSpec, "-R" };
- }
-
- List<File> poppedFiles = new ArrayList<File>();
- boolean ret = executeCommandLine( basedir, popArgs, elements, FileConsumer.POPULATE_PATTERN, poppedFiles );
- return ret ? poppedFiles : null;
- }
-
- public CategorisedElements statBackingStream( File basedir, Collection<File> elements )
- throws AccuRevException
- {
-
- CategorisedElements catElems = new CategorisedElements();
-
- if ( elements.isEmpty() )
- {
- return catElems;
- }
- String[] args = { "stat", "-b", "-ffr" };
-
- boolean ret =
- executeCommandLine( basedir, args, elements, new StatBackingConsumer( catElems.getMemberElements(),
- catElems.getNonMemberElements() ) );
- return ret ? catElems : null;
-
- }
-
- public List<Transaction> history( String baseStream, String fromTimeSpec, String toTimeSpec, int count,
- boolean depotHistory, boolean transactionsOnly )
- throws AccuRevException
- {
-
- String timeSpec = fromTimeSpec;
-
- if ( toTimeSpec != null )
- {
- timeSpec = timeSpec + "-" + toTimeSpec;
- }
-
- if ( count > 0 )
- {
- timeSpec = timeSpec + "." + count;
- }
-
- String[] hist =
- { "hist", transactionsOnly ? "-ftx" : "-fx", depotHistory ? "-p" : "-s", baseStream, "-t", timeSpec };
-
- ArrayList<Transaction> transactions = new ArrayList<Transaction>();
- HistoryConsumer stdout = new HistoryConsumer( getLogger(), transactions );
- return executeCommandLine( hist, null, stdout ) == 0 ? transactions : null;
- }
-
- public List<FileDifference> diff( String baseStream, String fromTimeSpec, String toTimeSpec )
- throws AccuRevException
- {
- String timeSpec = fromTimeSpec + "-" + toTimeSpec;
- String[] diff = { "diff", "-fx", "-a", "-i", "-v", baseStream, "-V", baseStream, "-t", timeSpec };
-
- List<FileDifference> results = new ArrayList<FileDifference>();
- DiffConsumer stdout = new DiffConsumer( getLogger(), results );
- return executeCommandLine( diff, null, stdout ) < 2 ? results : null;
- }
-
- public boolean login( String user, String password )
- throws AccuRevException
- {
-
- // TODO Raise bug against plexus commandline - can't set workingdir to null
- // and will get an error if the working directory is deleted.
- cl.setWorkingDirectory( "." );
- authArgs = EMPTY_STRING_ARRAY;
- AuthTokenConsumer stdout = new AuthTokenConsumer();
-
- boolean result;
- if ( Os.isFamily( Os.FAMILY_WINDOWS ) )
- {
- if ( StringUtils.isBlank( password ) )
- {
- // Ensure blank is passed in.
- password = "\"\"";
- }
- String[] login = { "login", "-A", user, password };
- result = executeCommandLine( login, null, stdout ) == 0;
- }
- else
- {
- String[] login = { "login", "-A", user };
- password = StringUtils.clean( password ) + "\n";
- byte[] bytes = password.getBytes();
- ByteArrayInputStream stdin = new ByteArrayInputStream( bytes );
- result = executeCommandLine( login, stdin, stdout ) == 0;
-
- }
-
- authArgs = new String[] { "-A", stdout.getAuthToken() };
- return result;
- }
-
- public boolean logout()
- throws AccuRevException
- {
-
- String[] logout = { "logout" };
- return executeCommandLine( logout );
-
- }
-
- public List<BlameLine> annotate( File basedir, File file )
- throws AccuRevException
- {
-
- String[] annotate = { "annotate", "-ftud" };
- List<BlameLine> lines = new ArrayList<BlameLine>();
- AnnotateConsumer stdout = new AnnotateConsumer( lines, getLogger() );
-
- return executeCommandLine( basedir, annotate, Collections.singletonList( file ), stdout ) ? lines : null;
- }
-
- public Map<String, WorkSpace> showRefTrees()
- throws AccuRevException
- {
-
- String[] show = { "show", "-fx", "refs" };
- Map<String, WorkSpace> refTrees = new HashMap<String, WorkSpace>();
- WorkSpaceConsumer stdout = new WorkSpaceConsumer( getLogger(), refTrees );
- return executeCommandLine( show, null, stdout ) == 0 ? refTrees : null;
- }
-
- public Map<String, WorkSpace> showWorkSpaces()
- throws AccuRevException
- {
-
- String[] show = { "show", "-a", "-fx", "wspaces" };
- Map<String, WorkSpace> workSpaces = new HashMap<String, WorkSpace>();
- WorkSpaceConsumer stdout = new WorkSpaceConsumer( getLogger(), workSpaces );
- return executeCommandLine( show, null, stdout ) == 0 ? workSpaces : null;
- }
-
- public Stream showStream( String stream )
- throws AccuRevException
- {
- String[] show = { "show", "-s", stream, "-fx", "streams" };
- List<Stream> streams = new ArrayList<Stream>();
- StreamsConsumer stdout = new StreamsConsumer( getLogger(), streams );
-
- return executeCommandLine( show, null, stdout ) == 0 && streams.size() == 1 ? streams.get( 0 ) : null;
- }
-
- public String getExecutable()
- {
-
- return executable;
- }
-
- public String getClientVersion()
- throws AccuRevException
- {
-
- long lastModified = new File( getExecutable() ).lastModified();
- if ( clientVersion == null || executableModTime != lastModified )
- {
- executableModTime = lastModified;
-
- ClientVersionConsumer stdout = new ClientVersionConsumer();
- executeCommandLine( new String[] {}, null, stdout );
- clientVersion = stdout.getClientVersion();
- }
- return clientVersion;
-
- }
-
- public boolean syncReplica()
- throws AccuRevException
- {
- return executeCommandLine( new String[] { "replica", "sync" } );
- }
-
-}
diff --git a/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/cli/AnnotateConsumer.java b/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/cli/AnnotateConsumer.java
deleted file mode 100644
index 0816820..0000000
--- a/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/cli/AnnotateConsumer.java
+++ /dev/null
@@ -1,78 +0,0 @@
-package org.apache.maven.scm.provider.accurev.cli;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.util.Date;
-import java.util.List;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.apache.maven.scm.command.blame.BlameLine;
-import org.apache.maven.scm.log.ScmLogger;
-import org.apache.maven.scm.provider.accurev.AccuRev;
-import org.apache.maven.scm.util.AbstractConsumer;
-
-/**
- * @author Evgeny Mandrikov
- * @author Grant Gardner
- * @since 1.4
- */
-public class AnnotateConsumer
- extends AbstractConsumer
-{
-
- /* 3 godin 2009/11/18 16:26:33 */
- private static final Pattern LINE_PATTERN = Pattern.compile( "^\\s+(\\d+)\\s+(\\S+)\\s+([0-9/]+ [0-9:]+).*" );
-
- private List<BlameLine> lines;
-
- public AnnotateConsumer( List<BlameLine> lines, ScmLogger scmLogger )
- {
-
- super( scmLogger );
- this.lines = lines;
- }
-
- public void consumeLine( String line )
- {
-
- final Matcher matcher = LINE_PATTERN.matcher( line );
- if ( matcher.matches() )
- {
- String revision = matcher.group( 1 ).trim();
- String author = matcher.group( 2 ).trim();
- String dateStr = matcher.group( 3 ).trim();
-
- Date date = parseDate( dateStr, null, AccuRev.ACCUREV_TIME_FORMAT_STRING );
-
- lines.add( new BlameLine( date, revision, author ) );
- }
- else
- {
- throw new RuntimeException( "Unable to parse annotation from line: " + line );
- }
- }
-
- public List<BlameLine> getLines()
- {
-
- return lines;
- }
-}
diff --git a/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/cli/AuthTokenConsumer.java b/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/cli/AuthTokenConsumer.java
deleted file mode 100644
index 94f42e8..0000000
--- a/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/cli/AuthTokenConsumer.java
+++ /dev/null
@@ -1,55 +0,0 @@
-package org.apache.maven.scm.provider.accurev.cli;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.codehaus.plexus.util.StringUtils;
-import org.codehaus.plexus.util.cli.StreamConsumer;
-
-/**
- *
- */
-public class AuthTokenConsumer
- implements StreamConsumer
-{
-
- private static final Pattern TOKEN_PATTERN = Pattern.compile( "(?:Password:|)\\s*([0-9a-f]+).*" );
-
- private String authToken = null;
-
- public String getAuthToken()
- {
- return authToken;
- }
-
- public void consumeLine( String line )
- {
- if ( StringUtils.isBlank( authToken ) )
- {
- Matcher matcher = TOKEN_PATTERN.matcher( line );
- if ( matcher.matches() )
- {
- authToken = matcher.group( 1 );
- }
- }
- }
-}
diff --git a/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/cli/ClientVersionConsumer.java b/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/cli/ClientVersionConsumer.java
deleted file mode 100644
index 29335f3..0000000
--- a/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/cli/ClientVersionConsumer.java
+++ /dev/null
@@ -1,54 +0,0 @@
-package org.apache.maven.scm.provider.accurev.cli;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.codehaus.plexus.util.cli.StreamConsumer;
-
-/**
- *
- */
-public class ClientVersionConsumer
- implements StreamConsumer
-{
- private static final Pattern CLIENT_VERSION_PATTERN = Pattern.compile( "^AccuRev ([0-9a-z.]+) .*" );
-
- private String clientVersion;
-
- public void consumeLine( String line )
- {
- if ( clientVersion == null )
- {
- Matcher matcher = CLIENT_VERSION_PATTERN.matcher( line );
- if ( matcher.matches() )
- {
- clientVersion = matcher.group( 1 );
- }
- }
- }
-
- public String getClientVersion()
- {
- return clientVersion;
- }
-
-}
diff --git a/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/cli/CommandOutputConsumer.java b/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/cli/CommandOutputConsumer.java
deleted file mode 100644
index 0013574..0000000
--- a/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/cli/CommandOutputConsumer.java
+++ /dev/null
@@ -1,66 +0,0 @@
-package org.apache.maven.scm.provider.accurev.cli;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.io.IOException;
-
-import org.apache.maven.scm.log.ScmLogger;
-import org.codehaus.plexus.util.cli.StreamConsumer;
-
-/**
- *
- */
-public class CommandOutputConsumer
- implements StreamConsumer
-{
-
- private final ScmLogger logger;
-
- private StreamConsumer decorated;
-
- public CommandOutputConsumer( ScmLogger logger, StreamConsumer decorated )
- {
- this.decorated = decorated;
- this.logger = logger;
- }
-
- public void consumeLine( String line ) throws IOException
- {
- if ( logger.isDebugEnabled() )
- {
- logger.debug( line );
- }
-
- if ( decorated != null )
- {
- decorated.consumeLine( line );
- }
- }
-
- public void waitComplete()
- {
- if ( decorated instanceof XppStreamConsumer )
- {
- ( (XppStreamConsumer) decorated ).waitComplete();
- }
-
- }
-
-}
diff --git a/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/cli/DiffConsumer.java b/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/cli/DiffConsumer.java
deleted file mode 100644
index 068b375..0000000
--- a/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/cli/DiffConsumer.java
+++ /dev/null
@@ -1,79 +0,0 @@
-package org.apache.maven.scm.provider.accurev.cli;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.util.List;
-import java.util.Map;
-
-import org.apache.maven.scm.log.ScmLogger;
-import org.apache.maven.scm.provider.accurev.FileDifference;
-
-/**
- *
- */
-public class DiffConsumer
- extends XppStreamConsumer
-{
-
- private List<FileDifference> results;
-
- private FileDifference currentDifference;
-
- public DiffConsumer( ScmLogger logger, List<FileDifference> results )
- {
- super( logger );
- this.results = results;
- }
-
- @Override
- protected void startTag( List<String> tagPath, Map<String, String> attributes )
- {
- String tagName = getTagName( tagPath );
- if ( "Element".equals( tagName ) )
- {
- currentDifference = new FileDifference();
- }
- else if ( "Stream2".equals( tagName ) && attributes.get( "Name" ) != null )
- {
- currentDifference.setElementId( Long.parseLong( attributes.get( "eid" ) ) );
- currentDifference.setNewVersion( attributes.get( "Name" ), attributes.get( "Version" ) );
- }
- else if ( "Stream1".equals( tagName ) && attributes.get( "Name" ) != null )
- {
- currentDifference.setElementId( Long.parseLong( attributes.get( "eid" ) ) );
- currentDifference.setOldVersion( attributes.get( "Name" ), attributes.get( "Version" ) );
- }
-
- }
-
- @Override
- protected void endTag( List<String> tagPath )
- {
- String tagName = getTagName( tagPath );
- if ( "Element".equals( tagName ) )
- {
- if ( currentDifference.getNewFile() != null || currentDifference.getOldFile() != null )
- {
- results.add( currentDifference );
- }
- }
- }
-
-}
diff --git a/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/cli/ErrorConsumer.java b/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/cli/ErrorConsumer.java
deleted file mode 100644
index 31db5c9..0000000
--- a/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/cli/ErrorConsumer.java
+++ /dev/null
@@ -1,70 +0,0 @@
-package org.apache.maven.scm.provider.accurev.cli;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.util.regex.Pattern;
-
-import org.apache.maven.scm.log.ScmLogger;
-import org.codehaus.plexus.util.cli.StreamConsumer;
-
-/**
- *
- */
-final class ErrorConsumer
- implements StreamConsumer
-{
-
- private static final Pattern[] SKIPPED_WARNINGS = {
- Pattern.compile( ".*replica sync on the master server.*" ),
- Pattern.compile( "No elements selected.*" ),
- Pattern.compile( "You are not in a directory.*" ),
- Pattern.compile( "Note.*" ),
- Pattern.compile( "\\s+(members,|conjunction).*" ) };
-
- private final ScmLogger logger;
-
- private final StringBuilder errors;
-
- ErrorConsumer( ScmLogger logger, StringBuilder errors )
- {
- this.logger = logger;
- this.errors = errors;
- }
-
- public void consumeLine( String line )
- {
- errors.append( line );
- errors.append( '\n' );
-
- boolean matched = false;
-
- // if debugging log everything, otherwise log if doesn't match the skip patterns.
- int i = logger.isDebugEnabled() ? SKIPPED_WARNINGS.length : 0;
- while ( !matched && i < SKIPPED_WARNINGS.length )
- {
- matched = SKIPPED_WARNINGS[i++].matcher( line ).matches();
- }
-
- if ( !matched )
- {
- logger.warn( line );
- }
- }
-}
diff --git a/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/cli/FileConsumer.java b/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/cli/FileConsumer.java
deleted file mode 100644
index 64cc7d1..0000000
--- a/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/cli/FileConsumer.java
+++ /dev/null
@@ -1,83 +0,0 @@
-package org.apache.maven.scm.provider.accurev.cli;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.io.File;
-import java.util.List;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.codehaus.plexus.util.cli.StreamConsumer;
-
-/**
- *
- */
-class FileConsumer
- implements StreamConsumer
-{
- private Pattern filePattern;
-
- FileConsumer( List<File> matchedFilesAccumulator, Pattern filematcher )
- {
- this.matchedFiles = matchedFilesAccumulator;
- this.filePattern = filematcher;
- }
-
- private List<File> matchedFiles;
-
- // TODO make these an enum
- public static final Pattern ADD_PATTERN = Pattern.compile( "Added and kept element [/\\\\]\\.[/\\\\](\\S+)\\s*" );
-
- public static final Pattern UPDATE_PATTERN = Pattern
- .compile( "Updating element [/\\\\]\\.[/\\\\](\\S+)\\s*|Content.*of \"(.*)\".*" );
-
- public static final Pattern POPULATE_PATTERN = Pattern.compile( "Populating element [/\\\\]\\.[/\\\\](\\S+)\\s*" );
-
- public static final Pattern PROMOTE_PATTERN = Pattern.compile( "Promoted element [/\\\\]\\.[/\\\\](\\S+)\\s*" );
-
- public static final Pattern STAT_PATTERN = Pattern.compile( "[/\\\\]\\.[/\\\\](.*)" );
-
- /**
- * TODO - The removed files are relative to the workspace top, not the basedir of the fileset
- */
- public static final Pattern DEFUNCT_PATTERN = Pattern.compile( "Removing \"(\\S+)\".*" );
-
- public void consumeLine( String line )
- {
-
- Matcher m = filePattern.matcher( line );
- if ( m.matches() )
- {
-
- int i = 1;
- String fileName = null;
- while ( fileName == null && i <= m.groupCount() )
- {
- fileName = m.group( i++ );
- }
-
- if ( fileName != null )
- {
- matchedFiles.add( new File( fileName ) );
- }
- }
-
- }
-}
diff --git a/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/cli/HistoryConsumer.java b/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/cli/HistoryConsumer.java
deleted file mode 100644
index 6127a85..0000000
--- a/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/cli/HistoryConsumer.java
+++ /dev/null
@@ -1,116 +0,0 @@
-package org.apache.maven.scm.provider.accurev.cli;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.maven.scm.log.ScmLogger;
-import org.apache.maven.scm.provider.accurev.Transaction;
-
-/**
- *
- */
-public class HistoryConsumer
- extends XppStreamConsumer
-{
-
- private List<Transaction> transactions;
-
- private Transaction currentTran;
-
- private Long elementId;
-
- private String elementName;
-
- public HistoryConsumer( ScmLogger logger, List<Transaction> transactions )
- {
- super( logger );
- this.transactions = transactions;
- }
-
- @Override
- protected void startTag( List<String> tagPath, Map<String, String> attributes )
- {
- String tagName = getTagName( tagPath );
- if ( "transaction".equals( tagName ) )
- {
- Long id = Long.parseLong( attributes.get( "id" ) );
- Date when = new Date( Long.parseLong( attributes.get( "time" ) ) * 1000 );
- String tranType = attributes.get( "type" );
- String user = attributes.get( "user" );
- currentTran = new Transaction( id, when, tranType, user );
- transactions.add( currentTran );
-
- }
- else if ( "version".equals( tagName ) )
- {
- if ( currentTran != null )
- {
-
- if ( attributes.containsKey( "eid" ) )
- {
- elementId = Long.parseLong( attributes.get( "eid" ) );
- elementName = attributes.get( "path" );
- }
-
- String virtualSpec = attributes.get( "virtual" );
- String realSpec = attributes.get( "real" );
- String ancestor = attributes.get( "ancestor" );
-
- currentTran.addVersion( elementId, elementName, virtualSpec, realSpec, ancestor );
- }
- }
- else if ( "element".equals( tagName ) )
- {
- elementId = Long.parseLong( attributes.get( "eid" ) );
- elementName = attributes.get( "name" );
- }
- }
-
- @Override
- protected void endTag( List<String> tagPath )
- {
- String tagName = getTagName( tagPath );
- if ( "element".equals( tagName ) )
- {
- elementId = null;
- elementName = null;
- }
- else if ( "transaction".equals( tagName ) )
- {
- currentTran = null;
- }
-
- }
-
- @Override
- protected void text( List<String> tagPath, String text )
- {
- String tagName = getTagName( tagPath );
- if ( currentTran != null && "comment".equals( tagName ) )
- {
- currentTran.setComment( text );
- }
-
- }
-
-}
diff --git a/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/cli/InfoConsumer.java b/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/cli/InfoConsumer.java
deleted file mode 100644
index 4d6e57d..0000000
--- a/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/cli/InfoConsumer.java
+++ /dev/null
@@ -1,70 +0,0 @@
-package org.apache.maven.scm.provider.accurev.cli;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.apache.maven.scm.provider.accurev.AccuRevInfo;
-import org.codehaus.plexus.util.cli.StreamConsumer;
-
-/**
- *
- */
-public class InfoConsumer
- implements StreamConsumer
-{
-
- private AccuRevInfo info;
-
- public InfoConsumer( AccuRevInfo info )
- {
- this.info = info;
- }
-
- public void consumeLine( String line )
- {
- String[] tokens = line.split( "\\s*:\\s*", 2 );
- if ( tokens[0].equals( "Principal" ) )
- {
- info.setUser( tokens[1] );
- }
- else if ( tokens[0].equals( "Basis" ) )
- {
- info.setBasis( tokens[1] );
- }
- else if ( tokens[0].startsWith( "Workspace" ) )
- {
- info.setWorkSpace( tokens[1] );
- }
- else if ( tokens[0].equals( "Top" ) )
- {
- info.setTop( tokens[1] );
- }
-
- else if ( tokens[0].equals( "Server name" ) )
- {
- info.setServer( tokens[1] );
- }
- else if ( tokens[0].equals( "Port" ) )
- {
- info.setPort( Integer.parseInt( tokens[1] ) );
- }
-
- }
-
-}
diff --git a/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/cli/StatBackingConsumer.java b/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/cli/StatBackingConsumer.java
deleted file mode 100644
index 03a2e49..0000000
--- a/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/cli/StatBackingConsumer.java
+++ /dev/null
@@ -1,71 +0,0 @@
-package org.apache.maven.scm.provider.accurev.cli;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.io.File;
-import java.util.Collection;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.codehaus.plexus.util.cli.StreamConsumer;
-
-/**
- *
- */
-public class StatBackingConsumer
- implements StreamConsumer
-{
-
- private static final Pattern STAT_PATTERN = Pattern.compile( "\\s*(\\S+)\\s+.*\\(([^()]+)\\)\\s*" );
-
- private static final String NO_SUCH_ELEM = "no such elem";
-
- private Collection<File> memberElements;
-
- private Collection<File> nonMemberElements;
-
- public StatBackingConsumer( Collection<File> memberElements, Collection<File> nonMemberElements )
- {
- this.memberElements = memberElements;
- this.nonMemberElements = nonMemberElements;
- }
-
- public void consumeLine( String line )
- {
- // first group is the fileName
- // second group is the indicator expected "backed","stale","overlap","underlap","no such elem";
- Matcher matcher = STAT_PATTERN.matcher( line );
- if ( matcher.matches() )
- {
- File file = new File( matcher.group( 1 ) );
- String indicator = matcher.group( 2 );
- if ( NO_SUCH_ELEM.equals( indicator ) )
- {
- nonMemberElements.add( file );
- }
- else
- {
- memberElements.add( file );
- }
- }
-
- }
-
-}
diff --git a/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/cli/StatConsumer.java b/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/cli/StatConsumer.java
deleted file mode 100644
index 2ee29d8..0000000
--- a/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/cli/StatConsumer.java
+++ /dev/null
@@ -1,57 +0,0 @@
-package org.apache.maven.scm.provider.accurev.cli;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.util.List;
-import java.util.Map;
-
-import org.apache.maven.scm.log.ScmLogger;
-
-/**
- *
- */
-public class StatConsumer
- extends XppStreamConsumer
-{
-
- public StatConsumer( ScmLogger logger )
- {
- super( logger );
- }
-
- private static final String ELEMENT_TAG = "element";
-
- private String status = null;
-
- public String getStatus()
- {
- return status;
- }
-
- @Override
- protected void startTag( List<String> tagPath, Map<String, String> attributes )
- {
- int lastIndex = tagPath.size() - 1;
- if ( ELEMENT_TAG.equalsIgnoreCase( ( tagPath.get( lastIndex ) ) ) )
- {
- status = attributes.get( "status" );
- }
- }
-}
diff --git a/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/cli/StreamsConsumer.java b/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/cli/StreamsConsumer.java
deleted file mode 100644
index 2e22c6e..0000000
--- a/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/cli/StreamsConsumer.java
+++ /dev/null
@@ -1,61 +0,0 @@
-package org.apache.maven.scm.provider.accurev.cli;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.maven.scm.log.ScmLogger;
-import org.apache.maven.scm.provider.accurev.Stream;
-
-/**
- *
- */
-public class StreamsConsumer
- extends XppStreamConsumer
-{
-
- private List<Stream> streams;
-
- public StreamsConsumer( ScmLogger logger, List<Stream> streams )
- {
- super( logger );
- this.streams = streams;
- }
-
- @Override
- protected void startTag( List<String> tagPath, Map<String, String> attributes )
- {
- String tagName = getTagName( tagPath );
- if ( "stream".equals( tagName ) )
- {
- String name = attributes.get( "name" );
- long streamId = Long.parseLong( attributes.get( "streamNumber" ) );
- String basis = attributes.get( "basis" );
- String basisStreamNumber = attributes.get( "basisStreamNumber" );
- long basisStreamId = basisStreamNumber == null ? 0 : Long.parseLong( basisStreamNumber );
- String depot = attributes.get( "depotName" );
- Date startTime = new Date( Long.parseLong( attributes.get( "startTime" ) ) * 1000 );
- String streamType = attributes.get( "type" );
- streams.add( new Stream( name, streamId, basis, basisStreamId, depot, startTime, streamType ) );
- }
- }
-}
diff --git a/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/cli/WorkSpaceConsumer.java b/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/cli/WorkSpaceConsumer.java
deleted file mode 100644
index ebdd72c..0000000
--- a/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/cli/WorkSpaceConsumer.java
+++ /dev/null
@@ -1,55 +0,0 @@
-package org.apache.maven.scm.provider.accurev.cli;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.util.List;
-import java.util.Map;
-
-import org.apache.maven.scm.log.ScmLogger;
-import org.apache.maven.scm.provider.accurev.WorkSpace;
-
-/**
- *
- */
-public class WorkSpaceConsumer
- extends XppStreamConsumer
-{
-
- private Map<String, WorkSpace> workSpaces;
-
- public WorkSpaceConsumer( ScmLogger logger, Map<String, WorkSpace> workSpaces )
- {
- super( logger );
- this.workSpaces = workSpaces;
- }
-
- @Override
- protected void startTag( List<String> tagPath, Map<String, String> attributes )
- {
- if ( "Element".equals( getTagName( tagPath ) ) )
- {
- String name = attributes.get( "Name" );
- long transactionId = Long.valueOf( attributes.get( "Trans" ) );
- WorkSpace ws = new WorkSpace( name, transactionId );
- workSpaces.put( name, ws );
- }
- }
-
-}
diff --git a/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/cli/XppStreamConsumer.java b/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/cli/XppStreamConsumer.java
deleted file mode 100644
index 574e4a4..0000000
--- a/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/cli/XppStreamConsumer.java
+++ /dev/null
@@ -1,288 +0,0 @@
-package org.apache.maven.scm.provider.accurev.cli;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.io.IOException;
-import java.io.Reader;
-import java.io.Writer;
-import java.nio.channels.Channels;
-import java.nio.channels.Pipe;
-import java.nio.channels.Pipe.SinkChannel;
-import java.nio.channels.Pipe.SourceChannel;
-import java.nio.charset.Charset;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.maven.scm.log.ScmLogger;
-import org.codehaus.plexus.util.cli.StreamConsumer;
-import org.codehaus.plexus.util.xml.pull.MXParser;
-import org.codehaus.plexus.util.xml.pull.XmlPullParser;
-import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
-
-/**
- * This class is required because Plexus command line won't let you get to the process stream output process.
- *
- * @author ggardner
- */
-public abstract class XppStreamConsumer
- extends Thread
- implements StreamConsumer
-
-{
- public ScmLogger getLogger()
- {
- return logger;
- }
-
- private Writer writer;
-
- private XmlPullParser parser = new MXParser();
-
- private volatile boolean complete = false;
-
- private ScmLogger logger;
-
- private int lineCount = 0;
-
- private Reader reader;
-
- public XppStreamConsumer( ScmLogger logger )
- {
-
- super();
- this.logger = logger;
- try
- {
- Pipe p = Pipe.open();
- SinkChannel sink = p.sink();
- SourceChannel source = p.source();
- writer = Channels.newWriter( sink, Charset.defaultCharset().name() );
- reader = Channels.newReader( source, Charset.defaultCharset().name() );
- parser.setInput( reader );
-
- }
- catch ( Exception e )
- {
- logger.error( "Exception initialising pipe", e );
- }
-
- }
-
- public final void consumeLine( String line )
- {
- // Do not debug line here - as CommandOutputConsumer wraps this and uses
- // the same logger
- try
- {
- writer.append( line );
- if ( lineCount == 0 )
- {
- this.start();
- }
- lineCount++;
- writer.flush();
- }
- catch ( IOException e )
- {
- throw new RuntimeException( "error pumping line to pipe", e );
- }
-
- }
-
- @Override
- public void run()
- {
-
- try
- {
- parse( parser );
- }
- catch ( Exception e )
- {
- caughtParseException( e );
- }
- finally
- {
- synchronized ( this )
- {
-
- try
- {
- reader.close();
- }
- catch ( IOException e )
- {
- getLogger().warn( "Error closing pipe reader", e );
- }
-
- complete = true;
- this.notifyAll();
- }
- }
- }
-
- protected void caughtParseException( Exception e )
- {
- logger.warn( "Exception parsing input", e );
-
- }
-
- protected void parse( XmlPullParser p )
- throws XmlPullParserException, IOException
- {
- List<String> tagPath = new ArrayList<String>();
- int eventType = p.getEventType();
- if ( logger.isDebugEnabled() )
- {
- logger.debug( "Event " + eventType );
- }
-
- while ( eventType != XmlPullParser.END_DOCUMENT )
- {
- int lastIndex = tagPath.size() - 1;
- String tagName;
- switch ( eventType )
- {
- case XmlPullParser.START_DOCUMENT:
-
- break;
-
- case XmlPullParser.START_TAG:
- tagName = p.getName();
- if ( tagName != null )
- {
- tagPath.add( tagName );
- int attributeCount = p.getAttributeCount();
- Map<String, String> attributes = new HashMap<String, String>( Math.max( attributeCount, 0 ) );
- for ( int i = 0; i < attributeCount; i++ )
- {
- attributes.put( p.getAttributeName( i ), p.getAttributeValue( i ) );
- }
-
- startTag( tagPath, attributes );
- }
- break;
-
- case XmlPullParser.TEXT:
- if ( !p.isWhitespace() )
- {
- String text = p.getText();
- text( tagPath, text );
- }
- break;
-
- case XmlPullParser.END_TAG:
- tagName = p.getName();
-
- if ( lastIndex < 0 || !tagName.equals( tagPath.get( lastIndex ) ) )
- {
- logger.warn( "Bad tag path: " + Arrays.toString( tagPath.toArray() ) );
- }
- endTag( tagPath );
- tagPath.remove( lastIndex );
- break;
-
- default:
- logger.warn( "Unexpected event type " + eventType );
- break;
- }
- p.next();
- eventType = p.getEventType();
- if ( logger.isDebugEnabled() )
- {
- logger.debug( "Event " + eventType );
- }
- }
- }
-
- /**
- * close the input and wait for parsing to complete
- */
- public void waitComplete()
- {
- Thread.yield();
- try
- {
- writer.close();
- }
- catch ( IOException e1 )
- {
- logger.warn( "Exception flushing output", e1 );
- }
-
- while ( !isComplete() )
- {
- synchronized ( this )
- {
- try
- {
- if ( !isComplete() )
- {
- this.wait( 1000 );
- }
- }
- catch ( Exception e )
- {
- logger.warn( e );
- }
- }
- }
-
- }
-
- private boolean isComplete()
- {
- return complete || lineCount == 0;
- }
-
- protected void startTag( List<String> tagPath, Map<String, String> attributes )
- {
- if ( logger.isDebugEnabled() )
- {
- String tagName = getTagName( tagPath );
- logger.debug( "START_TAG: " + tagName + "(" + attributes.size() + ")" );
- }
- }
-
- protected static String getTagName( List<String> tagPath )
- {
- return tagPath.size() == 0 ? null : tagPath.get( tagPath.size() - 1 );
- }
-
- protected void endTag( List<String> tagPath )
- {
- if ( logger.isDebugEnabled() )
- {
- logger.debug( "END_TAG: " + getTagName( tagPath ) );
- }
- }
-
- protected void text( List<String> tagPath, String text )
- {
- if ( logger.isDebugEnabled() )
- {
- logger.debug( "TEXT: " + text );
- }
- }
-
-}
diff --git a/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/command/AbstractAccuRevCommand.java b/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/command/AbstractAccuRevCommand.java
deleted file mode 100644
index ee3824d..0000000
--- a/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/command/AbstractAccuRevCommand.java
+++ /dev/null
@@ -1,88 +0,0 @@
-package org.apache.maven.scm.provider.accurev.command;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.maven.scm.CommandParameters;
-import org.apache.maven.scm.ScmException;
-import org.apache.maven.scm.ScmFile;
-import org.apache.maven.scm.ScmFileSet;
-import org.apache.maven.scm.ScmFileStatus;
-import org.apache.maven.scm.ScmResult;
-import org.apache.maven.scm.command.AbstractCommand;
-import org.apache.maven.scm.log.ScmLogger;
-import org.apache.maven.scm.provider.ScmProviderRepository;
-import org.apache.maven.scm.provider.accurev.AccuRevException;
-import org.apache.maven.scm.provider.accurev.AccuRevScmProviderRepository;
-
-/**
- *
- */
-public abstract class AbstractAccuRevCommand
- extends AbstractCommand
-{
-
- public AbstractAccuRevCommand( ScmLogger logger )
- {
- super();
- setLogger( logger );
- }
-
- protected abstract ScmResult executeAccurevCommand( AccuRevScmProviderRepository repository, ScmFileSet fileSet,
- CommandParameters parameters )
- throws ScmException, AccuRevException;
-
- protected final ScmResult executeCommand( ScmProviderRepository repository, ScmFileSet fileSet,
- CommandParameters parameters )
- throws ScmException
- {
-
- if ( !( repository instanceof AccuRevScmProviderRepository ) )
- {
- throw new ScmException( "Not an AccuRev repository " + repository );
- }
-
- AccuRevScmProviderRepository accuRevRepository = (AccuRevScmProviderRepository) repository;
- accuRevRepository.getAccuRev().reset();
- try
- {
- return executeAccurevCommand( accuRevRepository, fileSet, parameters );
- }
- catch ( AccuRevException e )
- {
- throw new ScmException( "Error invoking AccuRev command", e );
- }
- }
-
- protected static List<ScmFile> getScmFiles( final List<File> files, ScmFileStatus status )
- {
- ArrayList<ScmFile> resultFiles = new ArrayList<ScmFile>( files.size() );
- for ( File addedFile : files )
- {
- // TODO paths are relative to the workspace dir, should be made relative to project path.
- resultFiles.add( new ScmFile( addedFile.getPath(), status ) );
- }
- return resultFiles;
- }
-
-}
\ No newline at end of file
diff --git a/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/command/AbstractAccuRevExtractSourceCommand.java b/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/command/AbstractAccuRevExtractSourceCommand.java
deleted file mode 100644
index 523abd2..0000000
--- a/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/command/AbstractAccuRevExtractSourceCommand.java
+++ /dev/null
@@ -1,92 +0,0 @@
-package org.apache.maven.scm.provider.accurev.command;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.io.File;
-import java.util.List;
-
-import org.apache.maven.scm.CommandParameter;
-import org.apache.maven.scm.CommandParameters;
-import org.apache.maven.scm.ScmException;
-import org.apache.maven.scm.ScmFile;
-import org.apache.maven.scm.ScmFileSet;
-import org.apache.maven.scm.ScmFileStatus;
-import org.apache.maven.scm.ScmResult;
-import org.apache.maven.scm.ScmVersion;
-import org.apache.maven.scm.log.ScmLogger;
-import org.apache.maven.scm.provider.accurev.AccuRevException;
-import org.apache.maven.scm.provider.accurev.AccuRevScmProviderRepository;
-import org.apache.maven.scm.provider.accurev.AccuRevVersion;
-
-/**
- *
- */
-public abstract class AbstractAccuRevExtractSourceCommand
- extends AbstractAccuRevCommand
-{
-
- public AbstractAccuRevExtractSourceCommand( ScmLogger logger )
- {
- super( logger );
- }
-
- @Override
- protected ScmResult executeAccurevCommand( AccuRevScmProviderRepository repository, ScmFileSet fileSet,
- CommandParameters parameters )
- throws ScmException, AccuRevException
- {
-
- ScmVersion scmVersion = parameters.getScmVersion( CommandParameter.SCM_VERSION, null );
-
-
- File basedir = fileSet.getBasedir();
- String outputDirectory = parameters.getString( CommandParameter.OUTPUT_DIRECTORY, null );
- if ( outputDirectory != null )
- {
- basedir = new File( outputDirectory );
- }
-
- if ( !basedir.exists() )
- {
- basedir.mkdirs();
- }
-
- if ( !basedir.isDirectory() || basedir.list().length != 0 )
- {
- throw new ScmException( "Checkout directory " + basedir.getAbsolutePath() + " not empty" );
- }
-
- AccuRevVersion accuRevVersion = repository.getAccuRevVersion( scmVersion );
-
- List<File> checkedOutFiles = extractSource( repository, basedir, accuRevVersion );
- List<ScmFile> scmFiles =
- checkedOutFiles == null ? null : getScmFiles( checkedOutFiles, ScmFileStatus.CHECKED_OUT );
-
- return getScmResult( repository, scmFiles, scmVersion );
-
- }
-
- protected abstract ScmResult getScmResult( AccuRevScmProviderRepository repository, List<ScmFile> scmFiles,
- ScmVersion scmVersion );
-
- protected abstract List<File> extractSource( AccuRevScmProviderRepository repository, File basedir,
- AccuRevVersion version )
- throws AccuRevException;
-}
\ No newline at end of file
diff --git a/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/command/add/AccuRevAddCommand.java b/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/command/add/AccuRevAddCommand.java
deleted file mode 100644
index bc18427..0000000
--- a/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/command/add/AccuRevAddCommand.java
+++ /dev/null
@@ -1,89 +0,0 @@
-package org.apache.maven.scm.provider.accurev.command.add;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.io.File;
-import java.util.List;
-
-import org.apache.maven.scm.CommandParameter;
-import org.apache.maven.scm.CommandParameters;
-import org.apache.maven.scm.ScmException;
-import org.apache.maven.scm.ScmFile;
-import org.apache.maven.scm.ScmFileSet;
-import org.apache.maven.scm.ScmFileStatus;
-import org.apache.maven.scm.ScmResult;
-import org.apache.maven.scm.command.add.AddScmResult;
-import org.apache.maven.scm.log.ScmLogger;
-import org.apache.maven.scm.provider.ScmProviderRepository;
-import org.apache.maven.scm.provider.accurev.AccuRev;
-import org.apache.maven.scm.provider.accurev.AccuRevException;
-import org.apache.maven.scm.provider.accurev.AccuRevScmProviderRepository;
-import org.apache.maven.scm.provider.accurev.command.AbstractAccuRevCommand;
-
-/**
- *
- */
-public class AccuRevAddCommand
- extends AbstractAccuRevCommand
-{
-
- public AccuRevAddCommand( ScmLogger logger )
- {
- super( logger );
- }
-
- /**
- * Add.
- *
- * @todo handle the "binary" parameter. AccuRev does a reasonable job of detecting this itself.
- */
- protected ScmResult executeAccurevCommand( AccuRevScmProviderRepository repository, ScmFileSet fileSet,
- CommandParameters parameters )
- throws ScmException, AccuRevException
- {
-
- AccuRev accuRev = repository.getAccuRev();
-
- String message = parameters.getString( CommandParameter.MESSAGE, "" );
-
- File basedir = fileSet.getBasedir();
-
- List<File> relativeFiles = fileSet.getFileList();
-
- List<File> addedFiles = accuRev.add( basedir, relativeFiles, message );
-
- if ( addedFiles != null )
- {
- List<ScmFile> resultFiles = getScmFiles( addedFiles, ScmFileStatus.ADDED );
- return new AddScmResult( accuRev.getCommandLines(), resultFiles );
- }
- else
- {
- return new AddScmResult( accuRev.getCommandLines(), "AccuRev Error", accuRev.getErrorOutput(), false );
- }
- }
-
- public AddScmResult add( ScmProviderRepository repo, ScmFileSet scmFileSet, CommandParameters commandParameters )
- throws ScmException
- {
- return (AddScmResult) execute( repo, scmFileSet, commandParameters );
- }
-
-}
diff --git a/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/command/blame/AccuRevBlameCommand.java b/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/command/blame/AccuRevBlameCommand.java
deleted file mode 100644
index 009808c..0000000
--- a/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/command/blame/AccuRevBlameCommand.java
+++ /dev/null
@@ -1,80 +0,0 @@
-package org.apache.maven.scm.provider.accurev.command.blame;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.apache.maven.scm.CommandParameter;
-import org.apache.maven.scm.CommandParameters;
-import org.apache.maven.scm.ScmException;
-import org.apache.maven.scm.ScmFileSet;
-import org.apache.maven.scm.command.blame.BlameLine;
-import org.apache.maven.scm.command.blame.BlameScmResult;
-import org.apache.maven.scm.log.ScmLogger;
-import org.apache.maven.scm.provider.ScmProviderRepository;
-import org.apache.maven.scm.provider.accurev.AccuRev;
-import org.apache.maven.scm.provider.accurev.AccuRevException;
-import org.apache.maven.scm.provider.accurev.AccuRevScmProviderRepository;
-import org.apache.maven.scm.provider.accurev.command.AbstractAccuRevCommand;
-
-import java.io.File;
-import java.util.List;
-
-/**
- * @author Evgeny Mandrikov
- * @author Grant Gardner
- * @since 1.4
- */
-public class AccuRevBlameCommand
- extends AbstractAccuRevCommand
-{
-
- public AccuRevBlameCommand( ScmLogger logger )
- {
- super( logger );
- }
-
- @Override
- protected BlameScmResult executeAccurevCommand( AccuRevScmProviderRepository repository, ScmFileSet fileSet,
- CommandParameters parameters )
- throws ScmException, AccuRevException
- {
-
- AccuRev accuRev = repository.getAccuRev();
-
- File file = new File( parameters.getString( CommandParameter.FILE ) );
-
- List<BlameLine> lines = accuRev.annotate( fileSet.getBasedir(), file );
-
- if ( lines != null )
- {
- return new BlameScmResult( accuRev.getCommandLines(), lines );
- }
- else
- {
- return new BlameScmResult( accuRev.getCommandLines(), "AccuRev Error", accuRev.getErrorOutput(), false );
- }
-
- }
-
- public BlameScmResult blame( ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters )
- throws ScmException
- {
- return (BlameScmResult) execute( repository, fileSet, parameters );
- }
-}
diff --git a/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/command/changelog/AccuRevChangeLogCommand.java b/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/command/changelog/AccuRevChangeLogCommand.java
deleted file mode 100644
index db149cc..0000000
--- a/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/command/changelog/AccuRevChangeLogCommand.java
+++ /dev/null
@@ -1,420 +0,0 @@
-package org.apache.maven.scm.provider.accurev.command.changelog;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Objects;
-
-import org.apache.maven.scm.ChangeFile;
-import org.apache.maven.scm.ChangeSet;
-import org.apache.maven.scm.CommandParameter;
-import org.apache.maven.scm.CommandParameters;
-import org.apache.maven.scm.ScmBranch;
-import org.apache.maven.scm.ScmException;
-import org.apache.maven.scm.ScmFileSet;
-import org.apache.maven.scm.ScmResult;
-import org.apache.maven.scm.ScmRevision;
-import org.apache.maven.scm.ScmVersion;
-import org.apache.maven.scm.command.changelog.ChangeLogScmResult;
-import org.apache.maven.scm.command.changelog.ChangeLogSet;
-import org.apache.maven.scm.log.ScmLogger;
-import org.apache.maven.scm.provider.ScmProviderRepository;
-import org.apache.maven.scm.provider.accurev.AccuRev;
-import org.apache.maven.scm.provider.accurev.AccuRevCapability;
-import org.apache.maven.scm.provider.accurev.AccuRevException;
-import org.apache.maven.scm.provider.accurev.AccuRevScmProviderRepository;
-import org.apache.maven.scm.provider.accurev.AccuRevVersion;
-import org.apache.maven.scm.provider.accurev.FileDifference;
-import org.apache.maven.scm.provider.accurev.Stream;
-import org.apache.maven.scm.provider.accurev.Transaction;
-import org.apache.maven.scm.provider.accurev.Transaction.Version;
-import org.apache.maven.scm.provider.accurev.command.AbstractAccuRevCommand;
-import org.codehaus.plexus.util.StringUtils;
-
-/**
- * TODO filter results based on project_path Find appropriate start and end transaction ids from parameters. Streams
- * must be the same. Diff on stream start to end - these are the upstream changes Hist on the stream start+1 to end
- * remove items from the upstream set if they appear in the history For workspaces diff doesn't work. So we would not
- * pickup any upstream changes, just the "keep" transactions which is not very useful. Hist on the workspace Then diff /
- * hist on the basis stream, skipping any transactions that are coming from the workspace.
- *
- * @author ggardner
- */
-public class AccuRevChangeLogCommand
- extends AbstractAccuRevCommand
-{
-
- public AccuRevChangeLogCommand( ScmLogger logger )
- {
- super( logger );
- }
-
- @Override
- protected ScmResult executeAccurevCommand( AccuRevScmProviderRepository repository, ScmFileSet fileSet,
- CommandParameters parameters )
- throws ScmException, AccuRevException
- {
-
- // Do we have a supplied branch. If not we default to the URL stream.
- ScmBranch branch = (ScmBranch) parameters.getScmVersion( CommandParameter.BRANCH, null );
- AccuRevVersion branchVersion = repository.getAccuRevVersion( branch );
- String stream = branchVersion.getBasisStream();
- String fromSpec = branchVersion.getTimeSpec();
- String toSpec = "highest";
-
- // Versions
- ScmVersion startVersion = parameters.getScmVersion( CommandParameter.START_SCM_VERSION, null );
- ScmVersion endVersion = parameters.getScmVersion( CommandParameter.END_SCM_VERSION, null );
-
- if ( startVersion != null && StringUtils.isNotEmpty( startVersion.getName() ) )
- {
- AccuRevVersion fromVersion = repository.getAccuRevVersion( startVersion );
- // if no end version supplied then use same basis as startVersion
- AccuRevVersion toVersion =
- endVersion == null ? new AccuRevVersion( fromVersion.getBasisStream(), "now" )
- : repository.getAccuRevVersion( endVersion );
-
- if ( !Objects.equals( fromVersion.getBasisStream(), toVersion.getBasisStream() ) )
- {
- throw new AccuRevException( "Not able to provide change log between different streams " + fromVersion
- + "," + toVersion );
- }
-
- stream = fromVersion.getBasisStream();
- fromSpec = fromVersion.getTimeSpec();
- toSpec = toVersion.getTimeSpec();
-
- }
-
- Date startDate = parameters.getDate( CommandParameter.START_DATE, null );
- Date endDate = parameters.getDate( CommandParameter.END_DATE, null );
- int numDays = parameters.getInt( CommandParameter.NUM_DAYS, 0 );
-
- if ( numDays > 0 )
- {
- if ( ( startDate != null || endDate != null ) )
- {
- throw new ScmException( "Start or end date cannot be set if num days is set." );
- }
- // Last x days.
- int day = 24 * 60 * 60 * 1000;
- startDate = new Date( System.currentTimeMillis() - (long) numDays * day );
- endDate = new Date( System.currentTimeMillis() + day );
- }
-
- if ( endDate != null && startDate == null )
- {
- throw new ScmException( "The end date is set but the start date isn't." );
- }
-
- // Date parameters override transaction ids in versions
- if ( startDate != null )
- {
- fromSpec = AccuRevScmProviderRepository.formatTimeSpec( startDate );
- }
- else if ( fromSpec == null )
- {
- fromSpec = "1";
- }
-
- // Convert the fromSpec to both a date AND a transaction id by looking up
- // the nearest transaction in the depot.
- Transaction fromTransaction = getDepotTransaction( repository, stream, fromSpec );
-
- long fromTranId = 1;
- if ( fromTransaction != null )
- {
- // This tran id is less than or equal to the date/tranid we requested.
- fromTranId = fromTransaction.getTranId();
- if ( startDate == null )
- {
- startDate = fromTransaction.getWhen();
- }
- }
-
- if ( endDate != null )
- {
- toSpec = AccuRevScmProviderRepository.formatTimeSpec( endDate );
- }
- else if ( toSpec == null )
- {
- toSpec = "highest";
- }
-
- Transaction toTransaction = getDepotTransaction( repository, stream, toSpec );
- long toTranId = 1;
- if ( toTransaction != null )
- {
- toTranId = toTransaction.getTranId();
- if ( endDate == null )
- {
- endDate = toTransaction.getWhen();
- }
- }
- startVersion = new ScmRevision( repository.getRevision( stream, fromTranId ) );
- endVersion = new ScmRevision( repository.getRevision( stream, toTranId ) );
-
- //TODO Split this method in two here. above to convert params to start and end (stream,tranid,date) and test independantly
-
- List<Transaction> streamHistory = Collections.emptyList();
- List<Transaction> workspaceHistory = Collections.emptyList();
- List<FileDifference> streamDifferences = Collections.emptyList();
-
- StringBuilder errorMessage = new StringBuilder();
-
- AccuRev accurev = repository.getAccuRev();
-
- Stream changelogStream = accurev.showStream( stream );
- if ( changelogStream == null )
- {
- errorMessage.append( "Unknown accurev stream -" ).append( stream ).append( "." );
- }
- else
- {
-
- String message =
- "Changelog on stream " + stream + "(" + changelogStream.getStreamType() + ") from " + fromTranId + " ("
- + startDate + "), to " + toTranId + " (" + endDate + ")";
-
- if ( startDate != null && startDate.after( endDate ) || fromTranId >= toTranId )
- {
- getLogger().warn( "Skipping out of range " + message );
- }
- else
- {
-
- getLogger().info( message );
-
- // In 4.7.2 and higher we have a diff command that will list all the file differences in a stream
- // and thus can be used to detect upstream changes
- // Unfortunately diff -v -V -t does not work in workspaces.
- Stream diffStream = changelogStream;
- if ( changelogStream.isWorkspace() )
- {
-
- workspaceHistory =
- accurev.history( stream, Long.toString( fromTranId + 1 ), Long.toString( toTranId ), 0, false,
- false );
-
- if ( workspaceHistory == null )
- {
- errorMessage.append( "history on workspace " + stream + " from " + fromTranId + 1 + " to "
- + toTranId + " failed." );
-
- }
-
- // do the diff/hist on the basis stream instead.
- stream = changelogStream.getBasis();
- diffStream = accurev.showStream( stream );
-
- }
-
- if ( AccuRevCapability.DIFF_BETWEEN_STREAMS.isSupported( accurev.getClientVersion() ) )
- {
- if ( startDate.before( diffStream.getStartDate() ) )
- {
- getLogger().warn( "Skipping diff of " + stream + " due to start date out of range" );
- }
- else
- {
- streamDifferences =
- accurev.diff( stream, Long.toString( fromTranId ), Long.toString( toTranId ) );
- if ( streamDifferences == null )
- {
- errorMessage.append( "Diff " + stream + "- " + fromTranId + " to " + toTranId + "failed." );
- }
- }
- }
-
- // History needs to start from the transaction after our starting transaction
-
- streamHistory =
- accurev.history( stream, Long.toString( fromTranId + 1 ), Long.toString( toTranId ), 0, false,
- false );
- if ( streamHistory == null )
- {
- errorMessage.append( "history on stream " + stream + " from " + fromTranId + 1 + " to " + toTranId
- + " failed." );
- }
-
- }
- }
-
- String errorString = errorMessage.toString();
- if ( StringUtils.isBlank( errorString ) )
- {
- ChangeLogSet changeLog =
- getChangeLog( changelogStream, streamDifferences, streamHistory, workspaceHistory, startDate, endDate );
-
- changeLog.setEndVersion( endVersion );
- changeLog.setStartVersion( startVersion );
-
- return new ChangeLogScmResult( accurev.getCommandLines(), changeLog );
- }
- else
- {
- return new ChangeLogScmResult( accurev.getCommandLines(), "AccuRev errors: " + errorMessage,
- accurev.getErrorOutput(), false );
- }
-
- }
-
- private Transaction getDepotTransaction( AccuRevScmProviderRepository repo, String stream, String tranSpec )
- throws AccuRevException
- {
- return repo.getDepotTransaction( stream, tranSpec );
- }
-
- private ChangeLogSet getChangeLog( Stream stream, List<FileDifference> streamDifferences,
- List<Transaction> streamHistory, List<Transaction> workspaceHistory,
- Date startDate, Date endDate )
- {
-
- // Collect all the "to" versions from the streamDifferences into a Map by element id
- // If that version is seen in the promote/keep history then we move it from the map
- // At the end we create a pseudo ChangeSet for any remaining entries in the map as
- // representing "upstream changes"
- Map<Long, FileDifference> differencesMap = new HashMap<Long, FileDifference>();
- for ( FileDifference fileDifference : streamDifferences )
- {
- differencesMap.put( fileDifference.getElementId(), fileDifference );
- }
-
- List<Transaction> mergedHistory = new ArrayList<Transaction>( streamHistory );
- // will never match a version
- String streamPrefix = "/";
-
- mergedHistory.addAll( workspaceHistory );
- streamPrefix = stream.getId() + "/";
-
- List<ChangeSet> entries = new ArrayList<ChangeSet>( streamHistory.size() );
- for ( Transaction t : mergedHistory )
- {
- if ( ( startDate != null && t.getWhen().before( startDate ) )
- || ( endDate != null && t.getWhen().after( endDate ) ) )
- {
- // This is possible if dates and transactions are mixed in the time spec.
- continue;
- }
-
- // Needed to make Tck test pass against accurev > 4.7.2 - the changelog only expects to deal with
- // files. Stream changes and cross links are important entries in the changelog.
- // However we should only see mkstream once and it is irrelevant given we are interrogating
- // the history of this stream.
- if ( "mkstream".equals( t.getTranType() ) )
- {
- continue;
- }
-
- Collection<Version> versions = t.getVersions();
- List<ChangeFile> files = new ArrayList<ChangeFile>( versions.size() );
-
- for ( Version v : versions )
- {
-
- // Remove diff representing this promote
- FileDifference difference = differencesMap.get( v.getElementId() );
- // TODO: how are defuncts shown in the version history?
- if ( difference != null )
- {
- String newVersionSpec = difference.getNewVersionSpec();
- if ( newVersionSpec != null && newVersionSpec.equals( v.getRealSpec() ) )
- {
- if ( getLogger().isDebugEnabled() )
- {
- getLogger().debug( "Removing difference for " + v );
- }
- differencesMap.remove( v.getElementId() );
- }
- }
-
- // Add this file, unless the virtual version indicates this is the basis stream, and the real
- // version came from our workspace stream (ie, this transaction is a promote from the workspace
- // to its basis stream, and is therefore NOT a change
- if ( v.getRealSpec().startsWith( streamPrefix ) && !v.getVirtualSpec().startsWith( streamPrefix ) )
- {
- if ( getLogger().isDebugEnabled() )
- {
- getLogger().debug( "Skipping workspace to basis stream promote " + v );
- }
- }
- else
- {
- ChangeFile f =
- new ChangeFile( v.getElementName(), v.getVirtualSpec() + " (" + v.getRealSpec() + ")" );
- files.add( f );
- }
-
- }
-
- if ( versions.isEmpty() || !files.isEmpty() )
- {
- ChangeSet changeSet = new ChangeSet( t.getWhen(), t.getComment(), t.getAuthor(), files );
-
- entries.add( changeSet );
- }
- else
- {
- if ( getLogger().isDebugEnabled() )
- {
- getLogger().debug( "All versions removed for " + t );
- }
- }
-
- }
-
- // Anything left in the differencesMap represents a change from a higher stream
- // We don't have details on who or where these came from, but it is important to
- // detect these for CI tools like Continuum
- if ( !differencesMap.isEmpty() )
- {
- List<ChangeFile> upstreamFiles = new ArrayList<ChangeFile>();
- for ( FileDifference difference : differencesMap.values() )
- {
- if ( difference.getNewVersionSpec() != null )
- {
- upstreamFiles.add( new ChangeFile( difference.getNewFile().getPath(),
- difference.getNewVersionSpec() ) );
- }
- else
- {
- // difference is a deletion
- upstreamFiles.add( new ChangeFile( difference.getOldFile().getPath(), null ) );
- }
- }
- entries.add( new ChangeSet( endDate, "Upstream changes", "various", upstreamFiles ) );
- }
-
- return new ChangeLogSet( entries, startDate, endDate );
- }
-
- public ChangeLogScmResult changelog( ScmProviderRepository repo, ScmFileSet testFileSet, CommandParameters params )
- throws ScmException
- {
- return (ChangeLogScmResult) execute( repo, testFileSet, params );
- }
-
-}
diff --git a/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/command/checkin/AccuRevCheckInCommand.java b/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/command/checkin/AccuRevCheckInCommand.java
deleted file mode 100644
index e147622..0000000
--- a/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/command/checkin/AccuRevCheckInCommand.java
+++ /dev/null
@@ -1,117 +0,0 @@
-package org.apache.maven.scm.provider.accurev.command.checkin;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.io.File;
-import java.util.Iterator;
-import java.util.List;
-
-import org.apache.maven.scm.CommandParameter;
-import org.apache.maven.scm.CommandParameters;
-import org.apache.maven.scm.ScmException;
-import org.apache.maven.scm.ScmFileSet;
-import org.apache.maven.scm.ScmFileStatus;
-import org.apache.maven.scm.ScmResult;
-import org.apache.maven.scm.command.checkin.CheckInScmResult;
-import org.apache.maven.scm.log.ScmLogger;
-import org.apache.maven.scm.provider.ScmProviderRepository;
-import org.apache.maven.scm.provider.accurev.AccuRev;
-import org.apache.maven.scm.provider.accurev.AccuRevException;
-import org.apache.maven.scm.provider.accurev.AccuRevInfo;
-import org.apache.maven.scm.provider.accurev.AccuRevScmProviderRepository;
-import org.apache.maven.scm.provider.accurev.command.AbstractAccuRevCommand;
-
-/**
- *
- */
-public class AccuRevCheckInCommand
- extends AbstractAccuRevCommand
-{
-
- public AccuRevCheckInCommand( ScmLogger logger )
- {
- super( logger );
- }
-
- @Override
- protected ScmResult executeAccurevCommand( AccuRevScmProviderRepository repository, ScmFileSet fileSet,
- CommandParameters parameters )
- throws ScmException, AccuRevException
- {
-
- AccuRev accuRev = repository.getAccuRev();
-
- String message = parameters.getString( CommandParameter.MESSAGE );
- List<File> promotedFiles = null;
-
- File basedir = fileSet.getBasedir();
- List<File> fileList = fileSet.getFileList();
-
- if ( fileList.isEmpty() )
- {
- // TODO the above test will be matched by a fileset where excludes and includes produce a set with no files.
- // This is
- // NOT the same as a fileset created with only a base directory. Raise maven-scm JIRA for this.
- AccuRevInfo info = accuRev.info( basedir );
-
- if ( repository.isWorkSpaceRoot( info ) )
- {
- promotedFiles = accuRev.promoteAll( basedir, message );
- }
- else
- {
- throw new ScmException( String.format( "Unsupported recursive checkin for %s. Not the workspace root",
- basedir.getAbsolutePath() ) );
- }
- }
- else
- {
- promotedFiles = accuRev.promote( basedir, fileList, message );
- }
-
-
- if ( promotedFiles != null )
- {
- Iterator<File> iter = promotedFiles.iterator();
- while ( iter.hasNext() )
- {
- if ( new File( basedir, iter.next().getPath() ).isDirectory() )
- {
- iter.remove();
- }
- }
- // TODO capture the transaction id from the promote
- return new CheckInScmResult( accuRev.getCommandLines(), getScmFiles( promotedFiles,
- ScmFileStatus.CHECKED_IN ) );
- }
- else
- {
- return new CheckInScmResult( accuRev.getCommandLines(), "AccuRev Error", accuRev.getErrorOutput(), false );
- }
- }
-
- public CheckInScmResult checkIn( ScmProviderRepository repository, ScmFileSet fileSet,
- CommandParameters parameters )
- throws ScmException
- {
- return (CheckInScmResult) execute( repository, fileSet, parameters );
- }
-
-}
diff --git a/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/command/checkout/AccuRevCheckOutCommand.java b/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/command/checkout/AccuRevCheckOutCommand.java
deleted file mode 100644
index 9639941..0000000
--- a/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/command/checkout/AccuRevCheckOutCommand.java
+++ /dev/null
@@ -1,179 +0,0 @@
-package org.apache.maven.scm.provider.accurev.command.checkout;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.maven.scm.CommandParameters;
-import org.apache.maven.scm.ScmException;
-import org.apache.maven.scm.ScmFile;
-import org.apache.maven.scm.ScmFileSet;
-import org.apache.maven.scm.ScmResult;
-import org.apache.maven.scm.ScmVersion;
-import org.apache.maven.scm.command.checkout.CheckOutScmResult;
-import org.apache.maven.scm.log.ScmLogger;
-import org.apache.maven.scm.provider.ScmProviderRepository;
-import org.apache.maven.scm.provider.accurev.AccuRev;
-import org.apache.maven.scm.provider.accurev.AccuRevException;
-import org.apache.maven.scm.provider.accurev.AccuRevInfo;
-import org.apache.maven.scm.provider.accurev.AccuRevScmProviderRepository;
-import org.apache.maven.scm.provider.accurev.AccuRevVersion;
-import org.apache.maven.scm.provider.accurev.command.AbstractAccuRevExtractSourceCommand;
-
-/**
- *
- */
-public class AccuRevCheckOutCommand
- extends AbstractAccuRevExtractSourceCommand
-{
-
- public AccuRevCheckOutCommand( ScmLogger logger )
- {
- super( logger );
- }
-
- public CheckOutScmResult checkout( ScmProviderRepository repository, ScmFileSet fileSet,
- CommandParameters parameters )
- throws ScmException
- {
- return (CheckOutScmResult) execute( repository, fileSet, parameters );
- }
-
- @Override
- protected List<File> extractSource( AccuRevScmProviderRepository repository, File basedir, AccuRevVersion version )
- throws AccuRevException
- {
- AccuRev accuRev = repository.getAccuRev();
-
- AccuRevInfo info = accuRev.info( basedir );
-
- List<File> extractedFiles = new ArrayList<File>();
-
- String basisStream = version.getBasisStream();
- String transactionId = version.getTimeSpec();
-
- boolean success = true;
- if ( info.isWorkSpace() )
- {
-
- if ( !repository.isWorkSpaceTop( info ) )
- {
- throw new AccuRevException( String.format( "Can't checkout to %s, "
- + "a subdirectory of existing workspace %s", basedir, info.getWorkSpace() ) );
- }
- // workspace exists at this basedir already.
- if ( !basisStream.equals( info.getBasis() ) )
- {
- // different basis, reparent.
- success = accuRev.chws( basedir, info.getWorkSpace(), basisStream );
- }
-
- if ( success )
- {
- // repopulate everything in the workspace.
- // note we do NOT want -t here, we just fill in any missing files
- // to the current transaction watermark...
- // the update later on will get the extra files
- List<File> poppedFiles = accuRev.pop( basedir, null );
- if ( poppedFiles != null )
- {
- extractedFiles.addAll( poppedFiles );
- }
- else
- {
- success = false;
- }
- }
-
- }
- else
- {
- // not a workspace, make one...
- // TODO set incl rules to only include the projectPath
- // TODO somehow set provider message (via throw exception?
- // if basisStream is null
- String workSpaceName = getWorkSpaceName( basedir, basisStream );
-
- success = accuRev.mkws( basisStream, workSpaceName, basedir );
-
- //Even though a new workspace starts with "0" as the high water mark
- //it can't be updated to anything less than its own mkstream transaction
- //now is close enough since even if something does sneak inbetween we
- //were just lucky that it didn't happen before...
- transactionId = "now";
-
- if ( success )
- {
- getLogger().info( "Created workspace " + workSpaceName );
- }
- }
-
- if ( success )
- {
- List<File> updatedFiles = accuRev.update( basedir, transactionId );
- if ( updatedFiles != null )
- {
- extractedFiles.addAll( updatedFiles );
- }
- else
- {
- success = false;
- }
- }
- return success ? extractedFiles : null;
- }
-
- @Override
- protected ScmResult getScmResult( AccuRevScmProviderRepository repository, List<ScmFile> scmFiles,
- ScmVersion version )
- {
- AccuRev accuRev = repository.getAccuRev();
- if ( scmFiles != null )
- {
- return new CheckOutScmResult( accuRev.getCommandLines(), scmFiles, repository.getProjectPath() );
- }
- else
- {
- return new CheckOutScmResult( accuRev.getCommandLines(), "AccuRev Error", accuRev.getErrorOutput(), false );
- }
- }
-
- public static String getWorkSpaceName( File basedir, String basisStream )
- {
- String workSpaceName;
- String baseName = basedir.getName();
- if ( baseName.contains( basisStream ) )
- {
- workSpaceName = baseName;
- }
- else if ( basisStream.contains( baseName ) )
- {
- workSpaceName = basisStream;
- }
- else
- {
- workSpaceName = basisStream + "_" + baseName;
- }
- return workSpaceName;
- }
-
-}
diff --git a/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/command/export/AccuRevExportCommand.java b/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/command/export/AccuRevExportCommand.java
deleted file mode 100644
index 762b904..0000000
--- a/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/command/export/AccuRevExportCommand.java
+++ /dev/null
@@ -1,143 +0,0 @@
-package org.apache.maven.scm.provider.accurev.command.export;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.io.File;
-import java.util.Collections;
-import java.util.List;
-
-import org.apache.maven.scm.CommandParameters;
-import org.apache.maven.scm.ScmException;
-import org.apache.maven.scm.ScmFile;
-import org.apache.maven.scm.ScmFileSet;
-import org.apache.maven.scm.ScmResult;
-import org.apache.maven.scm.ScmVersion;
-import org.apache.maven.scm.command.export.ExportScmResult;
-import org.apache.maven.scm.command.export.ExportScmResultWithRevision;
-import org.apache.maven.scm.log.ScmLogger;
-import org.apache.maven.scm.provider.ScmProviderRepository;
-import org.apache.maven.scm.provider.accurev.AccuRev;
-import org.apache.maven.scm.provider.accurev.AccuRevCapability;
-import org.apache.maven.scm.provider.accurev.AccuRevException;
-import org.apache.maven.scm.provider.accurev.AccuRevInfo;
-import org.apache.maven.scm.provider.accurev.AccuRevScmProviderRepository;
-import org.apache.maven.scm.provider.accurev.AccuRevVersion;
-import org.apache.maven.scm.provider.accurev.command.AbstractAccuRevExtractSourceCommand;
-
-/**
- *
- */
-public class AccuRevExportCommand
- extends AbstractAccuRevExtractSourceCommand
-{
-
- public AccuRevExportCommand( ScmLogger logger )
- {
- super( logger );
- }
-
- public ExportScmResult export( ScmProviderRepository repository, ScmFileSet scmFileSet, CommandParameters params )
- throws ScmException
- {
- return (ExportScmResult) execute( repository, scmFileSet, params );
- }
-
- @Override
- protected List<File> extractSource( AccuRevScmProviderRepository repository, File basedir, AccuRevVersion version )
- throws AccuRevException
- {
- AccuRev accuRev = repository.getAccuRev();
- AccuRevInfo info = accuRev.info( basedir );
- String basisStream = version.getBasisStream();
- String transactionId = version.getTimeSpec();
-
- if ( !AccuRevVersion.isNow( transactionId )
- && !AccuRevCapability.POPULATE_TO_TRANSACTION.isSupported( accuRev.getClientVersion() ) )
- {
- getLogger().warn(
- String.format( "Ignoring transaction id %s, Export can only extract current sources",
- transactionId ) );
- transactionId = "now";
- }
- else
- {
- //We might be heading to a transaction id that is not yet available on a replica
- accuRev.syncReplica();
- }
-
- boolean removedWorkspace = false;
-
- // We'll do a pop -V.
-
- if ( info.isWorkSpace() )
- {
-
- String stat = accuRev.stat( basedir );
-
- if ( stat != null )
- {
- throw new AccuRevException( String.format( "Cannot populate %s, as it is a non-ignored "
- + "subdirectory of workspace %s rooted at %s.",
- basedir.getAbsolutePath(), info.getWorkSpace(),
- info.getTop() ) );
- }
-
- // ok, the subdirectory must be ignored. temporarily remove the workspace.
- removedWorkspace = accuRev.rmws( info.getWorkSpace() );
-
- }
-
- try
- {
- File path = new File( repository.getDepotRelativeProjectPath() );
- return accuRev.popExternal( basedir, basisStream, transactionId, Collections.singletonList( path ) );
- }
- finally
- {
- if ( removedWorkspace )
- {
- accuRev.reactivate( info.getWorkSpace() );
- }
- }
- }
-
- @Override
- protected ScmResult getScmResult( AccuRevScmProviderRepository repository, List<ScmFile> scmFiles,
- ScmVersion scmVersion )
- {
- AccuRev accuRev = repository.getAccuRev();
- if ( scmFiles != null )
- {
- if ( scmVersion == null )
- {
- return new ExportScmResult( accuRev.getCommandLines(), scmFiles );
- }
- else
- {
- return new ExportScmResultWithRevision( accuRev.getCommandLines(), scmFiles, scmVersion.toString() );
- }
- }
- else
- {
- return new ExportScmResult( accuRev.getCommandLines(), "AccuRev Error", accuRev.getErrorOutput(), false );
- }
- }
-
-}
diff --git a/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/command/login/AccuRevLoginCommand.java b/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/command/login/AccuRevLoginCommand.java
deleted file mode 100644
index 30aedc5..0000000
--- a/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/command/login/AccuRevLoginCommand.java
+++ /dev/null
@@ -1,92 +0,0 @@
-package org.apache.maven.scm.provider.accurev.command.login;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.apache.maven.scm.CommandParameters;
-import org.apache.maven.scm.ScmException;
-import org.apache.maven.scm.ScmFileSet;
-import org.apache.maven.scm.ScmResult;
-import org.apache.maven.scm.command.login.LoginScmResult;
-import org.apache.maven.scm.log.ScmLogger;
-import org.apache.maven.scm.provider.ScmProviderRepository;
-import org.apache.maven.scm.provider.accurev.AccuRev;
-import org.apache.maven.scm.provider.accurev.AccuRevException;
-import org.apache.maven.scm.provider.accurev.AccuRevInfo;
-import org.apache.maven.scm.provider.accurev.AccuRevScmProviderRepository;
-import org.apache.maven.scm.provider.accurev.command.AbstractAccuRevCommand;
-
-/**
- *
- */
-public class AccuRevLoginCommand
- extends AbstractAccuRevCommand
-{
-
- public AccuRevLoginCommand( ScmLogger logger )
- {
- super( logger );
- }
-
- @Override
- protected ScmResult executeAccurevCommand( AccuRevScmProviderRepository repository, ScmFileSet fileSet,
- CommandParameters parameters )
- throws ScmException, AccuRevException
- {
- boolean result = false;
- AccuRev accurev = repository.getAccuRev();
- AccuRevInfo info = accurev.info( null );
-
- String providerMessage = "";
- if ( info == null )
- {
- providerMessage = "Unable to retrieve accurev info";
- }
- else if ( repository.getUser() != null )
- {
- // Check if we've already logged in as this user
- result = repository.getUser().equals( info.getUser() );
- if ( result )
- {
- providerMessage = "Skipping login - already logged in as " + repository.getUser();
- }
- else
- {
- result = accurev.login( repository.getUser(), repository.getPassword() );
- providerMessage = ( result ? "Success" : "Failure" ) + " logging in as " + repository.getUser();
- }
- }
- else
- {
- result = info.isLoggedIn();
- providerMessage = result ? ( "Logged in externally as " + info.getUser() ) : "Not logged in";
- }
-
- getLogger().debug( providerMessage );
- return new LoginScmResult( accurev.getCommandLines(), providerMessage, accurev.getErrorOutput(), result );
-
- }
-
- public LoginScmResult login( ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters )
- throws ScmException
- {
- return (LoginScmResult) execute( repository, fileSet, parameters );
- }
-
-}
diff --git a/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/command/remove/AccuRevRemoveCommand.java b/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/command/remove/AccuRevRemoveCommand.java
deleted file mode 100644
index 43984e6..0000000
--- a/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/command/remove/AccuRevRemoveCommand.java
+++ /dev/null
@@ -1,85 +0,0 @@
-package org.apache.maven.scm.provider.accurev.command.remove;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.io.File;
-import java.util.List;
-
-import org.apache.maven.scm.CommandParameter;
-import org.apache.maven.scm.CommandParameters;
-import org.apache.maven.scm.ScmException;
-import org.apache.maven.scm.ScmFile;
-import org.apache.maven.scm.ScmFileSet;
-import org.apache.maven.scm.ScmFileStatus;
-import org.apache.maven.scm.ScmResult;
-import org.apache.maven.scm.command.remove.RemoveScmResult;
-import org.apache.maven.scm.log.ScmLogger;
-import org.apache.maven.scm.provider.ScmProviderRepository;
-import org.apache.maven.scm.provider.accurev.AccuRev;
-import org.apache.maven.scm.provider.accurev.AccuRevException;
-import org.apache.maven.scm.provider.accurev.AccuRevScmProviderRepository;
-import org.apache.maven.scm.provider.accurev.command.AbstractAccuRevCommand;
-
-/**
- *
- */
-public class AccuRevRemoveCommand
- extends AbstractAccuRevCommand
-{
-
- public AccuRevRemoveCommand( ScmLogger logger )
- {
- super( logger );
- }
-
- @Override
- protected ScmResult executeAccurevCommand( AccuRevScmProviderRepository repository, ScmFileSet fileSet,
- CommandParameters parameters )
- throws ScmException, AccuRevException
- {
-
- AccuRev accuRev = repository.getAccuRev();
-
- String message = parameters.getString( CommandParameter.MESSAGE, "" );
-
- File basedir = fileSet.getBasedir();
-
- List<File> relativeFiles = fileSet.getFileList();
-
- final List<File> removedFiles = accuRev.defunct( basedir, relativeFiles, message );
-
- if ( removedFiles != null )
- {
- List<ScmFile> resultFiles = getScmFiles( removedFiles, ScmFileStatus.DELETED );
- return new RemoveScmResult( accuRev.getCommandLines(), resultFiles );
- }
- else
- {
- return new RemoveScmResult( accuRev.getCommandLines(), "AccuRev Error", accuRev.getErrorOutput(), false );
- }
- }
-
- public RemoveScmResult remove( ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters )
- throws ScmException
- {
- return (RemoveScmResult) execute( repository, fileSet, parameters );
- }
-
-}
diff --git a/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/command/status/AccuRevStatusCommand.java b/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/command/status/AccuRevStatusCommand.java
deleted file mode 100644
index 6cfae42..0000000
--- a/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/command/status/AccuRevStatusCommand.java
+++ /dev/null
@@ -1,155 +0,0 @@
-package org.apache.maven.scm.provider.accurev.command.status;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.maven.scm.CommandParameters;
-import org.apache.maven.scm.ScmException;
-import org.apache.maven.scm.ScmFile;
-import org.apache.maven.scm.ScmFileSet;
-import org.apache.maven.scm.ScmFileStatus;
-import org.apache.maven.scm.ScmResult;
-import org.apache.maven.scm.command.status.StatusScmResult;
-import org.apache.maven.scm.log.ScmLogger;
-import org.apache.maven.scm.provider.ScmProviderRepository;
-import org.apache.maven.scm.provider.accurev.AccuRev;
-import org.apache.maven.scm.provider.accurev.AccuRevCapability;
-import org.apache.maven.scm.provider.accurev.AccuRevException;
-import org.apache.maven.scm.provider.accurev.AccuRevScmProviderRepository;
-import org.apache.maven.scm.provider.accurev.AccuRevStat;
-import org.apache.maven.scm.provider.accurev.CategorisedElements;
-import org.apache.maven.scm.provider.accurev.command.AbstractAccuRevCommand;
-
-/**
- *
- */
-public class AccuRevStatusCommand
- extends AbstractAccuRevCommand
-{
-
- public AccuRevStatusCommand( ScmLogger logger )
- {
- super( logger );
- }
-
- @Override
- protected ScmResult executeAccurevCommand( AccuRevScmProviderRepository repository, ScmFileSet fileSet,
- CommandParameters parameters )
- throws ScmException, AccuRevException
- {
-
- AccuRev accuRev = repository.getAccuRev();
-
- File basedir = fileSet.getBasedir();
- List<File> elements = fileSet.getFileList();
-
- List<File> defunctElements = accuRev.stat( basedir, elements, AccuRevStat.DEFUNCT );
-
- if ( defunctElements == null )
- {
- return error( accuRev, "Failed retrieving defunct elements" );
- }
-
- List<File> keptElements = accuRev.stat( basedir, elements, AccuRevStat.KEPT );
-
- // Defunct elements are also listed as kept (AccuRev 4.7.1), exclude those here.
- if ( keptElements == null )
- {
- return error( accuRev, "Failed retrieving kept elements" );
- }
-
- List<File> modOrAddedElements = new ArrayList<File>();
-
- for ( File file : keptElements )
- {
- if ( !defunctElements.contains( file ) )
- {
- modOrAddedElements.add( file );
- }
- }
-
- List<File> modifiedElements = accuRev.stat( basedir, elements, AccuRevStat.MODIFIED );
-
- if ( modifiedElements == null )
- {
- return error( accuRev, "Failed retrieving modified elements" );
- }
-
- modOrAddedElements.addAll( modifiedElements );
-
- CategorisedElements catElems = accuRev.statBackingStream( basedir, modOrAddedElements );
-
- if ( catElems == null )
- {
- return error( accuRev, "Failed stat backing stream to split modified and added elements" );
- }
-
- modifiedElements = catElems.getMemberElements();
-
- List<File> addedElements;
- if ( AccuRevCapability.STAT_ADDED_NOT_PROMOTED_BUG.isSupported( accuRev.getClientVersion() ) )
- {
- modOrAddedElements.removeAll( modifiedElements );
- addedElements = modOrAddedElements;
- }
- else
- {
- addedElements = catElems.getNonMemberElements();
- }
-
- List<File> missingElements = accuRev.stat( basedir, elements, AccuRevStat.MISSING );
-
- if ( missingElements == null )
- {
- return error( accuRev, "Failed retrieving missing elements" );
- }
-
- List<File> externalElements = accuRev.stat( basedir, elements, AccuRevStat.EXTERNAL );
-
- if ( externalElements == null )
- {
- return error( accuRev, "Failed retrieving external elements" );
- }
-
- List<ScmFile> resultFiles = getScmFiles( defunctElements, ScmFileStatus.DELETED );
- resultFiles.addAll( getScmFiles( modifiedElements, ScmFileStatus.MODIFIED ) );
- resultFiles.addAll( getScmFiles( addedElements, ScmFileStatus.ADDED ) );
- resultFiles.addAll( getScmFiles( missingElements, ScmFileStatus.MISSING ) );
- resultFiles.addAll( getScmFiles( externalElements, ScmFileStatus.UNKNOWN ) );
-
- return new StatusScmResult( accuRev.getCommandLines(), resultFiles );
-
- }
-
- private ScmResult error( AccuRev accuRev, String message )
- {
- return new StatusScmResult( accuRev.getCommandLines(), "AccuRev " + message, accuRev.getErrorOutput(), false );
- }
-
- public StatusScmResult status( ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters )
- throws ScmException
- {
- return (StatusScmResult) execute( repository, fileSet, parameters );
- }
-
-}
diff --git a/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/command/tag/AccuRevTagCommand.java b/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/command/tag/AccuRevTagCommand.java
deleted file mode 100644
index d5db59e..0000000
--- a/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/command/tag/AccuRevTagCommand.java
+++ /dev/null
@@ -1,92 +0,0 @@
-package org.apache.maven.scm.provider.accurev.command.tag;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.io.File;
-import java.util.List;
-
-import org.apache.maven.scm.CommandParameter;
-import org.apache.maven.scm.CommandParameters;
-import org.apache.maven.scm.ScmException;
-import org.apache.maven.scm.ScmFileSet;
-import org.apache.maven.scm.ScmFileStatus;
-import org.apache.maven.scm.ScmResult;
-import org.apache.maven.scm.command.tag.TagScmResult;
-import org.apache.maven.scm.log.ScmLogger;
-import org.apache.maven.scm.provider.ScmProviderRepository;
-import org.apache.maven.scm.provider.accurev.AccuRev;
-import org.apache.maven.scm.provider.accurev.AccuRevException;
-import org.apache.maven.scm.provider.accurev.AccuRevInfo;
-import org.apache.maven.scm.provider.accurev.AccuRevScmProviderRepository;
-import org.apache.maven.scm.provider.accurev.command.AbstractAccuRevCommand;
-
-/**
- *
- */
-public class AccuRevTagCommand
- extends AbstractAccuRevCommand
-{
-
- public AccuRevTagCommand( ScmLogger logger )
- {
- super( logger );
- }
-
- @Override
- protected ScmResult executeAccurevCommand( AccuRevScmProviderRepository repository, ScmFileSet fileSet,
- CommandParameters parameters )
- throws ScmException, AccuRevException
- {
-
- AccuRev accuRev = repository.getAccuRev();
-
- String snapshotName = parameters.getString( CommandParameter.TAG_NAME );
-
- snapshotName = repository.getSnapshotName( snapshotName );
-
- File basedir = fileSet.getBasedir();
- boolean success = true;
-
- AccuRevInfo info = accuRev.info( basedir );
- List<File> taggedFiles = null;
-
- success = accuRev.mksnap( snapshotName, info.getBasis() );
- if ( success )
- {
- taggedFiles = accuRev.statTag( snapshotName );
- }
-
- if ( success && taggedFiles != null )
- {
- return new TagScmResult( accuRev.getCommandLines(), getScmFiles( taggedFiles, ScmFileStatus.TAGGED ) );
- }
- else
- {
- return new TagScmResult( accuRev.getCommandLines(), "AccuRev error", accuRev.getErrorOutput(), false );
- }
- }
-
- public TagScmResult tag( ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters )
- throws ScmException
- {
- return (TagScmResult) execute( repository, fileSet, parameters );
- }
-
-}
diff --git a/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/command/update/AccuRevUpdateCommand.java b/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/command/update/AccuRevUpdateCommand.java
deleted file mode 100644
index 967a120..0000000
--- a/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/command/update/AccuRevUpdateCommand.java
+++ /dev/null
@@ -1,150 +0,0 @@
-package org.apache.maven.scm.provider.accurev.command.update;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.io.File;
-import java.util.Date;
-import java.util.List;
-
-import org.apache.maven.scm.CommandParameter;
-import org.apache.maven.scm.CommandParameters;
-import org.apache.maven.scm.ScmException;
-import org.apache.maven.scm.ScmFileSet;
-import org.apache.maven.scm.ScmFileStatus;
-import org.apache.maven.scm.ScmResult;
-import org.apache.maven.scm.ScmVersion;
-import org.apache.maven.scm.command.update.UpdateScmResult;
-import org.apache.maven.scm.log.ScmLogger;
-import org.apache.maven.scm.provider.ScmProviderRepository;
-import org.apache.maven.scm.provider.accurev.AccuRev;
-import org.apache.maven.scm.provider.accurev.AccuRevException;
-import org.apache.maven.scm.provider.accurev.AccuRevInfo;
-import org.apache.maven.scm.provider.accurev.AccuRevScmProviderRepository;
-import org.apache.maven.scm.provider.accurev.AccuRevVersion;
-import org.apache.maven.scm.provider.accurev.command.AbstractAccuRevCommand;
-
-/**
- *
- */
-public class AccuRevUpdateCommand
- extends AbstractAccuRevCommand
-{
-
- public AccuRevUpdateCommand( ScmLogger logger )
- {
- super( logger );
- }
-
- @Override
- protected ScmResult executeAccurevCommand( AccuRevScmProviderRepository repository, ScmFileSet fileSet,
- CommandParameters parameters )
- throws ScmException, AccuRevException
- {
-
- AccuRev accuRev = repository.getAccuRev();
-
- File basedir = fileSet.getBasedir();
-
- AccuRevInfo info = accuRev.info( basedir );
-
- if ( !info.isWorkSpace() )
- {
- throw new AccuRevException( "No workspace at " + basedir.getAbsolutePath() );
- }
-
- String startRevision = getStartRevision( repository, parameters, info );
-
- ScmVersion scmVersion = parameters.getScmVersion( CommandParameter.SCM_VERSION, null );
-
- String updateTransactionId = null;
-
- if ( scmVersion != null )
- {
- AccuRevVersion updateVersion = repository.getAccuRevVersion( scmVersion );
-
- // Reparent if necessary
- String newBasisStream = updateVersion.getBasisStream();
- if ( newBasisStream != null
- && ( !( newBasisStream.equals( info.getWorkSpace() ) || newBasisStream.equals( info.getBasis() ) ) ) )
- {
- getLogger().info( "Reparenting " + info.getWorkSpace() + " to " + newBasisStream );
- accuRev.chws( basedir, info.getWorkSpace(), newBasisStream );
- }
-
- if ( !updateVersion.isNow() )
- {
- updateTransactionId = updateVersion.getTimeSpec();
- }
- }
-
- if ( updateTransactionId == null )
- {
- updateTransactionId = repository.getDepotTransactionId( info.getWorkSpace(), "now" );
- }
-
- String endRevision = repository.getRevision( info.getWorkSpace(), updateTransactionId );
-
- List<File> updatedFiles = accuRev.update( basedir, updateTransactionId );
-
- if ( updatedFiles != null )
- {
- return new AccuRevUpdateScmResult( accuRev.getCommandLines(), getScmFiles( updatedFiles,
- ScmFileStatus.UPDATED ),
- startRevision, endRevision );
- }
- else
- {
- return new AccuRevUpdateScmResult( accuRev.getCommandLines(), "AccuRev error", accuRev.getErrorOutput(),
- null, null, false );
- }
- }
-
- /*
- * If we are not capturing info for a changelog then we don't need a start revision. Start date is used if supplied
- * otherwise get the current high water mark for the workspace as the start version.
- */
- private String getStartRevision( AccuRevScmProviderRepository repository, CommandParameters parameters,
- AccuRevInfo info )
- throws ScmException, AccuRevException
- {
-
- boolean runChangeLog = parameters.getBoolean( CommandParameter.RUN_CHANGELOG_WITH_UPDATE );
- Date startDate = parameters.getDate( CommandParameter.START_DATE, null );
- String workspace = info.getWorkSpace();
-
- if ( !runChangeLog )
- {
- return null;
- }
- else
- {
- return startDate == null ? repository.getWorkSpaceRevision( workspace )
- : repository.getRevision( workspace, startDate );
- }
-
- }
-
- public UpdateScmResult update( ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters )
- throws ScmException
- {
- return (UpdateScmResult) execute( repository, fileSet, parameters );
- }
-
-}
diff --git a/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/command/update/AccuRevUpdateScmResult.java b/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/command/update/AccuRevUpdateScmResult.java
deleted file mode 100644
index 326795b..0000000
--- a/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/command/update/AccuRevUpdateScmResult.java
+++ /dev/null
@@ -1,77 +0,0 @@
-package org.apache.maven.scm.provider.accurev.command.update;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.util.List;
-
-import org.apache.maven.scm.ScmFile;
-import org.apache.maven.scm.command.update.UpdateScmResultWithRevision;
-
-/**
- * Carry information about before and after transaction ids so we can run the changelog
- *
- * @author ggardner
- */
-public class AccuRevUpdateScmResult
- extends UpdateScmResultWithRevision
-{
-
- private static final long serialVersionUID = -4896981432286000329L;
- String fromRevision;
-
- /**
- * Failed constructor
- *
- * @param commandLine
- * @param providerMessage
- * @param commandOutput
- */
- public AccuRevUpdateScmResult( String commandLine, String providerMessage, String commandOutput,
- String fromRevision, String toRevision, boolean success )
- {
- super( commandLine, providerMessage, commandOutput, toRevision, success );
- this.fromRevision = fromRevision;
- }
-
- /**
- * Success constructor
- *
- * @param startVersion
- * @param endVersion
- * @param commandLines
- * @param updatedFiles
- */
- public AccuRevUpdateScmResult( String commandLines, List<ScmFile> updatedFiles, String fromRevision,
- String toRevision )
- {
- super( commandLines, updatedFiles, toRevision );
- this.fromRevision = fromRevision;
- }
-
- public String getFromRevision()
- {
- return fromRevision;
- }
-
- public String getToRevision()
- {
- return getRevision();
- }
-}
\ No newline at end of file
diff --git a/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/util/QuotedPropertyParser.java b/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/util/QuotedPropertyParser.java
deleted file mode 100644
index eb3827c..0000000
--- a/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/util/QuotedPropertyParser.java
+++ /dev/null
@@ -1,152 +0,0 @@
-package org.apache.maven.scm.provider.accurev.util;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * @author ggardner
- */
-public final class QuotedPropertyParser
-{
-
- private QuotedPropertyParser()
- {
-
- }
-
- public static Map<String, String> parse( CharSequence seq )
- {
- Map<String, String> hashMap = new HashMap<String, String>();
-
- parse( seq, hashMap );
- return hashMap;
- }
-
- public static void parse( CharSequence string, Map<? super String, ? super String> propertyMap )
- {
-
- QuotedParseState state = QuotedParseState.KEY;
- char quote = '\0';
- StringBuilder buffer = new StringBuilder();
- String propertyKey = "";
-
- int i = 0; // where we are up to in the scan
- int pos = 0; // where we have consumed into the buffer
- while ( i < string.length() )
- {
- char current = string.charAt( i );
- switch ( state )
- {
- case KEY:
- switch ( current )
- {
- case '"':
- case '\'':
- quote = current;
- state = QuotedParseState.IN_QUOTED_KEY;
- if ( i >= pos )
- {
- buffer.append( string.subSequence( pos, i ) );
- }
- pos = i + 1;
- break;
- case '=':
- if ( i >= pos )
- {
- buffer.append( string.subSequence( pos, i ) );
- }
- propertyKey = buffer.toString();
- buffer = new StringBuilder();
- state = QuotedParseState.VALUE;
- pos = i + 1;
- break;
- default:
- }
- break;
-
- case VALUE:
- switch ( current )
- {
- case '"':
- case '\'':
- quote = current;
- state = QuotedParseState.IN_QUOTED_VALUE;
- if ( i >= pos )
- {
- buffer.append( string.subSequence( pos, i ) );
- }
- pos = i + 1;
- break;
- case '&':
- if ( i >= pos )
- {
- buffer.append( string.subSequence( pos, i ) );
- }
- propertyMap.put( propertyKey, buffer.toString() );
- pos = i + 1;
- buffer = new StringBuilder();
- state = QuotedParseState.KEY;
- break;
- default:
- }
-
- break;
- case IN_QUOTED_KEY:
- case IN_QUOTED_VALUE:
- if ( current == quote )
- {
- state =
- ( state == QuotedParseState.IN_QUOTED_KEY ) ? QuotedParseState.KEY : QuotedParseState.VALUE;
- if ( i >= pos )
- {
- buffer.append( string.subSequence( pos, i ) );
- }
- pos = i + 1;
- }
- break;
- default:
- break;
- }
-
- i++;
- }
-
- if ( state == QuotedParseState.VALUE )
- {
- if ( i >= pos )
- {
- buffer.append( string.subSequence( pos, i ) );
- }
- propertyMap.put( propertyKey, buffer.toString() );
- }
- }
-
- /**
- *
- */
- // Has to be down here to avoid a QDOX exception
- public enum QuotedParseState
- {
- KEY, IN_QUOTED_KEY, IN_QUOTED_VALUE, VALUE
- }
-
-}
diff --git a/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/util/WorkspaceUtils.java b/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/util/WorkspaceUtils.java
deleted file mode 100644
index 3687a94..0000000
--- a/maven-scm-providers/maven-scm-provider-accurev/src/main/java/org/apache/maven/scm/provider/accurev/util/WorkspaceUtils.java
+++ /dev/null
@@ -1,74 +0,0 @@
-package org.apache.maven.scm.provider.accurev.util;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.io.File;
-import java.io.IOException;
-
-/**
- *
- */
-public class WorkspaceUtils
-{
- public static boolean isSameFile( File file1, String filename2 )
- {
- return isSameFile( file1, filename2 == null ? null : new File( filename2 ) );
-
- }
-
- //We need to canonicalise the files (if we can) before we compare them..
- public static boolean isSameFile( File file1, File file2 )
- {
-
- if ( file1 == file2 || ( file1 == null && file2 == null ) )
- {
- return true;
- }
-
- if ( file1 == null || file2 == null )
- {
- return false;
- }
-
- try
- {
- file1 = file1.getCanonicalFile();
- }
- catch ( IOException ioEx )
- {
- //Oh well, we'll compare the non-canonicalised file then.
- }
-
- try
- {
- file2 = file2.getCanonicalFile();
- }
- catch ( IOException ioEx )
- {
- //Oh well, we'll compare the non-canonicalised file then.
- }
- return file1.equals( file2 );
- }
-
- private WorkspaceUtils()
- {
- // no op only to prevents class creation
- }
-}
diff --git a/maven-scm-providers/maven-scm-provider-accurev/src/site/apt/index.apt b/maven-scm-providers/maven-scm-provider-accurev/src/site/apt/index.apt
deleted file mode 100644
index 978ad96..0000000
--- a/maven-scm-providers/maven-scm-provider-accurev/src/site/apt/index.apt
+++ /dev/null
@@ -1,258 +0,0 @@
- --------------
- Maven SCM AccuRev provider
- --------------
- Grant Gardner
- --------------
- January 2009
- --------------
-
- ~~ Licensed to the Apache Software Foundation (ASF) under one
- ~~ or more contributor license agreements. See the NOTICE file
- ~~ distributed with this work for additional information
- ~~ regarding copyright ownership. The ASF licenses this file
- ~~ to you under the Apache License, Version 2.0 (the
- ~~ "License"); you may not use this file except in compliance
- ~~ with the License. You may obtain a copy of the License at
- ~~
- ~~ http://www.apache.org/licenses/LICENSE-2.0
- ~~
- ~~ Unless required by applicable law or agreed to in writing,
- ~~ software distributed under the License is distributed on an
- ~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- ~~ KIND, either express or implied. See the License for the
- ~~ specific language governing permissions and limitations
- ~~ under the License.
-
- ~~ NOTE: For help with the syntax of this file, see:
- ~~ http://maven.apache.org/doxia/references/apt-format.html
-
- The AccuRev provider implements Maven's generic SCM API for the AccuRev SCM system.
-
-Deprecation Notice
-
- This SCM provider is deprecated and will be removed in version 2.0.0.
-
-Use Cases
-
- The provider must handle a number of different use cases:
-
- * Label a source tree and check out that label to a temp directory (the release plugin)
-
- * Provide a changelog between dates/revisions and checkout code to a directory (Continuum et al)
-
- * Map a number of commands designed for CVS/SVN onto the semantics provided by AccuRev (the scm plugin)
-
-Details
-
-
- The main semantic issue faced by the provider is CVS/SVN's concept of a working copy versus AccuRev's concept of a
- workspace.
-
- CVS/SVN allow the user to checkout any repository location to any local directory at will and tracks this
- by keeping metadata in a CVS/.svn directory. AccuRev uses a "workspace" concept whereby it keeps track of
- the physical filesystem locations within the server. This necessarily creates restrictions on where projects
- may be checked out to, in that overlapping workspaces are not allowed.
-
- The other major constraint is the uniqueness of workspace and tag names which cannot be reused. It is up to the
- user to implement some namespace standards to manage this.
-
-URLS
-
- <<<scm:accurev:[user/pass[@host[:port]]][:streamName][:?key=value&key=value...][:/project/path]>>>
-
- * <user/pass> See login below.
-
- * <@host:port> Specify the accurev server to connect to. If used all accurev commands will include a
- <<<-H host:port>>> argument.
-
- * <streamName> provide a "version" for initial checkouts. Only really required for HEAD/trunk type
- checkouts such as done by the tck tests.
-
- * <?prop=value> various properties
-
- * <accurevExe> Path to the accuRev executable
-
- * <tagFormat> Maps branch/tag/version names to AccuRev stream names and vice-versa. See the "tag" command below.
- If provided all streams are expected to conform to this naming standard.
-
- The above can also be referenced as system properties - "maven.scm.accurev.<propertyname>"
-
- * </project/path> is the relative path of your project within AccuRev. Note that AccuRev has no concept of checking
- out a sub-directory so checkouts always create this physical path under the working directory.
-
- NOTE: There is no specification of depot as it can be derived from the working directory or stream names.
-
-SCM Commands
-
-* Login
-
- The recommended method is to run <<<accurev login>>> externally. For automated SCM operations (e.g. Continuum),
- suggest using <<<accurev login -n>>> to create a persistent login that won't expire in the middle of your build.
-
- If you really want to embed this information in URLS and config files, read on.
-
- Username and password can either come from the URL, or from a <<< <server> >>> section in a settings.xml file.
-
- If supplied then we will login to the server with <<< accurev login <user> -A >>>. This returns an
- authentication token to the process which is used in subsequent command invocations by passing
-
- <<< -A <authtoken> >>> to the accurev cli.
-
- * <<Warning>> this method will expose your accurev session token to anyone snooping command lines (eg via ps)
- and will be exposed in debug output
-
- * <<Warning>> under Windows the user's password is passed on the command line, and will be exposed in debug output
-
- * <<Note>> We never logout. AccuRev returns the same session id for a user anyway, and unused sessions will expire.
-
-* Checkout
-
- * Persistent checkout (<<<isPersistCheckout() == true>>>)
-
- The basic premise is to end up with a workspace rooted at the checkout directory with contents as at the specified
- version.
-
- Versions are of the form [basisStream/[tranid|timestamp]]. If a version is not supplied, the streamName from the url
- is used as the basisStream for the workspace.
-
- A non-empty checkout directory is not allowed. It will be created if it does not exist.
-
- If the checkout directory is a subdirectory of an existing workspace other than the <<</project/path>>> specified in
- the URL then the checkout will be aborted.
-
- If a workspace exists at the checkout location then it will be reused. If necessary the basisStream of the workspace
- will be reparented with <<<accurev chws -b>>>.
-
- If the checkout location is not an existing workspace then a new one is created with <<<accurev mkws>>>
-
- Workspace names are generated by concatenating the basis stream and the base name of the checkout directory unless the
- basis stream contains the base name or vice versa, in which case the longer one is used.
-
- If the generated workspace name already exists as stream name elsewhere in AccuRev then the checkout will fail.
-
- The final step is to update the workspace to the tranid/timestamp specified in the supplied version (or "highest" if
- not specified). Note that workspaces cannot go backwards, even when reparented or repopulated and you will get
- "transaction out of range" errors if you try. Since you can't update a workspace to a transaction less than one used
- to create it, any transaction information supplied for an initial checkout will be silently ignored.
-
- * Non persistent checkout
-
- If the persistCheckout flag is false, the provider redirects the checkout to the export command as below.
-
-* Export
-
- A populate outside of a workspace <<<accurev pop -V -l >>> If the checkout directory exists
- within a subdirectory of a workspace AccuRev would normally generate an error. To work around this restriction
- the existing workspace is temporarily deactivated during the export.
-
- For AccuRev 4.9.x the provider supports export to a specific tranid/timestamp.
-
-* Tag
-
- Creates a snapshot <<< accurev mksnap >>> for the basis stream of the workspace specified by the working directory.
-
- A system property "maven.scm.accurev.tagFormat" can be used to specify a java.util.Formatter string used to convert
- from a maven scm tag name to an accurev stream name for the snapshot.
-
- Useful for the release plugin in cases where you have a certain stream naming convention enforced by an AccuRev admin trigger.
-
-* Update
-
- Equivalent to <<<accurev update>>>. The working directory must be in a workspace (or reftree) and that whole
- workspace is updated.
- here has been the option to populate to a specific transaction id.
- A version of the form basisStream/timeSpec can be supplied (tag/branch/revision). If the basis stream of this version
- is different to the current basis of the workspace, then a <<<accurev chws>>> is performed. The timespec component
- is passed as the <<< -t >>> option to the update command. If not supplied the timespec is set to "highest".
-
- Changelog with update is supported. If no start_date for the changelog is supplied, then we start from the
- transaction id of the workspace before the update. The end version for the changelog is the supplied version as
- above (defaulting to "now").
-
- If the start and end versions refer to the same basis stream, then a changelog is performed using the changelog
- command described below. If the streams are different, then a dummy changeset is synthesised to simply list the
- updated files.
-
-* Add
-
- Equivalent to <<<accurev add>>>
-
-* Checkin
-
- Keep and promote any pending files. <<< accurev promote -K >>>
-
-* Status
-
- Runs a series of <<<accurev stat>>> calls to identify various types of modifications.
-
- * <<<accurev stat -D>>> defunct files => "DELETED" status
-
- * <<<accurev stat -k>>> kept files
-
- * <<<accurev stat -m>>> modified files
-
- * <<<accurev stat -b>>> to find state of kept and modified files in the backing stream to determine
- whether their Maven ScmFileStatus is "ADDED" or "MODIFIED". An unintended change in stat -b output
- for AccuRev 4.9.0 breaks this distinction.
-
-
- * <<<accurev stat -M>>> missing files => "MISSING" status
-
- * <<<accurev stat -x>>> external files => "UNKNOWN" status
-
-* Changelog
-
- List the changes promoted into a stream between times/transaction ids.
-
- <<<accurev hist -s stream -t T1-T2>>>
-
- For AccuRev > 4.7.2 also issues
-
- <<<diff -v stream -V stream -t T1-T2>>>
-
- to synthesise a changeset representing files that have changed upstream.
-
- If the version specifies a workspace stream the history of the workspace
- is merged with the above hist/diff performed on the workspace's basis stream
-
-* Diff
-
- <<Not yet implemented>>
-
- Diff between versions. If only a base directory supplied in the fileset will diff the whole workspace.
-
- If both version specified
- * <<< accurev diff -v <start> -V <end> >>>
-
- If only one version specified then comparison is against workspace filesystem
- * <<< accurev diff -v <start|end> >>>
-
- If no versions specified and stream is in URL, then compare workspace to that stream
- * <<< accurev diff -v <urlStream> >>>
-
- If no versions specified and no stream in URL, then compare workspace to basis stream
- * <<< accurev diff -b >>>
-
-
-* Remove
-
- <<<accurev defunct>>> the elements specified in the fileset, or the whole basedir
-
-* Blame
-
- <<<accurev annotate>>> the specified file
-
- file must be in a workspace/reftree
-
-* Branch
-
- Not implemented.
-
- The Maven SCM branch concept possibly could be represented as some form of <<<accurev mkstream>>> but not sure
- this really does the stream concept justice.
-
-Troubleshooting
-
- Generally to get yourself out of trouble you'll need to manipulate AccuRev externally by moving workspaces around
- bumping versions, reparenting or renaming streams.
-
diff --git a/maven-scm-providers/maven-scm-provider-accurev/src/site/apt/tcktests.apt b/maven-scm-providers/maven-scm-provider-accurev/src/site/apt/tcktests.apt
deleted file mode 100644
index 227ceb2..0000000
--- a/maven-scm-providers/maven-scm-provider-accurev/src/site/apt/tcktests.apt
+++ /dev/null
@@ -1,80 +0,0 @@
- --------------
- Maven SCM AccuRev provider - Test approach
- --------------
- Grant Gardner
- --------------
- January 2009
- --------------
-
- ~~ Licensed to the Apache Software Foundation (ASF) under one
- ~~ or more contributor license agreements. See the NOTICE file
- ~~ distributed with this work for additional information
- ~~ regarding copyright ownership. The ASF licenses this file
- ~~ to you under the Apache License, Version 2.0 (the
- ~~ "License"); you may not use this file except in compliance
- ~~ with the License. You may obtain a copy of the License at
- ~~
- ~~ http://www.apache.org/licenses/LICENSE-2.0
- ~~
- ~~ Unless required by applicable law or agreed to in writing,
- ~~ software distributed under the License is distributed on an
- ~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- ~~ KIND, either express or implied. See the License for the
- ~~ specific language governing permissions and limitations
- ~~ under the License.
-
- ~~ NOTE: For help with the syntax of this file, see:
- ~~ http://maven.apache.org/doxia/references/apt-format.html
-
-Junit4 + Mockito
-
- This provider requires Java 1.5 and generally uses Junit4 annotations and <<<assertThat>>> syntax with {{{http://hamcrest.org}Hamcrest}} matchers.
-
- The commands are written against an AccuRev interface and tested using Mockito.
-
- AccuRevCommandLine then implements that interface and has its own tests to check the expected calls to accurev.
-
- The various StreamConsumers that parse AccuRev output also have their own tests.
-
- Watch out for issue between Eclipse and Sun compilers where generics can lead to unresolved symbols.
- Mostly this is factored out to the ScmFileMatcher class.
-
-TCK Tests
-
- AccuRev creates some challenges for the existing TCK tests.
-
- * AccuRev requires the client machine to be time synchronised with the server. If this is not the case the tck tests
- will almost certainly fail.
-
- * Logging in. Use *tckUrlPrefix* system property to specify "user/pass@host:port". To run tests using implicit (external) login
- set *tckAllowImpliedLogin*=true instead.
-
- * In setup (initRepo) a new depot is created with the appropriate files. This depot is named using
- <<<System.currentTimeMillis()>>> as part of the name to guarantee uniqueness. A depot is created for
- each individual test that is run.
-
- * You can't create a workspace in a subdirectory of another workspace. If the project itself is in AccuRev then
- this means the standard /target directory. Either configure maven to use a different build directory, or a set the
- *tckBaseDir* system property.
-
- * getWorkingCopy() etc.. are overriden as necessary so the checkout directory is prefixed with the
- depot name and tckBaseDir as above.
-
- * AccuRev has a 127 character limit on the workspace path so you need to make sure the tckBaseDir is not
- too deep in your filesystem.
-
- * We attempt to remove the created workspaces in teardown, but there's no guarantee. Depots can only
- be removed with a <<<maintain>>> command while the server is stopped so this is not attempted. Probably
- easiest to use a separate Accurev instance and periodically blow it away completely.
-
- * TckTagTest uses a fixed tag name "tag-test" but AccuRev needs unique stream names across the whole
- server. We use the "tagFormat" property to have stream names prefixed with the depot name
-
-Eclipse TCK tests
-
- * Lookup error for ScmManager
- Plexus config needs to be available - either the maven-scm-managers-plexus must be on the class path and have generated resources
- or the maven-scm-managers-plexus jar for the current reference version must be available in the repository
-
- * No such SCMProvider - accurev
- Need to generate resources so the plexus config is on the classpath
\ No newline at end of file
diff --git a/maven-scm-providers/maven-scm-provider-accurev/src/site/apt/todos.apt b/maven-scm-providers/maven-scm-provider-accurev/src/site/apt/todos.apt
deleted file mode 100644
index 2d44815..0000000
--- a/maven-scm-providers/maven-scm-provider-accurev/src/site/apt/todos.apt
+++ /dev/null
@@ -1,63 +0,0 @@
- --------------
- Maven SCM AccuRev provider - TODOs
- --------------
- Grant Gardner
- --------------
- June 2010
- --------------
-
- ~~ Licensed to the Apache Software Foundation (ASF) under one
- ~~ or more contributor license agreements. See the NOTICE file
- ~~ distributed with this work for additional information
- ~~ regarding copyright ownership. The ASF licenses this file
- ~~ to you under the Apache License, Version 2.0 (the
- ~~ "License"); you may not use this file except in compliance
- ~~ with the License. You may obtain a copy of the License at
- ~~
- ~~ http://www.apache.org/licenses/LICENSE-2.0
- ~~
- ~~ Unless required by applicable law or agreed to in writing,
- ~~ software distributed under the License is distributed on an
- ~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- ~~ KIND, either express or implied. See the License for the
- ~~ specific language governing permissions and limitations
- ~~ under the License.
-
- ~~ NOTE: For help with the syntax of this file, see:
- ~~ http://maven.apache.org/doxia/references/apt-format.html
-
- * Handle replicas
-
- * Issue package on checkin - from a special file?
-
- * Issues in changelog output
-
- * consider using a property to specify workspace name. (or pattern %s replaced with basisStream+baseName)
-
- * Create workspaces with include rules to only include /project/path.
-
- * Property switch so reftrees are used instead of workspaces. At first glance reftrees suit the Continuum use
- case. However many a failed build is fixed in the build environment and then promoted. So reftrees are just a workspace
- without that capability.
-
-
- * Raise JIRA to propose equivalence of non-persistent checkout and "export"
- Only seems to impact Perforce + AccuRev but all downstream use must "set" a flag on the repository. Would prefer they
- retrieved a flag and then choose whether to call checkout or export.
-
- * Raise JIRA against maven-scm to have the tck tests support this properly
- or change the default of persistCheckout to true.
-
- * raise case with AccuRev to allow an external populate to an ignored sub directory of a workspace.
-
- * raise JIRA for Export to support a projectPath like checkout does.
-
- * Filter results based on supplied fileSet.
-
- * Filter results based on URL's project path.
-
- * Question why blame uses CommandParameter.FILE instead of just the fileset, also why not blame on a version?
-
-
-
-
\ No newline at end of file
diff --git a/maven-scm-providers/maven-scm-provider-accurev/src/site/site.xml b/maven-scm-providers/maven-scm-provider-accurev/src/site/site.xml
deleted file mode 100644
index 0b6fc6d..0000000
--- a/maven-scm-providers/maven-scm-provider-accurev/src/site/site.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one
- ~ or more contributor license agreements. See the NOTICE file
- ~ distributed with this work for additional information
- ~ regarding copyright ownership. The ASF licenses this file
- ~ to you under the Apache License, Version 2.0 (the
- ~ "License"); you may not use this file except in compliance
- ~ with the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing,
- ~ software distributed under the License is distributed on an
- ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- ~ KIND, either express or implied. See the License for the
- ~ specific language governing permissions and limitations
- ~ under the License.
- -->
-
-<project xmlns="http://maven.apache.org/DECORATION/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/DECORATION/1.1.0 http://maven.apache.org/xsd/decoration-1.1.0.xsd"
- name="Maven SCM AccuRev Provider">
- <body>
- <menu ref="parent" />
-
- <menu name="Overview">
- <item name="Introduction" href="index.html"/>
- <item name="JavaDocs" href="apidocs/index.html"/>
- <item name="Source Xref" href="xref/index.html"/>
- <!--item name="FAQ" href="faq.html"/-->
- <item name="TCK Tests" href="tcktests.html"/>
- </menu>
-
- <menu ref="reports" inherit="bottom" />
- </body>
-</project>
diff --git a/maven-scm-providers/maven-scm-provider-accurev/src/test/java/org/apache/maven/scm/ChangeFileMatcher.java b/maven-scm-providers/maven-scm-provider-accurev/src/test/java/org/apache/maven/scm/ChangeFileMatcher.java
deleted file mode 100644
index e9c9885..0000000
--- a/maven-scm-providers/maven-scm-provider-accurev/src/test/java/org/apache/maven/scm/ChangeFileMatcher.java
+++ /dev/null
@@ -1,69 +0,0 @@
-package org.apache.maven.scm;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import static org.hamcrest.Matchers.any;
-import static org.hamcrest.Matchers.is;
-
-import java.io.File;
-
-import org.hamcrest.Description;
-import org.hamcrest.Matcher;
-import org.hamcrest.TypeSafeMatcher;
-
-public class ChangeFileMatcher
- extends TypeSafeMatcher<ChangeFile>
-{
-
- private String fileName;
-
- private Matcher<String> versionMatcher;
-
- public ChangeFileMatcher( String fileName, Matcher<String> versionMatcher )
- {
- this.fileName = new File( fileName ).getPath();
- this.versionMatcher = versionMatcher;
- }
-
- @Override
- public boolean matchesSafely( ChangeFile changeFile )
- {
- return is( fileName ).matches( new File( changeFile.getName() ).getPath() );
- }
-
- public void describeTo( Description desc )
- {
- desc.appendText( "ChangeFile with name=" );
- desc.appendValue( fileName );
- desc.appendText( " and version matching " );
- desc.appendDescriptionOf( versionMatcher );
-
- }
-
- public static Matcher<ChangeFile> changeFile( String fileName )
- {
- return new ChangeFileMatcher( fileName, any( String.class ) );
- }
-
- public static Matcher<ChangeFile> changeFile( String fileName, Matcher<String> versionMatcher )
- {
- return new ChangeFileMatcher( fileName, versionMatcher );
- }
-}
diff --git a/maven-scm-providers/maven-scm-provider-accurev/src/test/java/org/apache/maven/scm/ChangeSetMatcher.java b/maven-scm-providers/maven-scm-provider-accurev/src/test/java/org/apache/maven/scm/ChangeSetMatcher.java
deleted file mode 100644
index ecf5bff..0000000
--- a/maven-scm-providers/maven-scm-provider-accurev/src/test/java/org/apache/maven/scm/ChangeSetMatcher.java
+++ /dev/null
@@ -1,76 +0,0 @@
-package org.apache.maven.scm;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import static org.apache.maven.scm.ChangeFileMatcher.changeFile;
-import static org.apache.maven.scm.CollectionSizeMatcher.size;
-import static org.hamcrest.Matchers.allOf;
-import static org.hamcrest.Matchers.any;
-import static org.hamcrest.Matchers.is;
-
-import java.util.List;
-
-import org.hamcrest.Description;
-import org.hamcrest.Matcher;
-import org.hamcrest.Matchers;
-import org.hamcrest.TypeSafeMatcher;
-
-public class ChangeSetMatcher
- extends TypeSafeMatcher<ChangeSet>
-{
-
- private String comment;
-
- private Matcher<Iterable<ChangeFile>> changeFilesMatcher;
-
- @SuppressWarnings( "unchecked" )
- public ChangeSetMatcher( String comment, String... fileNames )
- {
- this.comment = comment;
-
- Matcher<ChangeFile> elementMatchers[] = new ChangeFileMatcher[fileNames.length];
- for ( int i = 0; i < elementMatchers.length; i++ )
- {
- elementMatchers[i] = changeFile( fileNames[i], any( String.class ) );
- }
- this.changeFilesMatcher =
- allOf( Matchers.<ChangeFile>hasItems( elementMatchers ), size( fileNames.length, ChangeFile.class ) );
- }
-
- @Override
- public boolean matchesSafely( ChangeSet changeSet )
- {
- List<ChangeFile> files = changeSet.getFiles();
- return is( comment ).matches( changeSet.getComment() ) && changeFilesMatcher.matches( files );
- }
-
- public void describeTo( Description desc )
- {
- desc.appendText( "ChangeSet with comment=" );
- desc.appendValue( comment );
- desc.appendText( " and files matching " );
- desc.appendDescriptionOf( changeFilesMatcher );
- }
-
- public static Matcher<ChangeSet> changeSet( String comment, String... fileNames )
- {
- return new ChangeSetMatcher( comment, fileNames );
- }
-}
diff --git a/maven-scm-providers/maven-scm-provider-accurev/src/test/java/org/apache/maven/scm/CollectionSizeMatcher.java b/maven-scm-providers/maven-scm-provider-accurev/src/test/java/org/apache/maven/scm/CollectionSizeMatcher.java
deleted file mode 100644
index 8b34599..0000000
--- a/maven-scm-providers/maven-scm-provider-accurev/src/test/java/org/apache/maven/scm/CollectionSizeMatcher.java
+++ /dev/null
@@ -1,59 +0,0 @@
-package org.apache.maven.scm;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.util.Collection;
-
-import org.hamcrest.Description;
-import org.hamcrest.Matcher;
-import org.hamcrest.TypeSafeMatcher;
-
-public class CollectionSizeMatcher<T>
- extends TypeSafeMatcher<Iterable<T>>
-{
-
- private int size;
-
- public CollectionSizeMatcher( int size )
- {
- this.size = size;
- }
-
- @Override
- public boolean matchesSafely( Iterable<T> iterable )
- {
- Collection<?> collection = (Collection<?>) iterable;
- return collection.size() == this.size;
-
- }
-
- public void describeTo( Description desc )
- {
- desc.appendText( "with size " );
- desc.appendValue( size );
-
- }
-
-
- public static <T> Matcher<Iterable<T>> size( int length, Class<T> clazz )
- {
- return new CollectionSizeMatcher<T>( length);
- }
-}
diff --git a/maven-scm-providers/maven-scm-provider-accurev/src/test/java/org/apache/maven/scm/ScmFileMatcher.java b/maven-scm-providers/maven-scm-provider-accurev/src/test/java/org/apache/maven/scm/ScmFileMatcher.java
deleted file mode 100644
index f2f29db..0000000
--- a/maven-scm-providers/maven-scm-provider-accurev/src/test/java/org/apache/maven/scm/ScmFileMatcher.java
+++ /dev/null
@@ -1,66 +0,0 @@
-package org.apache.maven.scm;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the
- * Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a
- * copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS"
- * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language
- * governing permissions and limitations under the License.
- */
-
-import java.io.File;
-import java.util.List;
-
-import org.hamcrest.Description;
-import org.hamcrest.Matcher;
-import org.hamcrest.Matchers;
-import org.hamcrest.TypeSafeMatcher;
-
-public class ScmFileMatcher
- extends TypeSafeMatcher<ScmFile>
-{
-
- public static Matcher<ScmFile> scmFile( String fileName, ScmFileStatus status )
- {
- return new ScmFileMatcher( fileName, status );
- }
-
- @SuppressWarnings( "unchecked" )
- public static void assertHasScmFile( List<?> actualFiles, String fileName, ScmFileStatus status )
- {
- org.hamcrest.MatcherAssert.assertThat( (List<ScmFile>) actualFiles,
- Matchers.<ScmFile>hasItem( scmFile( fileName, status ) ) );
- }
-
- private ScmFileStatus status;
-
- private String filePath;
-
- public ScmFileMatcher( String filePath, ScmFileStatus status )
- {
- // Convert to OS specific path...
- this.filePath = new File( filePath ).getPath();
- this.status = status;
- }
-
- public void describeTo( Description desc )
- {
- desc.appendValue( "ScmFile [" );
- desc.appendValue( filePath );
- desc.appendText( "," );
- desc.appendValue( status );
- desc.appendValue( "]" );
- }
-
- @Override
- public boolean matchesSafely( ScmFile scmFile )
- {
- return scmFile.getPath().equals( filePath ) && scmFile.getStatus().equals( status );
- }
-
-}
\ No newline at end of file
diff --git a/maven-scm-providers/maven-scm-provider-accurev/src/test/java/org/apache/maven/scm/provider/accurev/AccuRevCapabilityTest.java b/maven-scm-providers/maven-scm-provider-accurev/src/test/java/org/apache/maven/scm/provider/accurev/AccuRevCapabilityTest.java
deleted file mode 100644
index 4465534..0000000
--- a/maven-scm-providers/maven-scm-provider-accurev/src/test/java/org/apache/maven/scm/provider/accurev/AccuRevCapabilityTest.java
+++ /dev/null
@@ -1,48 +0,0 @@
-package org.apache.maven.scm.provider.accurev;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import static org.hamcrest.Matchers.is;
-import static org.hamcrest.MatcherAssert.assertThat;
-
-import org.junit.Test;
-
-public class AccuRevCapabilityTest
-{
- @Test
- public void testDiffBetweenStreams()
- throws Exception
- {
- assertThat( AccuRevCapability.DIFF_BETWEEN_STREAMS.isSupported( "4.7.1" ), is( false ) );
- assertThat( AccuRevCapability.DIFF_BETWEEN_STREAMS.isSupported( "4.7.2" ), is( true ) );
- assertThat( AccuRevCapability.DIFF_BETWEEN_STREAMS.isSupported( "4.7.2a" ), is( true ) );
- assertThat( AccuRevCapability.DIFF_BETWEEN_STREAMS.isSupported( "4.7.4" ), is( true ) );
- assertThat( AccuRevCapability.DIFF_BETWEEN_STREAMS.isSupported( "5.0.1" ), is( true ) );
- }
-
- @Test
- public void testPopToTransaction()
- throws Exception
- {
- assertThat( AccuRevCapability.POPULATE_TO_TRANSACTION.isSupported( "4.7.4b" ), is( false ) );
- assertThat( AccuRevCapability.POPULATE_TO_TRANSACTION.isSupported( "4.9.0c" ), is( true ) );
- assertThat( AccuRevCapability.POPULATE_TO_TRANSACTION.isSupported( "5.0.1" ), is( false ) );
- }
-}
diff --git a/maven-scm-providers/maven-scm-provider-accurev/src/test/java/org/apache/maven/scm/provider/accurev/AccuRevScmProviderRepositoryMatcher.java b/maven-scm-providers/maven-scm-provider-accurev/src/test/java/org/apache/maven/scm/provider/accurev/AccuRevScmProviderRepositoryMatcher.java
deleted file mode 100644
index b959879..0000000
--- a/maven-scm-providers/maven-scm-provider-accurev/src/test/java/org/apache/maven/scm/provider/accurev/AccuRevScmProviderRepositoryMatcher.java
+++ /dev/null
@@ -1,97 +0,0 @@
-package org.apache.maven.scm.provider.accurev;
-
-import java.util.Objects;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.apache.maven.scm.provider.ScmProviderRepository;
-import org.hamcrest.Description;
-import org.hamcrest.Matcher;
-import org.hamcrest.TypeSafeMatcher;
-
-public class AccuRevScmProviderRepositoryMatcher
- extends TypeSafeMatcher<ScmProviderRepository>
-{
-
- public static Matcher<ScmProviderRepository> isRepo( String user, String pass, String host, int port,
- String stream, String projectPath )
-
- {
- return new AccuRevScmProviderRepositoryMatcher( user, pass, host, port, stream, projectPath );
- }
-
- private String user;
-
- private String pass;
-
- private String host;
-
- private String projectPath;
-
- private String stream;
-
- private int port;
-
- public AccuRevScmProviderRepositoryMatcher( String user, String pass, String host, int port, String stream,
- String projectPath )
- {
- this.user = user;
- this.pass = pass;
- this.host = host;
- this.port = port;
- this.stream = stream;
- this.projectPath = projectPath;
-
- }
-
- public void describeTo( Description desc )
- {
- desc.appendText( "an AccuRev repo with" );
- desc.appendText( " user=" );
- desc.appendValue( user );
- desc.appendText( " pass=" );
- desc.appendValue( pass );
- desc.appendText( " host=" );
- desc.appendValue( host );
- desc.appendText( " port=" );
- desc.appendValue( port );
- desc.appendText( " stream=" );
- desc.appendValue( stream );
- desc.appendText( " projectPath=" );
- desc.appendValue( projectPath );
-
- }
-
- @Override
- public boolean matchesSafely( ScmProviderRepository repo )
- {
- if ( !( repo instanceof AccuRevScmProviderRepository ) )
- {
- return false;
- }
- AccuRevScmProviderRepository accuRevRepo = (AccuRevScmProviderRepository) repo;
- return Objects.equals( user, accuRevRepo.getUser() )
- && Objects.equals( pass, accuRevRepo.getPassword() )
- && Objects.equals( host, accuRevRepo.getHost() ) && port == accuRevRepo.getPort()
- && Objects.equals( stream, accuRevRepo.getStreamName() )
- && Objects.equals( projectPath, accuRevRepo.getProjectPath() );
-
- }
-}
diff --git a/maven-scm-providers/maven-scm-provider-accurev/src/test/java/org/apache/maven/scm/provider/accurev/AccuRevScmProviderRepositoryTest.java b/maven-scm-providers/maven-scm-provider-accurev/src/test/java/org/apache/maven/scm/provider/accurev/AccuRevScmProviderRepositoryTest.java
deleted file mode 100644
index 316eaf6..0000000
--- a/maven-scm-providers/maven-scm-provider-accurev/src/test/java/org/apache/maven/scm/provider/accurev/AccuRevScmProviderRepositoryTest.java
+++ /dev/null
@@ -1,63 +0,0 @@
-package org.apache.maven.scm.provider.accurev;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.MatcherAssert.assertThat;
-
-import java.io.File;
-
-import org.junit.Test;
-
-public class AccuRevScmProviderRepositoryTest
-{
-
- @Test
- public void testIsBasedirTheWorkspaceRoot()
- {
- // basedir is workspace root if it is the "top" of the workspace
- // or it is top/projectPath
-
- AccuRevInfo info = new AccuRevInfo( new File( "/my/workspace/project/path" ) );
- info.setTop( "/my/workspace" );
-
- AccuRevScmProviderRepository repo = new AccuRevScmProviderRepository();
- repo.setProjectPath( "/project/path" );
-
- assertThat( repo.isWorkSpaceRoot( info ), is( true ) );
-
- info = new AccuRevInfo( new File( "/my/workspace/project/path/subdir" ) );
- info.setTop( "/my/workspace" );
- assertThat( repo.isWorkSpaceRoot( info ), is( false ) );
- }
-
- @Test
- public void testTagFormat()
- throws Exception
- {
- AccuRevScmProviderRepository repo = new AccuRevScmProviderRepository();
-
- repo.setTagFormat( "depot_%s" );
-
- assertThat( repo.tagToStream( "test-tag" ), is( "depot_test-tag" ) );
-
- assertThat( repo.streamToTag( "depot_test-tag" ), is( "test-tag" ) );
- }
-}
diff --git a/maven-scm-providers/maven-scm-provider-accurev/src/test/java/org/apache/maven/scm/provider/accurev/AccurevScmProviderTest.java b/maven-scm-providers/maven-scm-provider-accurev/src/test/java/org/apache/maven/scm/provider/accurev/AccurevScmProviderTest.java
deleted file mode 100644
index 9dd9f0d..0000000
--- a/maven-scm-providers/maven-scm-provider-accurev/src/test/java/org/apache/maven/scm/provider/accurev/AccurevScmProviderTest.java
+++ /dev/null
@@ -1,145 +0,0 @@
-package org.apache.maven.scm.provider.accurev;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import static org.apache.maven.scm.provider.accurev.AccuRevScmProviderRepositoryMatcher.isRepo;
-import static org.hamcrest.Matchers.is;
-import static org.hamcrest.MatcherAssert.assertThat;
-
-import org.apache.maven.scm.repository.ScmRepositoryException;
-import org.junit.Test;
-
-public class AccurevScmProviderTest
-{
-
- @Test
- public void testMakeProviderScmRepository()
- throws Exception
- {
-
- // [:stream][:/project/dir]
- assertAccurevRepo( "", null, null );
- assertAccurevRepo( "aStream:/project/dir", "aStream", "project/dir" );
- assertAccurevRepo( "/project/dir", null, "project/dir" );
- assertAccurevRepo( "my_QA_Stream", "my_QA_Stream", null );
-
- }
-
- private static void assertAccurevRepo( String url, String expStream, String expPath )
- throws ScmRepositoryException
- {
- AccuRevScmProvider provider = new AccuRevScmProvider();
-
- AccuRevScmProviderRepository repository =
- (AccuRevScmProviderRepository) provider.makeProviderScmRepository( url, ':' );
-
- assertThat( repository, isRepo( null, null, null, AccuRev.DEFAULT_PORT, expStream, expPath ) );
-
- }
-
- @Test
- public void testMakeProviderWithBothKindsOfDirectorySeparators()
- throws ScmRepositoryException
- {
- assertThat( getRepo( "aStream:\\project\\dir" ), isRepo( null, null, null, 5050, "aStream", "project\\dir" ) );
- }
-
- @Test
- public void testProviderWithHostPort()
- throws Exception
- {
-
- assertThat( getRepo( "@myHost:aStream:/project/dir" ), isRepo( null, null, "myHost", AccuRev.DEFAULT_PORT,
- "aStream", "project/dir" ) );
- assertThat( getRepo( "@myHost:5051:/project/dir" ), isRepo( null, null, "myHost", 5051, null, "project/dir" ) );
- }
-
- @Test
- public void testBlankAsUsedInTckTests()
- throws ScmRepositoryException
- {
- assertThat( getRepo( ":aDepotStream" ), isRepo( null, null, null, 5050, "aDepotStream", null ) );
- }
-
- @Test
- public void testProviderWithUserPass()
- throws Exception
- {
- assertThat( getRepo( "aUser/theirPassword:/project/dir" ), isRepo( "aUser", "theirPassword", null,
- AccuRev.DEFAULT_PORT, null, "project/dir" ) );
-
- assertThat( getRepo( "aUser/theirPassword@theHost:5051:aStream:/project/dir" ), isRepo( "aUser",
- "theirPassword",
- "theHost", 5051,
- "aStream",
- "project/dir" ) );
-
- assertThat( getRepo( "aUser@theHost:5050:aStream" ), isRepo( "aUser", null, "theHost", 5050, "aStream", null ) );
-
- assertThat( getRepo( "aUser/" ), isRepo( "aUser", null, null, 5050, null, null ) );
- }
-
- @Test
- public void testProviderWithProperties()
- throws Exception
- {
- AccuRevScmProviderRepository repo =
- getRepo( "aUser/theirPassword@theHost:5051:aStream:?tagFormat='depot_%s'&accurevExe=/opt/accurev/bin/accurev:/project/dir" );
-
- assertThat( repo, isRepo( "aUser", "theirPassword", "theHost", 5051, "aStream", "project/dir" ) );
- assertThat( repo.getAccuRev().getExecutable(), is( "/opt/accurev/bin/accurev" ) );
- assertThat( repo.getTagFormat(), is( "depot_%s" ) );
- }
-
- @Test
- public void testProviderWithSystemProperties()
- throws Exception
- {
- String tagFormatProperty = AccuRevScmProvider.SYSTEM_PROPERTY_PREFIX + AccuRevScmProvider.TAG_FORMAT_PROPERTY;
- System.setProperty( tagFormatProperty, "depot_%s" );
- String exeProperty = AccuRevScmProvider.SYSTEM_PROPERTY_PREFIX + AccuRevScmProvider.ACCUREV_EXECUTABLE_PROPERTY;
- System.setProperty( exeProperty, "/expect/overide" );
-
- AccuRevScmProviderRepository repo =
- getRepo( "aUser/theirPassword@theHost:5051:aStream:?accurevExe=/opt/accurev/bin/accurev:/project/dir" );
-
- assertThat( repo, isRepo( "aUser", "theirPassword", "theHost", 5051, "aStream", "project/dir" ) );
- assertThat( repo.getAccuRev().getExecutable(), is( "/opt/accurev/bin/accurev" ) );
- assertThat( repo.getTagFormat(), is( "depot_%s" ) );
-
- System.clearProperty( tagFormatProperty );
- System.clearProperty( exeProperty );
- }
-
- private static AccuRevScmProviderRepository getRepo( String url )
- throws ScmRepositoryException
- {
- AccuRevScmProviderRepository repo =
- (AccuRevScmProviderRepository) new AccuRevScmProvider().makeProviderScmRepository( url, ':' );
- return repo;
- }
-
- @Test
- public void testGetSCMType()
- {
-
- assertThat( ( new AccuRevScmProvider() ).getScmType(), is( "accurev" ) );
- }
-}
diff --git a/maven-scm-providers/maven-scm-provider-accurev/src/test/java/org/apache/maven/scm/provider/accurev/TransactionTest.java b/maven-scm-providers/maven-scm-provider-accurev/src/test/java/org/apache/maven/scm/provider/accurev/TransactionTest.java
deleted file mode 100644
index 082bc40..0000000
--- a/maven-scm-providers/maven-scm-provider-accurev/src/test/java/org/apache/maven/scm/provider/accurev/TransactionTest.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package org.apache.maven.scm.provider.accurev;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.util.Date;
-
-import org.junit.Test;
-
-public class TransactionTest
-{
- @Test
- public void testToString()
- throws Exception
- {
- Transaction t = new Transaction( 10L, new Date(), "promote", "me" );
- t.toString();
- }
-}
diff --git a/maven-scm-providers/maven-scm-provider-accurev/src/test/java/org/apache/maven/scm/provider/accurev/VersionMatcher.java b/maven-scm-providers/maven-scm-provider-accurev/src/test/java/org/apache/maven/scm/provider/accurev/VersionMatcher.java
deleted file mode 100644
index 561e270..0000000
--- a/maven-scm-providers/maven-scm-provider-accurev/src/test/java/org/apache/maven/scm/provider/accurev/VersionMatcher.java
+++ /dev/null
@@ -1,64 +0,0 @@
-package org.apache.maven.scm.provider.accurev;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.apache.maven.scm.provider.accurev.Transaction.Version;
-import org.hamcrest.Description;
-import org.hamcrest.Matcher;
-import org.hamcrest.TypeSafeMatcher;
-
-public class VersionMatcher
- extends TypeSafeMatcher<Version>
-{
-
- private Long elementId;
-
- private String path;
-
- private String virtual;
-
- private String real;
-
- public VersionMatcher( Long elementId, String path, String virtual, String real )
- {
- this.elementId = elementId;
- this.path = path;
- this.virtual = virtual;
- this.real = real;
- }
-
- @Override
- public boolean matchesSafely( Version v )
- {
- return elementId.equals( v.getElementId() ) && path.equals( v.getElementName() )
- && virtual.equals( v.getVirtualSpec() ) && real.equals( v.getRealSpec() );
- }
-
- public void describeTo( Description desc )
- {
- desc.appendText( "version with id=" + elementId + " virtual=" + virtual + " real=" + real + " path=" + path );
-
- }
-
- public static Matcher<Version> version( Long elementId, String path, String virtual, String real )
- {
- return new VersionMatcher( elementId, path, virtual, real );
- }
-}
\ No newline at end of file
diff --git a/maven-scm-providers/maven-scm-provider-accurev/src/test/java/org/apache/maven/scm/provider/accurev/cli/AccuRevCommandLineTest.java b/maven-scm-providers/maven-scm-provider-accurev/src/test/java/org/apache/maven/scm/provider/accurev/cli/AccuRevCommandLineTest.java
deleted file mode 100644
index dfa9c5c..0000000
--- a/maven-scm-providers/maven-scm-provider-accurev/src/test/java/org/apache/maven/scm/provider/accurev/cli/AccuRevCommandLineTest.java
+++ /dev/null
@@ -1,599 +0,0 @@
-package org.apache.maven.scm.provider.accurev.cli;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.CoreMatchers.nullValue;
-import static org.hamcrest.Matchers.not;
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.junit.Assume.assumeTrue;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.StringReader;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-import org.apache.maven.scm.ScmTestCase;
-import org.apache.maven.scm.log.ScmLogger;
-import org.apache.maven.scm.provider.accurev.AccuRev;
-import org.apache.maven.scm.provider.accurev.AccuRevStat;
-import org.codehaus.plexus.util.Os;
-import org.codehaus.plexus.util.cli.CommandLineException;
-import org.codehaus.plexus.util.cli.Commandline;
-import org.codehaus.plexus.util.cli.StreamConsumer;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.junit.runners.JUnit4;
-
-@RunWith( JUnit4.class )
-public class AccuRevCommandLineTest
- extends ScmTestCase
-{
-
- public class AccuRevCommandLineTester
- extends AccuRevCommandLine
- {
-
- private BufferedReader stdinReader;
-
- private String response;
-
- public BufferedReader getStdinReader()
- {
-
- return stdinReader;
- }
-
- private ScmLogger initLog()
- throws Exception
- {
-
- return AccuRevJUnitUtil.getLogger( getContainer() );
- }
-
- public AccuRevCommandLineTester()
- throws Exception
- {
-
- setLogger( initLog() );
- }
-
- public AccuRevCommandLineTester( String host, int port )
- throws Exception
- {
-
- super( host, port );
- setLogger( initLog() );
- }
-
- @Override
- protected int executeCommandLine( Commandline cl, InputStream stdin, CommandOutputConsumer stdout,
- StreamConsumer stderr )
- throws CommandLineException
- {
-
- if ( stdin != null )
- {
- stdinReader = new BufferedReader( new InputStreamReader( stdin ) );
- }
- else
- {
- stdinReader = null;
- }
- try
- {
- if ( response != null )
- {
- BufferedReader reader = new BufferedReader( new StringReader( response ) );
- String line = reader.readLine();
- while ( line != null )
- {
- stdout.consumeLine( line );
- line = reader.readLine();
- }
- }
- }
- catch ( IOException e )
- {
- throw new CommandLineException( "Unexpected error", e );
- }
- return 0;
- }
-
- public void setResponse( String response )
- {
-
- this.response = response;
-
- }
-
- }
-
- @Before
- @Override
- public void setUp()
- throws Exception
- {
-
- super.setUp();
- }
-
- @After
- @Override
- public void tearDown()
- throws Exception
- {
-
- super.tearDown();
- }
-
- @Override
- protected InputStream getCustomConfiguration()
- throws Exception
- {
-
- return AccuRevJUnitUtil.getPlexusConfiguration();
- }
-
- @Test
- public void testPromoteAll()
- throws Exception
- {
-
- AccuRevCommandLineTester accuRevCL = new AccuRevCommandLineTester();
-
- assertThat( accuRevCL.promoteAll( new File( "/my/workspace" ), "cmt msg" ), not( nullValue() ) );
- Commandline lastCL = accuRevCL.getCommandline();
- assertThat( lastCL.getWorkingDirectory(), is( new File( "/my/workspace" ).getCanonicalFile() ) );
- assertThat( lastCL.getArguments(), is( new String[] { "promote", "-p", "-K", "-c", "cmt msg" } ) );
-
- }
-
- @Test
- public void testPromote()
- throws Exception
- {
-
- AccuRevCommandLineTester accuRevCL = new AccuRevCommandLineTester();
- List<File> files = new ArrayList<File>();
- File testfile = new File( "my/test/file" );
- files.add( testfile );
-
- assertThat( accuRevCL.promote( new File( "/my/workspace" ), files, "cmt msg" ), not( nullValue() ) );
- Commandline lastCL = accuRevCL.getCommandline();
- assertThat( lastCL.getWorkingDirectory(), is( new File( "/my/workspace" ).getCanonicalFile() ) );
- assertThat( lastCL.getArguments(), is( new String[] { "promote", "-K", "-c", "cmt msg", testfile.getPath() } ) );
-
- }
-
- @Test
- public void testLogin()
- throws Exception
- {
-
- AccuRevCommandLineTester accuRevCL = new AccuRevCommandLineTester();
- accuRevCL.setResponse( "Password: a124235bacc3ff" );
- accuRevCL.setExecutable( "accurev.exe" );
- accuRevCL.login( "aUser", "topSecret" );
- Commandline lastCL = accuRevCL.getCommandline();
-
- if ( Os.isFamily( Os.FAMILY_WINDOWS ) )
- {
- assertThat( lastCL.getArguments(), is( new String[] { "login", "-A", "aUser", "topSecret" } ) );
- assertThat( accuRevCL.getStdinReader(), is( nullValue() ) );
- }
- else
- {
- assertThat( lastCL.getArguments(), is( new String[] { "login", "-A", "aUser" } ) );
- assertThat( accuRevCL.getStdinReader().readLine(), is( "topSecret" ) );
- }
-
- accuRevCL.info( null );
- assertThat( lastCL.getArguments(), is( new String[] { "info", "-A", "a124235bacc3ff" } ) );
-
- assumeTrue( !Os.isFamily( Os.FAMILY_WINDOWS ) );
-
- accuRevCL.login( "anOther", "opensaysme" );
- assertThat( lastCL.getArguments(), is( new String[] { "login", "-A", "anOther" } ) );
- assertThat( accuRevCL.getStdinReader().readLine(), is( "opensaysme" ) );
-
- accuRevCL.login( "AUser", null );
- assertThat( lastCL.getArguments(), is( new String[] { "login", "-A", "AUser" } ) );
- assertThat( accuRevCL.getStdinReader().readLine(), is( "" ) );
-
- }
-
- @Test
- public void testPopExternal()
- throws Exception
- {
-
- AccuRevCommandLineTester accuRevCL = new AccuRevCommandLineTester( "aHost", 5051 );
- accuRevCL.setExecutable( "accurev.exe" );
- File testfile = new File( "/my/export" );
- File projectDir = new File( "/./project/dir" );
- accuRevCL.popExternal( testfile, "stream", "12", Collections.singleton( projectDir ) );
-
- Commandline lastCL = accuRevCL.getCommandline();
- assertThat( lastCL.getLiteralExecutable(), is( "accurev.exe" ) );
- assertThat( lastCL.getArguments(), is( new String[] { "pop", "-H", "aHost:5051", "-v", "stream", "-L",
- testfile.getAbsolutePath(), "-t", "12", "-R", projectDir.getPath() } ) );
-
- }
-
- @Test
- public void testPopExternalWithTransactionNow()
- throws Exception
- {
- AccuRevCommandLineTester accuRevCL = new AccuRevCommandLineTester( "aHost", 5051 );
- accuRevCL.setExecutable( "accurev.exe" );
- File testfile = new File( "/my/export" );
- File projectDir = new File( "/./project/dir" );
- accuRevCL.popExternal( testfile, "stream", "now", Collections.singleton( projectDir ) );
-
- Commandline lastCL = accuRevCL.getCommandline();
- assertThat( lastCL.getLiteralExecutable(), is( "accurev.exe" ) );
- assertThat( lastCL.getArguments(), is( new String[] { "pop", "-H", "aHost:5051", "-v", "stream", "-L",
- testfile.getAbsolutePath(), "-R", projectDir.getPath() } ) );
- }
-
- @Test
- public void testPopExternalWithTransactionNull()
- throws Exception
- {
- AccuRevCommandLineTester accuRevCL = new AccuRevCommandLineTester( "aHost", 5051 );
- accuRevCL.setExecutable( "accurev.exe" );
- File testfile = new File( "/my/export" );
- File projectDir = new File( "/./project/dir" );
- accuRevCL.popExternal( testfile, "stream", null, Collections.singleton( projectDir ) );
-
- Commandline lastCL = accuRevCL.getCommandline();
- assertThat( lastCL.getLiteralExecutable(), is( "accurev.exe" ) );
- assertThat( lastCL.getArguments(), is( new String[] { "pop", "-H", "aHost:5051", "-v", "stream", "-L",
- testfile.getAbsolutePath(), "-R", projectDir.getPath() } ) );
- }
-
- @Test
- public void testPopWorkSpace()
- throws Exception
- {
-
- AccuRevCommandLineTester accuRevCL = new AccuRevCommandLineTester();
- accuRevCL.setExecutable( "accurev.exe" );
-
- File testFile = new File( "project/dir" );
- accuRevCL.pop( new File( "/home/workspace" ), Collections.singleton( testFile ) );
-
- Commandline lastCL = accuRevCL.getCommandline();
- assertThat( lastCL.getLiteralExecutable(), is( "accurev.exe" ) );
- // take care of symlink
- if (lastCL.getWorkingDirectory().getCanonicalFile().equals( lastCL.getWorkingDirectory().getAbsoluteFile() ))
- {
- assertThat( lastCL.getWorkingDirectory(), is( new File( "/home/workspace" ).getCanonicalFile() ) );
- } else {
- assertThat( lastCL.getWorkingDirectory(), is( new File( "/home/workspace" ).getAbsoluteFile() ));// .getCanonicalFile() ) );
- }
-
- assertThat( lastCL.getArguments(), is( new String[] { "pop", "-R", testFile.getPath() } ) );
-
- }
-
- @Test
- public void testMkws()
- throws Exception
- {
-
- AccuRevCommandLineTester accuRevCL = new AccuRevCommandLineTester();
- accuRevCL.setExecutable( "accurev2.exe" );
- File workspaceFile = new File( "/my/workspace/location" );
- accuRevCL.mkws( "myStream", "myWorkSpaceName", workspaceFile );
-
- Commandline lastCL = accuRevCL.getCommandline();
- assertThat( lastCL.getLiteralExecutable(), is( "accurev2.exe" ) );
- assertThat( lastCL.getWorkingDirectory(), is( workspaceFile.getCanonicalFile() ) );
- assertThat( lastCL.getArguments(), is( new String[] { "mkws", "-b", "myStream", "-w", "myWorkSpaceName", "-l",
- workspaceFile.getAbsolutePath() } ) );
-
- }
-
- @Test
- public void testUpdate()
- throws Exception
- {
-
- AccuRevCommandLineTester accuRevCL = new AccuRevCommandLineTester();
- File workspaceFile = new File( "/my/ws/loc" );
- accuRevCL.update( workspaceFile, "highest" );
-
- Commandline lastCL = accuRevCL.getCommandline();
- assertThat( lastCL.getWorkingDirectory(), is( workspaceFile.getCanonicalFile() ) );
- assertThat( lastCL.getArguments(), is( new String[] { "update", "-t", "highest" } ) );
-
- }
-
- @Test
- public void testInfo()
- throws Exception
- {
-
- AccuRevCommandLineTester accuRevCL = new AccuRevCommandLineTester();
- accuRevCL.info( new File( "/my/base/dir" ) );
-
- Commandline lastCL = accuRevCL.getCommandline();
- assertThat( lastCL.getWorkingDirectory(), is( new File( "/my/base/dir" ).getCanonicalFile() ) );
- assertThat( lastCL.getArguments(), is( new String[] { "info" } ) );
-
- }
-
- @Test
- public void testRemoveWorkspace()
- throws Exception
- {
-
- AccuRevCommandLineTester accuRevCL = new AccuRevCommandLineTester();
- accuRevCL.rmws( "myWorkspaceName" );
-
- Commandline lastCL = accuRevCL.getCommandline();
- assertThat( lastCL.getArguments(), is( new String[] { "rmws", "-s", "myWorkspaceName" } ) );
-
- }
-
- @Test
- public void testStatIgnored()
- throws Exception
- {
-
- AccuRevCommandLineTester accuRevCL = new AccuRevCommandLineTester();
- File testFile = new File( "/my/base/dir" );
- accuRevCL.stat( testFile );
-
- Commandline lastCL = accuRevCL.getCommandline();
- assertThat( lastCL.getArguments(), is( new String[] { "stat", "-fx", testFile.getAbsolutePath() } ) );
-
- }
-
- @Test
- public void testReactivate()
- throws Exception
- {
-
- AccuRevCommandLineTester accuRevCL = new AccuRevCommandLineTester();
- accuRevCL.reactivate( "ArANdomWorkspaceName" );
-
- Commandline lastCL = accuRevCL.getCommandline();
- assertThat( lastCL.getArguments(), is( new String[] { "reactivate", "wspace", "ArANdomWorkspaceName" } ) );
-
- }
-
- @Test
- public void testReset()
- throws Exception
- {
-
- AccuRevCommandLineTester accuRevCL = new AccuRevCommandLineTester();
- Commandline commandline = accuRevCL.getCommandline();
- Commandline cl = commandline;
- List<String> shellCmds = cl.getShell().getShellCommandLine( cl.getArguments() );
- accuRevCL.reset();
- assertThat( cl.getShell().getShellCommandLine( cl.getArguments() ), is( shellCmds ) );
- assertThat( commandline.getLiteralExecutable(), is( "accurev" ) );
- }
-
- @Test
- public void testAdd()
- throws Exception
- {
-
- AccuRevCommandLineTester accuRevCL = new AccuRevCommandLineTester();
- List<File> files = new ArrayList<File>();
- File testFile = new File( "my/test/file" );
- files.add( testFile );
- assertThat( accuRevCL.add( new File( "/workspace" ), files, "my commit message" ), not( nullValue() ) );
-
- Commandline lastCL = accuRevCL.getCommandline();
- assertThat( lastCL.getWorkingDirectory(), is( new File( "/workspace" ).getCanonicalFile() ) );
- assertThat( lastCL.getArguments(), is( new String[] { "add", "-c", "my commit message", testFile.getPath() } ) );
-
- assertThat( accuRevCL.add( new File( "/workspace" ), files, "" ), not( nullValue() ) );
- assertThat( lastCL.getArguments(), is( new String[] { "add", "-c", AccuRev.DEFAULT_ADD_MESSAGE,
- testFile.getPath() } ) );
-
- }
-
- @SuppressWarnings( "unchecked" )
- @Test
- public void testRemove()
- throws Exception
- {
-
- AccuRevCommandLineTester accuRevCL = new AccuRevCommandLineTester();
- List<File> files = new ArrayList<File>();
- File testFile = new File( "my/test/file" );
- files.add( testFile );
- File workspaceFile = new File( "/workspace" );
- assertThat( accuRevCL.defunct( workspaceFile, files, "my commit message" ), not( nullValue() ) );
-
- Commandline lastCL = accuRevCL.getCommandline();
- assertThat( lastCL.getWorkingDirectory(), is( workspaceFile.getCanonicalFile() ) );
- assertThat( lastCL.getArguments(),
- is( new String[] { "defunct", "-c", "my commit message", testFile.getPath() } ) );
-
- assertThat( accuRevCL.defunct( workspaceFile, files, "" ), not( nullValue() ) );
- assertThat( lastCL.getArguments(), is( new String[] { "defunct", "-c", AccuRev.DEFAULT_REMOVE_MESSAGE,
- testFile.getPath() } ) );
-
- assertThat( accuRevCL.defunct( workspaceFile, Collections.EMPTY_LIST, "" ), not( nullValue() ) );
- assertThat( lastCL.getArguments(), is( new String[] { "defunct", "-c", AccuRev.DEFAULT_REMOVE_MESSAGE, "." } ) );
-
- assertThat( accuRevCL.defunct( workspaceFile, null, "" ), not( nullValue() ) );
- assertThat( lastCL.getArguments(), is( new String[] { "defunct", "-c", AccuRev.DEFAULT_REMOVE_MESSAGE, "." } ) );
-
- }
-
- @Test
- public void testChangeWorkspace()
- throws Exception
- {
-
- AccuRevCommandLineTester accuRevCL = new AccuRevCommandLineTester();
- accuRevCL.chws( new File( "/my/workspace" ), "the_workspace_name_me", "a-snapshot" );
-
- Commandline lastCL = accuRevCL.getCommandline();
- assertThat( lastCL.getWorkingDirectory(), is( new File( "/my/workspace" ).getCanonicalFile() ) );
- assertThat( lastCL.getArguments(), is( new String[] { "chws", "-s", "the_workspace_name_me", "-b",
- "a-snapshot", "-l", "." } ) );
-
- }
-
- @Test
- public void testMkSnap()
- throws Exception
- {
-
- AccuRevCommandLineTester accuRevCL = new AccuRevCommandLineTester();
- accuRevCL.mksnap( "a-snapshot", "basisStream" );
-
- Commandline lastCL = accuRevCL.getCommandline();
- assertThat( lastCL.getArguments(), is( new String[] { "mksnap", "-s", "a-snapshot", "-b", "basisStream", "-t",
- "now" } ) );
-
- }
-
- @Test
- public void testStatTag()
- throws Exception
- {
-
- AccuRevCommandLineTester accuRevCL = new AccuRevCommandLineTester();
- accuRevCL.statTag( "a-snapshot" );
-
- Commandline lastCL = accuRevCL.getCommandline();
- assertThat( lastCL.getArguments(), is( new String[] { "stat", "-a", "-ffl", "-s", "a-snapshot" } ) );
-
- }
-
- @Test
- public void testStatBackingStream()
- throws Exception
- {
-
- AccuRevCommandLineTester accuRevCL = new AccuRevCommandLineTester();
-
- File basedir = new File( "/my/workspace" );
- List<File> elements = new ArrayList<File>( 1 );
- File addedOrModifiedFile = new File( "addedOrModified/file" );
- elements.add( addedOrModifiedFile );
- accuRevCL.statBackingStream( basedir, elements );
- Commandline lastCL = accuRevCL.getCommandline();
- assertThat( lastCL.getWorkingDirectory(), is( basedir.getCanonicalFile() ) );
- assertThat( lastCL.getArguments(), is( new String[] { "stat", "-b", "-ffr", addedOrModifiedFile.getPath() } ) );
-
- }
-
- @Test
- public void testStatRecursive()
- throws Exception
- {
-
- File basedir = new File( "/my/workspace" );
- List<File> noFiles = new ArrayList<File>();
-
- AccuRevCommandLineTester accuRevCL = new AccuRevCommandLineTester();
- accuRevCL.stat( basedir, noFiles, AccuRevStat.KEPT );
- Commandline lastCL = accuRevCL.getCommandline();
- assertThat( lastCL.getWorkingDirectory(), is( basedir.getCanonicalFile() ) );
- assertThat( lastCL.getArguments(), is( new String[] { "stat", "-ffr", "-k", "-R", "." } ) );
-
- noFiles.add( new File( "." ) );
- accuRevCL.stat( basedir, noFiles, AccuRevStat.DEFUNCT );
- lastCL = accuRevCL.getCommandline();
- assertThat( lastCL.getWorkingDirectory(), is( basedir.getCanonicalFile() ) );
- assertThat( lastCL.getArguments(), is( new String[] { "stat", "-ffr", "-D", "-R", "." } ) );
- }
-
- @Test
- public void testStatSpecificFilesAndDirectories()
- throws Exception
- {
-
- File basedir = new File( "/my/workspace" );
- List<File> files = new ArrayList<File>();
- File testDir = new File( "a/dir" );
- files.add( testDir );
- File testFile = new File( "a/dir/a.file" );
- files.add( testFile );
-
- AccuRevCommandLineTester accuRevCL = new AccuRevCommandLineTester();
- accuRevCL.stat( basedir, files, AccuRevStat.MISSING );
- Commandline lastCL = accuRevCL.getCommandline();
- assertThat( lastCL.getWorkingDirectory(), is( basedir.getCanonicalFile() ) );
- assertThat( lastCL.getArguments(), is( new String[] { "stat", "-ffr", "-M", testDir.getPath(),
- testFile.getPath() } ) );
-
- }
-
- @Test
- public void testAnnotate()
- throws Exception
- {
-
- File basedir = new File( "/my/workspace" );
- File file = new File( "src/main/java/foo.java" );
-
- AccuRevCommandLineTester accuRevCL = new AccuRevCommandLineTester();
- accuRevCL.annotate( basedir, file );
-
- Commandline lastCL = accuRevCL.getCommandline();
- assertThat( lastCL.getWorkingDirectory(), is( basedir.getCanonicalFile() ) );
- assertThat( lastCL.getArguments(), is( new String[] { "annotate", "-ftud", file.getPath() } ) );
-
- }
-
- @Test
- public void testDiff()
- throws Exception
- {
- AccuRevCommandLineTester accuRevCL = new AccuRevCommandLineTester();
-
- accuRevCL.diff( "myStream", "fromSpec", "toSpec" );
- Commandline lastCL = accuRevCL.getCommandline();
- assertThat( lastCL.getArguments(), is( new String[] { "diff", "-fx", "-a", "-i", "-v", "myStream", "-V",
- "myStream", "-t", "fromSpec-toSpec" } ) );
-
- }
-
- @Test
- public void testShowStream()
- throws Exception
- {
- AccuRevCommandLineTester accuRevCL = new AccuRevCommandLineTester();
- accuRevCL.showStream( "mystream" );
- Commandline lastCL = accuRevCL.getCommandline();
- assertThat( lastCL.getArguments(), is( new String[] { "show", "-s", "mystream", "-fx", "streams" } ) );
- ;
- }
-}
diff --git a/maven-scm-providers/maven-scm-provider-accurev/src/test/java/org/apache/maven/scm/provider/accurev/cli/AccuRevJUnitUtil.java b/maven-scm-providers/maven-scm-provider-accurev/src/test/java/org/apache/maven/scm/provider/accurev/cli/AccuRevJUnitUtil.java
deleted file mode 100644
index bae8bd9..0000000
--- a/maven-scm-providers/maven-scm-provider-accurev/src/test/java/org/apache/maven/scm/provider/accurev/cli/AccuRevJUnitUtil.java
+++ /dev/null
@@ -1,71 +0,0 @@
-package org.apache.maven.scm.provider.accurev.cli;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-
-import org.apache.maven.scm.log.ScmLogger;
-import org.apache.maven.scm.manager.ScmManager;
-import org.apache.maven.scm.manager.plexus.PlexusLogger;
-import org.codehaus.plexus.PlexusContainer;
-import org.codehaus.plexus.component.repository.exception.ComponentLookupException;
-import org.codehaus.plexus.logging.Logger;
-import org.codehaus.plexus.logging.LoggerManager;
-import org.codehaus.plexus.util.cli.StreamConsumer;
-
-public class AccuRevJUnitUtil
-{
-
- public static void consume( String resource, StreamConsumer consumer )
- throws IOException
- {
- BufferedReader reader = new BufferedReader( new InputStreamReader( consumer.getClass()
- .getResourceAsStream( resource ) ) );
-
- String line = reader.readLine();
- while ( line != null )
- {
- consumer.consumeLine( line );
- line = reader.readLine();
- }
-
- if ( consumer instanceof XppStreamConsumer )
- {
- ( (XppStreamConsumer) consumer ).waitComplete();
- }
- }
-
- public static ScmLogger getLogger( PlexusContainer plexusContainer )
- throws ComponentLookupException
- {
- LoggerManager loggerManager = (LoggerManager) plexusContainer.lookup( LoggerManager.ROLE );
- Logger logger = loggerManager.getLoggerForComponent( ScmManager.ROLE );
- return new PlexusLogger( logger );
- }
-
- public static InputStream getPlexusConfiguration()
- {
- return AccuRevJUnitUtil.class.getResourceAsStream( "/PlexusTestContainerConfig.xml" );
- }
-
-}
diff --git a/maven-scm-providers/maven-scm-provider-accurev/src/test/java/org/apache/maven/scm/provider/accurev/cli/AccuRevStatTest.java b/maven-scm-providers/maven-scm-provider-accurev/src/test/java/org/apache/maven/scm/provider/accurev/cli/AccuRevStatTest.java
deleted file mode 100644
index 0b4a57c..0000000
--- a/maven-scm-providers/maven-scm-provider-accurev/src/test/java/org/apache/maven/scm/provider/accurev/cli/AccuRevStatTest.java
+++ /dev/null
@@ -1,104 +0,0 @@
-package org.apache.maven.scm.provider.accurev.cli;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import static org.hamcrest.Matchers.is;
-import static org.hamcrest.Matchers.isOneOf;
-import static org.hamcrest.MatcherAssert.assertThat;
-
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.apache.maven.scm.provider.accurev.AccuRevStat;
-import org.junit.Test;
-
-public class AccuRevStatTest
-{
-
- private static final String[] STAT_RESULTS;
-
- static
- {
- String defunct = "./defunct.xml maventst_ggardner/3 (2/3) (defunct) (kept) (member)";
- String modified = "./src/main/java/Modified.java maventst_ggardner/2 (2/2) (modified) (member)";
- String kept = "./src/main/java/Kept.java maventst_ggardner/3 (2/3) (kept) (member)";
- String external = "./src/test/java/External.java (external)";
- String missing = "./Missing.jpg maventst/1 (2/1) (missing)";
-
- STAT_RESULTS = new String[] { defunct, modified, kept, external, missing };
- }
-
- @Test
- public void testDEFUNCT()
- throws Exception
- {
- assertStatType( AccuRevStat.DEFUNCT, "-D", "./defunct.xml" );
- }
-
- @Test
- public void testEXTERNAL()
- throws Exception
- {
- assertStatType( AccuRevStat.EXTERNAL, "-x", "./src/test/java/External.java" );
- }
-
- @Test
- public void testKEPT()
- throws Exception
- {
- assertStatType( AccuRevStat.KEPT, "-k", "./src/main/java/Kept.java", "./defunct.xml" );
- }
-
- @Test
- public void testMISSING()
- throws Exception
- {
- assertStatType( AccuRevStat.MISSING, "-M", "./Missing.jpg" );
- }
-
- @Test
- public void testMODIFIED()
- throws Exception
- {
- assertStatType( AccuRevStat.MODIFIED, "-m", "./src/main/java/Modified.java" );
- }
-
- private void assertStatType( AccuRevStat accuRevStat, String expectedStatArg, String... expectedMatches )
- {
- assertThat( accuRevStat.getStatArg(), is( expectedStatArg ) );
- Pattern matchPattern = accuRevStat.getMatchPattern();
-
- int matchCount = 0;
-
- for ( String stat : STAT_RESULTS )
- {
-
- Matcher matcher = matchPattern.matcher( stat );
-
- if ( matcher.matches() )
- {
- String matched = matcher.group( 1 );
- assertThat( matched, isOneOf( expectedMatches ) );
- matchCount++;
- }
- }
- assertThat( matchCount, is( expectedMatches.length ) );
- }
-}
diff --git a/maven-scm-providers/maven-scm-provider-accurev/src/test/java/org/apache/maven/scm/provider/accurev/cli/AnnotateConsumerTest.java b/maven-scm-providers/maven-scm-provider-accurev/src/test/java/org/apache/maven/scm/provider/accurev/cli/AnnotateConsumerTest.java
deleted file mode 100644
index bfb9314..0000000
--- a/maven-scm-providers/maven-scm-provider-accurev/src/test/java/org/apache/maven/scm/provider/accurev/cli/AnnotateConsumerTest.java
+++ /dev/null
@@ -1,65 +0,0 @@
-
-package org.apache.maven.scm.provider.accurev.cli;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import static org.hamcrest.Matchers.is;
-import static org.hamcrest.MatcherAssert.assertThat;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.maven.scm.ScmTestCase;
-import org.apache.maven.scm.command.blame.BlameLine;
-import org.apache.maven.scm.log.DefaultLog;
-import org.apache.maven.scm.provider.accurev.AccuRev;
-import org.junit.Assert;
-import org.junit.Test;
-
-/**
- * @author Evgeny Mandrikov
- * @author Grant Gardner
- */
-public class AnnotateConsumerTest extends ScmTestCase {
-
- @Test
- public void testParse() throws Exception {
-
- List<BlameLine> consumedLines = new ArrayList<BlameLine>();
-
- AnnotateConsumer consumer = new AnnotateConsumer(consumedLines, new DefaultLog());
-
- AccuRevJUnitUtil.consume("/annotate.txt", consumer);
-
- Assert.assertEquals(12, consumer.getLines().size());
-
- BlameLine line1 = (BlameLine) consumer.getLines().get(0);
- Assert.assertEquals("2", line1.getRevision());
- Assert.assertEquals("go.d-in", line1.getAuthor());
- assertThat(line1.getDate(), is(AccuRev.ACCUREV_TIME_SPEC.parse("2008/10/26 16:26:44")));
-
- BlameLine line12 = (BlameLine) consumer.getLines().get(11);
- Assert.assertEquals("1", line12.getRevision());
- Assert.assertEquals("go.d-in", line12.getAuthor());
- assertThat(line12.getDate(), is(AccuRev.ACCUREV_TIME_SPEC.parse("2008/10/17 11:41:50")));
-
- }
-
-}
diff --git a/maven-scm-providers/maven-scm-provider-accurev/src/test/java/org/apache/maven/scm/provider/accurev/cli/AuthTokenConsumerTest.java b/maven-scm-providers/maven-scm-provider-accurev/src/test/java/org/apache/maven/scm/provider/accurev/cli/AuthTokenConsumerTest.java
deleted file mode 100644
index c88c25c0..0000000
--- a/maven-scm-providers/maven-scm-provider-accurev/src/test/java/org/apache/maven/scm/provider/accurev/cli/AuthTokenConsumerTest.java
+++ /dev/null
@@ -1,52 +0,0 @@
-package org.apache.maven.scm.provider.accurev.cli;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import static org.hamcrest.Matchers.is;
-import static org.hamcrest.MatcherAssert.assertThat;
-
-import org.junit.Test;
-
-public class AuthTokenConsumerTest
-{
-
- @Test
- public void testConsumeLineWithPasswordPrefix()
- {
- AuthTokenConsumer consumer = new AuthTokenConsumer();
- consumer.consumeLine( "Password: abcdef123456" );
- assertThat( consumer.getAuthToken(), is( "abcdef123456" ) );
-
- consumer.consumeLine( "A different line" );
- assertThat( consumer.getAuthToken(), is( "abcdef123456" ) );
- }
-
- @Test
- public void testConsumeLineWithoutPasswordPrefix()
- {
- AuthTokenConsumer consumer = new AuthTokenConsumer();
- consumer.consumeLine( "abcdef123456" );
- assertThat( consumer.getAuthToken(), is( "abcdef123456" ) );
-
- consumer.consumeLine( "A different line" );
- assertThat( consumer.getAuthToken(), is( "abcdef123456" ) );
- }
-
-}
diff --git a/maven-scm-providers/maven-scm-provider-accurev/src/test/java/org/apache/maven/scm/provider/accurev/cli/ClientVersionConsumerTest.java b/maven-scm-providers/maven-scm-provider-accurev/src/test/java/org/apache/maven/scm/provider/accurev/cli/ClientVersionConsumerTest.java
deleted file mode 100644
index 36b9a15..0000000
--- a/maven-scm-providers/maven-scm-provider-accurev/src/test/java/org/apache/maven/scm/provider/accurev/cli/ClientVersionConsumerTest.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package org.apache.maven.scm.provider.accurev.cli;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import static org.hamcrest.Matchers.is;
-import static org.hamcrest.MatcherAssert.assertThat;
-
-import org.junit.Test;
-
-public class ClientVersionConsumerTest
-{
-
- @Test
- public void testConsumeVersion()
- throws Exception
- {
- ClientVersionConsumer consumer = new ClientVersionConsumer();
- AccuRevJUnitUtil.consume( "/accurev.txt", consumer );
-
- assertThat( consumer.getClientVersion(), is( "4.7.4b" ) );
- }
-}
diff --git a/maven-scm-providers/maven-scm-provider-accurev/src/test/java/org/apache/maven/scm/provider/accurev/cli/DiffConsumerTest.java b/maven-scm-providers/maven-scm-provider-accurev/src/test/java/org/apache/maven/scm/provider/accurev/cli/DiffConsumerTest.java
deleted file mode 100644
index 7c261c9..0000000
--- a/maven-scm-providers/maven-scm-provider-accurev/src/test/java/org/apache/maven/scm/provider/accurev/cli/DiffConsumerTest.java
+++ /dev/null
@@ -1,51 +0,0 @@
-package org.apache.maven.scm.provider.accurev.cli;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import static org.hamcrest.Matchers.hasItem;
-import static org.hamcrest.Matchers.is;
-import static org.hamcrest.MatcherAssert.assertThat;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.maven.scm.log.DefaultLog;
-import org.apache.maven.scm.provider.accurev.FileDifference;
-import org.junit.Test;
-
-public class DiffConsumerTest
-{
-
- @Test
- public void testDiffXML()
- throws Exception
- {
- List<FileDifference> differences = new ArrayList<FileDifference>();
- XppStreamConsumer consumer = new DiffConsumer( new DefaultLog(), differences );
- AccuRevJUnitUtil.consume( "/diff-vvt.xml", consumer );
-
- assertThat( differences.size(), is( 3 ) );
- assertThat( differences, hasItem( new FileDifference( 8L, "/tcktests/src/main/java/Application.java", "2/3",
- null, null ) ) );
- assertThat( differences, hasItem( new FileDifference( 9L, "/tcktests/hello-world.txt", "2/4",
- "/tcktests/hello.world", "6/1" ) ) );
-
- }
-}
diff --git a/maven-scm-providers/maven-scm-provider-accurev/src/test/java/org/apache/maven/scm/provider/accurev/cli/FileConsumerTest.java b/maven-scm-providers/maven-scm-provider-accurev/src/test/java/org/apache/maven/scm/provider/accurev/cli/FileConsumerTest.java
deleted file mode 100644
index de173c3..0000000
--- a/maven-scm-providers/maven-scm-provider-accurev/src/test/java/org/apache/maven/scm/provider/accurev/cli/FileConsumerTest.java
+++ /dev/null
@@ -1,93 +0,0 @@
-package org.apache.maven.scm.provider.accurev.cli;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the
- * Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a
- * copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS"
- * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language
- * governing permissions and limitations under the License.
- */
-
-import static org.hamcrest.Matchers.hasItem;
-import static org.hamcrest.Matchers.is;
-import static org.hamcrest.MatcherAssert.assertThat;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.codehaus.plexus.util.cli.StreamConsumer;
-import org.junit.Test;
-
-public class FileConsumerTest
-{
-
- @Test
- public void testConsumeAdd() throws IOException
- {
- List<File> extractedFiles = new ArrayList<File>();
-
- StreamConsumer consumer = new FileConsumer( extractedFiles, FileConsumer.ADD_PATTERN );
-
- consumer.consumeLine( "Added and kept element /./src/main/java/Application.java" );
- consumer.consumeLine( "Added and kept element \\.\\src\\main\\java\\Windows.java" );
-
- assertThat( extractedFiles.size(), is( 2 ) );
- assertThat( extractedFiles, hasItem( new File( "src/main/java/Application.java" ) ) );
- assertThat( extractedFiles, hasItem( new File( "src\\main\\java\\Windows.java" ) ) );
- }
-
- @Test
- public void testConsumeUpdate() throws IOException
- {
- List<File> extractedFiles = new ArrayList<File>();
- StreamConsumer consumer = new FileConsumer( extractedFiles, FileConsumer.UPDATE_PATTERN );
-
- consumer.consumeLine( "Content (1 K) of \"readme.txt\" - ok" );
- consumer.consumeLine( "Creating dir \"src/main/java/org\" ." );
- consumer.consumeLine( "Updating (creating) dir /./src/test/java" );
- consumer.consumeLine( "Updating element \\.\\src\\main\\java\\Application.java" );
-
- assertThat( extractedFiles.size(), is( 2 ) );
- assertThat( extractedFiles, hasItem( new File( "readme.txt" ) ) );
- assertThat( extractedFiles, hasItem( new File( "src\\main\\java\\Application.java" ) ) );
- }
-
- @Test
- public void testConsumePromoted() throws IOException
- {
- List<File> extractedFiles = new ArrayList<File>();
-
- StreamConsumer consumer = new FileConsumer( extractedFiles, FileConsumer.PROMOTE_PATTERN );
-
- consumer.consumeLine( "Promoted element /./src/main/java/Application.java" );
- consumer.consumeLine( "Promoted element \\.\\src\\main\\java\\Windows.java" );
-
- assertThat( extractedFiles.size(), is( 2 ) );
- assertThat( extractedFiles, hasItem( new File( "src/main/java/Application.java" ) ) );
- assertThat( extractedFiles, hasItem( new File( "src\\main\\java\\Windows.java" ) ) );
- }
-
- @Test
- public void testConsumeRemoved() throws IOException
- {
- List<File> extractedFiles = new ArrayList<File>();
- StreamConsumer consumer = new FileConsumer( extractedFiles, FileConsumer.DEFUNCT_PATTERN );
-
- consumer.consumeLine( "Recursively removing \"tcktests/src\" ." );
- consumer.consumeLine( "Removing \"tcktests/src/main/java/Application.java\" ." );
- consumer.consumeLine( "Removing \"tcktests/src/main/java\" ." );
- consumer.consumeLine( "Removing \"tcktests/src/main\" ." );
- consumer.consumeLine( "Removing \"tcktests/src\" ." );
-
- assertThat( extractedFiles.size(), is( 4 ) );
- assertThat( extractedFiles, hasItem( new File( "tcktests/src" ) ) );
- assertThat( extractedFiles, hasItem( new File( "tcktests/src/main/java/Application.java" ) ) );
- }
-}
diff --git a/maven-scm-providers/maven-scm-provider-accurev/src/test/java/org/apache/maven/scm/provider/accurev/cli/HistoryConsumerTest.java b/maven-scm-providers/maven-scm-provider-accurev/src/test/java/org/apache/maven/scm/provider/accurev/cli/HistoryConsumerTest.java
deleted file mode 100644
index e1545c3..0000000
--- a/maven-scm-providers/maven-scm-provider-accurev/src/test/java/org/apache/maven/scm/provider/accurev/cli/HistoryConsumerTest.java
+++ /dev/null
@@ -1,64 +0,0 @@
-package org.apache.maven.scm.provider.accurev.cli;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import static org.apache.maven.scm.provider.accurev.VersionMatcher.version;
-import static org.hamcrest.Matchers.is;
-import static org.hamcrest.MatcherAssert.assertThat;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-
-import org.apache.maven.scm.log.DefaultLog;
-import org.apache.maven.scm.provider.accurev.Transaction;
-import org.hamcrest.Matchers;
-import org.junit.Test;
-
-public class HistoryConsumerTest
-{
-
- @Test
- public void testConsumeStreamHistory()
- throws IOException
- {
- List<Transaction> transactions = new ArrayList<Transaction>();
- XppStreamConsumer consumer = new HistoryConsumer( new DefaultLog(), transactions );
- AccuRevJUnitUtil.consume( "/streamHistory.xml", consumer );
-
- assertThat( transactions.size(), is( 4 ) );
- Transaction t = transactions.get( 0 );
- assertThat( t.getTranType(), is( "promote" ) );
- assertThat( t.getWhen(), is( new Date( 1233782838000L ) ) );
- assertThat( t.getAuthor(), is( "ggardner" ) );
- assertThat( t.getId(), is( 50L ) );
- assertThat( t.getVersions().size(), is( 2 ) );
-
- assertThat( t.getVersions(),
- Matchers.<Transaction.Version>hasItem( version( 8L, "/./tcktests/src/main/java/Application.java",
- "1/1", "2/3" ) ) );
-
- t = transactions.get( 1 );
- assertThat( t.getComment(), is( "hpromoting" ) );
-
- }
-
-}
diff --git a/maven-scm-providers/maven-scm-provider-accurev/src/test/java/org/apache/maven/scm/provider/accurev/cli/InfoConsumerTest.java b/maven-scm-providers/maven-scm-provider-accurev/src/test/java/org/apache/maven/scm/provider/accurev/cli/InfoConsumerTest.java
deleted file mode 100644
index 02b9585..0000000
--- a/maven-scm-providers/maven-scm-provider-accurev/src/test/java/org/apache/maven/scm/provider/accurev/cli/InfoConsumerTest.java
+++ /dev/null
@@ -1,92 +0,0 @@
-package org.apache.maven.scm.provider.accurev.cli;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
... 129937 lines suppressed ...