Pregunta

The config spec of a CCRC view can be synchronized with the stream from CCRC eclipse UI by calling 'Refresh->Update from repository'.

I wanted to know if there is a way to do it from command-line. I have tried 'rcleartool update' command. But I don't think it actually updates the config spec of the view from the stream. I might be wrong ??

Has anyone tried this using CM API? Or any other approach?

¿Fue útil?

Solución

com.ibm.rational.wvcm.stp.cc.CcView.doRefresh() method solves this problem.

More documentation on how to get a CcView object and javadoc should be available in your CCRC installation - C:\Program Files\IBM\Rational\common\CM\teamapi.zip.

Unzip and see - projects\samples\doc\index.html for sample programs.

--- More details..Sample code ---

StpProvider provider = (StpProvider) ProviderFactory.createProvider(
                    CcProvider.CC_ONLY_PROVIDER_CLASS,
                    new DefaultCallback());
provider.setServerUrl(<CM SERVER URL>);
m_provider = provider.ccProvider();

File viewRoot = new File(<PATH TO VIEW ROOT>);
StpLocation viewLocation = provider.filePathLocation(StpProvider.Domain.CLEAR_CASE, viewRoot);

// Get instance of CcView that represents the CCRC view.
CcView view = provider.ccView(viewLocation);

// Options while updating view
CcFile.RefreshFlag[] refreshFlags = new CcFile.RefreshFlag[1];
refreshFlags[0] = CcFile.RefreshFlag.OVERWRITE_HIJACKS;

PropertyRequestItem.PropertyRequest properties = new PropertyRequestItem.PropertyRequest(CcView.DISPLAY_NAME, CcView.CONFIG_SPEC);

view.doRefresh(refreshFlags, properties);

Otros consejos

I don't see that feature available when looking at the list of rcleartool commands.

The cleartool (not rcleartool) command behind a "synchronize with stream" is

cleartool setcs -stream

(See "Synchronize with stream clear case integration view" for more)

And setcs isn't part of the rcleartool commands.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top