Appendix for View Manager Command Line Syntax

0 Likes

Problem:

Appendix for View Manager Command Line Syntax

Resolution:

  • Product Name: StarTeam
  • Product Version: 2005 (7.x) and above
  • Product Component: ViewManager Command Line
  • Platform/OS Version: All Supported Platform
  • JDK/Compiler Version: All Supported JDK versions

Description:

If specify simultaneously -brealkocks, -lockservers and -unlockservers options, its behavior is unsettled according to file lock status and/or merge action. The customer requested more detailed documentation than current admin.pdf - Chapter 8: Using View Manager, View Manger Command Line Syntax description like not recommended set of options and notice. Please see more details in the bellow Answer/Solution section.


Answer/Solution:

Q: 1) If specify -lockserervers or -unlockservers without project and source/target view options, viewmgr output "the source and target objects are identical" message and server will be locked or unlocked.

prompt> java -cp .\streplicate.jar;.\jhall.jar;"..\StarTeam SDK 2005 R2\Lib\starteam80.jar" com.starbase.starteam.streplicate.streplicator -s "Administrator:password@Orion:49201" -lockservers
StarTeam 8.0 Command Line Replication Utility
Copyright (c) 1995-2003 Borland Software Corporation. All rights reserved.
Portions Copyright (c) 1996 Microsoft Corporation. All rights reserved.
Build Number 5.2.199
StarGate Build Number 8.0.58
Replication aborted due to the following exception: The source
and target objects are identical. The operation cannot be performed.
Check the log file

[ACT]: Server will be locked

A: If the command line merge is used without the source and target specified the default source and target are the same view, so this behavior is by design. A better way to lock the StarTeam server is to use the client command:

stcmd server-mode -s "JMarsh:password@Orion:49201" -mode exlock

This is documented in the StarTeam client User"s Guide. Chapter 22 using stcmd Command-Line.

Q: 2) If specify -lockservers, -unlockservers and -breaklocks options, server will be remained as locked.

prompt>java -cp .\streplicate.jar;.\jhall.jar;"..\StarTeam SDK 2005 R2\Lib\starteam80.jar" com.starbase.starteam.streplicate.streplicator -breaklocks -s "Administrator:password@Orion:49201" -p "case615425" -srcview "case615425/Folder02" -srcfolder "/" -tgtview "case615425" -tgtfolder "Folder02" -b -cf -batch -reptimes -rlabels -si target -sf target -recordmp -usemptgt -usesource binary -lockservers -unlockservers
StarTeam 8.0 Command Line Replication Utility
Copyright (c) 1995-2003 Borland Software Corporation. All rights reserved.
Portions Copyright (c) 1996 Microsoft Corporation. All rights reserved.
Build Number 5.2.199
StarGate Build Number 8.0.58
Synchronizing Folder Folder02\
Synchronizing item Folder02\test.txt
Status: Merge
Action: Automatic merge
Result: Merged
Synchronized item Folder02\test.txt
Status: Exists in both
Action: Check children
Result: Checking done
Synchronized Folder Folder02\
Requested operation has been completed, but exceptions were reported during process.
Please check the log file prompt\Log\Repmgr-07-12-05-14-05-45.log for details.
prompt>

[ACT]: Server remain as locked

A: These two switches are the opposite of one another and will cancel each other out -lockservers -unlockservers. This is by design. Borland suggest you to not use conflicting switches, decide whether the server should be locked or unlocked and then use that.

Really the server should be locked with one command and then later after the merge unlocked with a second command. Both -lockservers and -unlockservers should not be used at the same time.

Q: 3) If specify -breaklocks and -batch option and merge action is [Manual merge], source and target"s lock will be unlocked.

prompt>java -cp .\streplicate.jar;.\jhall.jar;"..\StarTeam SDK 2005 R2\Lib\starteam80.jar" com.starbase.starteam.streplicate.streplicator -breaklocks -s "Administrator:password@Orion:49201" -p "case615425" -srcview "case615425/Folder02" -srcfolder "/" -tgtview "case615425" -tgtfolder "Folder02" -b -cf -batch -reptimes -rlabels -si target -sf target -recordmp -usemptgt -usesource binary
StarTeam 8.0 Command Line Replication Utility
Copyright (c) 1995-2003 Borland Software Corporation. All rights reserved.
Portions Copyright (c) 1996 Microsoft Corporation. All rights reserved.
Build Number 5.2.199
StarGate Build Number 8.0.58
Synchronizing Folder Folder02\
Synchronizing item Folder02\test.txt
Status: Merge
Action: Manual merge
Result: Manual merge needed
Synchronized item Folder02\test.txt
Status: Exists in both
Action: Check children
Result: Checking done
Synchronized Folder Folder02\
Requested operation has been completed successfully
prompt>

[ACT]: Source and Target view"s file lock will be unlocked.

A: The -breaklocks switch was designed to break all relevant locks.


Author: T.Tsuchiya

Old KB# 28061
Comment List
Related
Recommended