private void extractWorkspace(String line) { // With no stream (flow target): // Workspace: (1000) "BogusRepositoryWorkspace" <-> (1000) "BogusRepositoryWorkspace" // With a stream: // Workspace: (1156) "GPDBWorkspace" <-> (1157) "GPDBStream" Matcher matcher = WORKSPACE_PATTERN.matcher(line); if (matcher.find()) { JazzScmProviderRepository jazzRepository = (JazzScmProviderRepository) getRepository(); int workspaceAlias = Integer.parseInt(matcher.group(1)); String workspace = matcher.group(2); int streamAlias = Integer.parseInt(matcher.group(3)); String stream = matcher.group(4); if (getLogger().isDebugEnabled()) { getLogger().debug("Successfully parsed \"Workspace:\" line:"); getLogger().debug(" workspaceAlias = " + workspaceAlias); getLogger().debug(" workspace = " + workspace); getLogger().debug(" streamAlias = " + streamAlias); getLogger().debug(" stream = " + stream); } jazzRepository.setWorkspaceAlias(workspaceAlias); jazzRepository.setWorkspace(workspace); jazzRepository.setFlowTargetAlias(streamAlias); jazzRepository.setFlowTarget(stream); } }
protected void setUp() throws Exception { super.setUp(); repo = getScmProviderRepository(); // Simulate the output of the parsing of the "scm status" command. // IE, fill in the workspace and stream details // Only needed for tests that require "pushChanges" type operations. repo.setWorkspace("Dave's Repository Workspace"); repo.setFlowTarget("Dave's Stream"); }