Skip to content

Instantly share code, notes, and snippets.

@jpluimers
Last active September 12, 2018 14:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jpluimers/868287087253d439a79dad99aa50dbc0 to your computer and use it in GitHub Desktop.
Save jpluimers/868287087253d439a79dad99aa50dbc0 to your computer and use it in GitHub Desktop.
PlasticSCM output of `cm showfindobjects`
Available objects and attributes:
ATTRIBUTE
Comment
Date
GUID
ID
Owner
SrcObj
Type
Value
ATTRIBUTETYPE
Comment
Date
GUID
ID
Name
Owner
ReplLogId
ReplSrcDate
ReplSrcId
ReplSrcRepository
ReplSrcServer
Source
Value
BRANCH
Attribute
AttrValue
Changesets
Comment
Date
GUID
ID
Item
Name
Owner
Parent
ReplLogId
ReplSrcDate
ReplSrcId
ReplSrcRepository
ReplSrcServer
CHANGESET
Attribute
AttrValue
Branch
ChangesetId
Comment
Date
GUID
ID
OnlyWithRevisions
Owner
Parent
ReplLogId
ReplSrcDate
ReplSrcId
ReplSrcRepository
ReplSrcServer
ReturnParent
LINK
Comment
Date
DstObj
GUID
ID
Owner
SrcObj
Type
LINKTYPE
Comment
Date
Destination
GUID
ID
Name
Owner
Source
MARKER
Attribute
AttrValue
Branch
Branchid
Changeset
Comment
Date
GUID
ID
Name
Owner
ReplLogId
ReplSrcDate
ReplSrcId
ReplSrcRepository
ReplSrcServer
MERGE
Date
DstBranch
DstChangeset
GUID
ID
Owner
SrcBranch
SrcChangeset
Type
MOVED
Comment
Date
DstBranch
DstChangeset
DstDirRev
Item
ItemId
Owner
SrcBranch
SrcChangeset
SrcDirRev
REMOVED
Branch
Changeset
Comment
Date
DirRev
Item
ItemId
Owner
REPLICATIONLOG
Branch
Date
ID
Owner
Package
RepositoryName
Server
REPLICATIONSOURCE
ID
RepositoryName
Server
REVIEW
Assignee
Comment
Date
GUID
Id
Owner
Status
Target
TargetId
TargetType
Title
REVIEWCOMMENT
Comment
Date
GUID
Id
Location
Owner
Review
ReviewId
RevisionId
REVISION
Archived
Attribute
AttrValue
Branch
Changeset
Comment
Date
GUID
ID
Item
ItemId
Owner
Parent
ReplLogId
ReplSrcDate
ReplSrcId
ReplSrcRepository
ReplSrcServer
ReturnParent
Shelve
Size
Type
WorkspaceCheckoutId
SECUREDPATH
Date
ID
Owner
Path
Tag
SHELVE
Attribute
AttrValue
Comment
Date
GUID
ID
Owner
Parent
ReplLogId
ReplSrcDate
ReplSrcId
ReplSrcRepository
ReplSrcServer
ShelveId
USER
Active
Code
Group
Name
:: since there is no XSD as per https://twitter.com/jpluimers/status/1039836990668197888
:: try to dump the manual way so we get a feel for the data that is part of our PlasticSCM repositories
if "%1"=="" goto :list
call cm find %1 --xml > %1.xml
goto :eof
:list
call %0 ATTRIBUTE
call %0 ATTRIBUTETYPE
call %0 BRANCH
call %0 CHANGESET
call %0 LINK
call %0 LINKTYPE
call %0 MARKER
call %0 MERGE
call %0 MOVED
call %0 REMOVED
call %0 REPLICATIONLOG
call %0 REPLICATIONSOURCE
call %0 REVIEW
call %0 REVIEWCOMMENT
call %0 REVISION
call %0 SECUREDPATH
call %0 SHELVE
call %0 USER

One problem is that batch file does not return results when there are none available in a repository.

Another problem is that the XML elements do not map from the above list; for instance

  • ATTRIBUTETYPE results in an element ATTRIBUTEENTITY
  • MOVED results in an element MOVEREALIZATION
  • REMOVED results in an element REMOVEDREALIZATION

This means the PlasticSCM code base is not consistent in their POCO and mappings.

One route to get the POCO and mapping could be the https://reflector.net, but that is time consuming.

@jpluimers
Copy link
Author

Base types:

ATTRIBUTE
ATTRIBUTETYPE
BRANCH
CHANGESET
LINK
LINKTYPE
MARKER
MERGE
MOVED
REMOVED
REPLICATIONLOG
REPLICATIONSOURCE
REVIEW
REVIEWCOMMENT
REVISION
SECUREDPATH
SHELVE
USER

@jpluimers
Copy link
Author

jpluimers commented Sep 12, 2018

One problem is that batch file does not return results when there are none available in a repository.

Another problem is that the XML elements do not map from the above list; for instance

  • ATTRIBUTETYPE results in an element ATTRIBUTEENTITY
  • MOVED results in an element MOVEREALIZATION
  • REMOVED results in an element REMOVEDREALIZATION

This means the PlasticSCM code base is not consistent in their POCO and mappings.

:: https://gist.github.com/jpluimers/868287087253d439a79dad99aa50dbc0
if "%1"=="" goto :list
call cm find %1 --xml > %1.xml
goto :eof
:list
  call %0 ATTRIBUTE
  call %0 ATTRIBUTETYPE
  call %0 BRANCH
  call %0 CHANGESET
  call %0 LINK
  call %0 LINKTYPE
  call %0 MARKER
  call %0 MERGE
  call %0 MOVED
  call %0 REMOVED
  call %0 REPLICATIONLOG
  call %0 REPLICATIONSOURCE
  call %0 REVIEW
  call %0 REVIEWCOMMENT
  call %0 REVISION
  call %0 SECUREDPATH
  call %0 SHELVE
  call %0 USER

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment