hrepmngr Command-Manage Repository

The hrepmngr command is used for repository management. The hrepmngr command lets administrators do the following functions:
cahscm101
The hrepmngr command is used for repository management. The hrepmngr command lets administrators do the following functions:
  • Create repositories
  • Delete repositories
  • Duplicate repositories
  • Load repositories
  • Rename repositories
  • Update repository property
  • Delete item or path
  • Move item or path
  • Rename item or path
  • Update item or path property
  • Create empty path
These operations are mutually exclusive.
When a pattern is used in the command, it must be in single or double quotation marks in UNIX.
Create Repository
The option -cr is used with hrepmngr to create a new repository, and has the following syntax:
hrepmngr 
name(s)
 -cr{
options
}
  • -cr
    (Required) Specifies to create repository or path.
  • -b 
    name
    (Required) Specifies the 
    CA Harvest SCM
     broker name.
  • -usr 
    username
    (Required, unless -prompt is specified) Specifies the user name for login to the broker. If -usr is defined without -pw, the user is prompted for the password at runtime.
  • -pw 
    password
    (Required, unless -prompt is specified) Specifies the password for login to the broker. To hide the password from being exposed in plain text on the command line, use the -prompt option.
  • -nc
    (Optional) Specifies that binary files should not be compressed.
  • -coe 
    ext(s)
    (Optional) Specifies that all binary files should be compressed except for those with the extensions specified.
  • -mvs
    (Optional) Specifies that MVS is set to 
    on
    .
  • -noext
    (Optional) Specifies that file extensions should not be used.
  • -rext
    (Optional) Specifies that the repository text file extension should be used.
  • -addext 
    ext(s)
    (Optional) Specifies to add an extension. It must be used with -rext option.
  • -addvgrp 
    group(s
    )
    (Optional) Adds view group. Options for adding and removing group(s) for view access can be used together.
  • -addugrp 
    group(s)
    (Optional) Adds update group. Options for adding and removing group(s) for update access can be used together.
  • -addsgrp 
    group(s)
    (Optional) Adds secure group. Options for adding and removing group(s) for secure access can be used together.
  • -c "
    comment
    "
    (Optional) Specifies to add a comment to the repository notes field.
    Note:
     The options -c and -fc are mutually exclusive; you can use one or the other.
  • -fc 
    path_file.txt
    (Optional) Specifies to add comments from a file to the repository notes field.
    The options -c and -fc are mutually exclusive; you can use one or the other.
Example: Create Repository
To create a new repository TestRep with default property:
hrepmngr -b brokername -usr username -pw password -cr TestRep
Delete Repository
The option -del is used with hrepmngr to delete a repository, and has the following syntax:
hrepmngr 
name(s)
 or "
pattern
" -del{
options}
  • -del
    (Required) Specifies to delete a repository.
  • -b 
    name
    (Required) Specifies the 
    CA Harvest SCM
     broker name.
  • -usr 
    username
    (Required, unless -prompt is specified) Specifies the user name for login to the broker. If -usr is defined without -pw, the user is prompted for the password at runtime.
  • -pw 
    password
    (Required, unless -prompt is specified) Specifies the password for login to the broker. To hide the password from being exposed in plain text on the command line, use the -prompt option.
Example: Delete Repository
To delete a repository TestRep:
hrepmngr
 
-b brokername -usr username -pw password -del TestRep
Duplicate Repository
The option -dup is used with hrepmngr to duplicate a repository, and has the following syntax:
hrepmngr -dup -srn 
name
 -drn 
name
 {
options
}
-dup
(Required) Specifies to duplicate a repository. The options -srn and -drn must be used with this option.
  • -b 
    name
    (Required) Specifies the 
    CA Harvest SCM
     broker name.
  • -usr 
    username
    (Required, unless -prompt is specified) Specifies the user name for login to the broker. If -usr is defined without -pw, the user is prompted for the password at runtime.
  • -pw 
    password
    (Required, unless -prompt is specified) Specifies the password for login to the broker. To hide the password from being exposed in plain text on the command line, use the -prompt option.
  • -srn 
    name
    (Required) Specifies the source repository name for the -dup (duplicate repository) option.
  • -drn 
    name
    (Required) Specifies the destination repository for the -dup (duplicate repository) option.
  • -ndac
    (Optional) Specifies that access control should not be duplicated for the -dup (duplicate repository) option.
Example: Duplicate Repository
To duplicate repository TestRep2 from repository TestRep1:
hrepmngr
 
-b brokername -usr username -pw password -dup -srn TestRep1 -drn TestRep2
Load Repository
Use the -ld option with hrepmngr to load files from a repository. Use the following syntax:
hrepmngr "
pattern
" -ld -cp 
clientpath
 -rp 
repositorypath
 {
options
}
  • -ld
    (Required) Specifies to load a repository.
    The -cp option must be used with this option.
  • -b 
    name
    (Required) Specifies the 
    CA Harvest SCM
     broker name.
  • -usr 
    username
    (Required, unless -prompt is specified) Specifies the user name for login to the broker. If -usr is defined without -pw, the user is prompted for the password at runtime.
  • -pw 
    password
    (Required, unless -prompt is specified) Specifies the password for login to the broker. To hide the password from being exposed in plain text on the command line, use the -prompt option.
  • -cp 
    clientpath
    (Required) Specifies a client path for the -ld (load repository) option.
  • -rp 
    repositorypath
    (Required) Specifies the repository path.
  • -r
    (Optional) Specifies to recursively load files.
  • -cep
    (Optional) Specifies to create empty repository paths during recursive loading.
  • -rm
    (Optional) Specifies the remote computer name.
  • -rport
    (Optional) Specifies the remote computer port number.
  • -rusr
    (Optional) Specifies the remote user.
  • -rpw
    (Optional) Specifies the remote user password.
  • -er 
    filename
    (Optional) Specifies the remote user filename.
  • -c "
    comment
    "
    (Optional) Specifies to add a comment to the repository notes field.
    The options -c and -fc are mutually exclusive; you can use one or the other.
Example: Load Repository
To recursively load all files from the client path \TestRep1\dir1 to repository path \TestRep2\dir2:
hrepmngr
 
-b brokername -usr username -pw password -ld "*" -cp "\TestRep1\dir1" -rp \TestRep2\dir2
 -
r
Rename Repository
The option -ren, is used with hrepmngr to rename a repository, and has the following syntax:
hrepmngr -ren -oldname 
name 
-newname 
name
 {
options
}
  • -ren
    (Required) Specifies to rename a repository. The options -rp, -oldname, and -newname can be used with this option.
  • -b 
    name
    (Required) Specifies the 
    CA Harvest SCM
     broker name.
  • -usr 
    username
    (Required, unless -prompt is specified) Specifies the user name for login to the broker. If -usr is defined without -pw, the user is prompted for the password at runtime.
  • -pw 
    password
    (Required, unless -prompt is specified) Specifies the password for login to the broker. To hide the password from being exposed in plain text on the command line, use the -prompt option.
  • -oldname 
    name
    (Required) Specifies the name of the repository to rename.
  • -newname 
    name
    (Required) Specifies the new name of the repository being renamed.
  • -isv
    (Optional) Specifies to ignore the snapshot view for the rename repository.
Example: Rename Repository
To rename the repository TestRep1 to TestRep2:
hrepmngr
 
-b brokername -usr username -pw password -ren -oldname TestRep1 -newname TestRep2
Update Repository Property
The option -upd, is used with hrepmngr to update a repository property, and has the following syntax:
hrepmngr 
name
(
s
) or "
pattern
" -upd {
options
}
  • -upd
    (Required) Specifies to update a repository.
  • -b 
    name
    (Required) Specifies the 
    CA Harvest SCM
     broker name.
  • -usr 
    username
    (Required, unless -prompt is specified) Specifies the user name for login to the broker. If -usr is defined without -pw, the user is prompted for the password at runtime.
  • -pw 
    password
    (Required, unless -prompt is specified) Specifies the password for login to the broker. To hide the password from being exposed in plain text on the command line, use the -prompt option.
  • -nc
    (Optional) Specifies that binary files should not be compressed.
  • -coe
     ext(s)
    (Optional) Specifies that all binary files should be compressed except for those with the extensions specified.
  • -co
    (Optional) Compresses all binary files.
  • -appext
    (Optional) Specifies to append an extension or extensions to the extension list.
  • -mvs
    (Optional) Specifies that MVS is set to 
    on
    .
  • -nmvs
    (Optional) Specifies that MVS is set to 
    off
    .
  • -gext
    (Optional) Specifies to use global repository text file extension.
  • -noext
    (Optional) Specifies that file extensions should not be used.
  • -rext
    (Optional) Specifies that the repository text file extension should be used.
  • -addext 
    ext
    (
    s
    )
    (Optional) Specifies to add an extension.
    This option must be used with the -rext option.
  • -remext 
    ext(s)
    (Optional) Specifies to remove an extension or extensions.
  • -addvgrp 
    groupname(s)
    (Optional) Specifies to add view group.
    Options for adding and removing group(s) for view access can be used together.
  • -remvgrp 
    groupname(s)
    (Optional) Specifies to remove view group.
    Options for adding and removing group(s) for view access can be used together.
  • -addugrp 
    groupname(s)
    (Optional) Specifies to add update group.
    Options for adding and removing group(s) for update access can be used together.
  • -remugrp 
    groupname(s)
    (Optional) Specifies to remove update group.
    Options for adding and removing group(s) for update access can be used together.
  • -addsgrp 
    groupname(s)
    (Optional) Specifies to add one or more secure groups.
    Options for adding and removing group(s) for secure access can be used together.
  • -remsgrp 
    groupname(s)
    (Optional) Specifies to remove one or more secure groups.
    Note:
     Options for adding and removing group(s) for secure access can be used together.
  • -c "
    comment
    "
    (Optional) Specifies to add a comment to the repository notes field.
    The options -c and -fc are mutually exclusive; you can use one or the other.
  • -fc 
    path
    _
    file
    .
    txt
    (Optional) Specifies to add comments from a file to the repository notes field.
    The options -c and -fc are mutually exclusive; you can use one or the other.
  • -appc
    (Optional) Specifies to append comments to repository note field.
Example: Update Repository Property
To set the property to compress all binary files in TestRep1:
hrepmngr
 
-b brokername -usr username -pw password -upd TestRep1 -co
Move Item or Path
The option -mv, is used with hrepmngr to move an item or path and has the following syntax:
hrepmngr 
itemname(s)
 or 
pathname(s)
 or "
pattern
" -mv -srp 
path 
-drp 
path 
{
options
}
  • -mv 
    itemname
     | 
    pathname
     | "
    pattern
    "
    (Required) Specifies to move an item or path.
  • -b 
    name
    (Required) Specifies the 
    CA Harvest SCM
     broker name.
  • -usr 
    username
    (Required, unless -prompt is specified) Specifies the user name for login to the broker. If -usr is defined without -pw, the user is prompted for the password at runtime.
  • -pw 
    password
    (Required, unless -prompt is specified) Specifies the password for login to the broker. To hide the password from being exposed in plain text on the command line, use the -prompt option.
  • -srp 
    path
    (Required) Specifies the source repository path name for the -mv (move item or path) option.
  • -drp 
    path
    (Required) Specifies the destination repository path name for the -mv (move item or path) option.
  • -isv
    (Optional) Specifies to ignore the snapshot view for the move item or path.
Example: Move Item or Path
To move the item TestItem and the path TestPath from repository path \Rep\Path1 to the repository path \Rep\Path2 without checking the snapshot view:
hrepmngr
 
-b brokername -usr username -pw password -mv TestItem TestPath -srp \Rep\Path1 -drp \Rep\Path2 -isv
Delete Item or Path
The option -del, is used with hrepmngr to delete an item or repository path and has the following syntax:
hrepmngr 
itemname(s)
 or 
pathname(s)
 or "
pattern
" -del -rp 
path
 {
options
}
  • -del
    (Required) Specifies to delete a repository item, or path.
  • -b 
    name
    (Required) Specifies the 
    CA Harvest SCM
     broker name.
  • -usr 
    username
    (Required, unless -prompt is specified) Specifies the user name for login to the broker. If -usr is defined without -pw, the user is prompted for the password at runtime.
  • -pw 
    password
    (Required, unless -prompt is specified) Specifies the password for login to the broker. To hide the password from being exposed in plain text on the command line, use the -prompt option.
  • -rp 
    repositorypath
    (Required) Specifies the repository path.
Example: Delete Item or Path
To delete the item TestItem and path TestPath from the repository path \TestRep\TestPath:
hrepmngr
 
-b brokername -usr username -pw password -del TestItem TestPath -rp \TestRep\TestPath
Rename Item or Path
The option -ren, is used with hrepmngr to rename an item or repository path, and has the following syntax:
hrepmngr -ren -oldname 
name
 -newname 
name
 -rp 
path
 {
options
}
  • -ren
    (Required) Specifies to rename a repository item, or path. The options -rp, -oldname, and -newname must be used with this option.
  • -b 
    name
    (Required) Specifies the 
    CA Harvest SCM
     broker name.
  • -usr 
    username
    (Required, unless -prompt is specified) Specifies the user name for login to the broker. If -usr is defined without -pw, the user is prompted for the password at runtime.
  • -pw 
    password
    (Required, unless -prompt is specified) Specifies the password for login to the broker. To hide the password from being exposed in plain text on the command line, use the -prompt option.
  • -rp 
    repositorypath
    (Required) Specifies the repository path.
  • -oldname 
    name
    (Required) Specifies the name of the repository item, or path to rename.
  • -newname 
    name
    (Required) Specifies the new name of the repository item, or path to rename.
  • -isv
    (Optional) Specifies to ignore the snapshot view.
Example: Rename Item or Path
To rename path TestPath1 of the repository path \Rep\Path to TestPath2 without checking the snapshot view:
hrepmngr
 
-b brokername -usr username -pw password -ren -rp \Rep\Path -oldname TestPath1 -newname TestPath2 -isv
Update Item or Path Property
The option -upd is used with hrepmngr to update Item or Path property, and has the following syntax:
hrepmngr 
itemname(s)
 or 
pathname(s)
 or "
pattern
" -upd -rp 
path
 {
options
}
  • -upd
    (Required) Specifies to update a repository, item, or path.
  • -b 
    name
    (Required) Specifies the 
    CA Harvest SCM
     broker name.
  • -usr 
    username
    (Required, unless -prompt is specified) Specifies the user name for login to the broker. If -usr is defined without -pw, the user is prompted for the password at runtime.
  • -pw 
    password
    (Required, unless -prompt is specified) Specifies the password for login to the broker. To hide the password from being exposed in plain text on the command line, use the -prompt option.
  • -rp 
    repositorypath
    (Required) Specifies the repository path.
  • -addvgrp 
    groupname(s)
    (Optional) Specifies to add view group(s).
    Options for adding and removing group(s) for view access can be used together.
  • -remvgrp 
    groupname(s)
    (Optional) Specifies to remove view group.
    Options for adding and removing group(s) for view access can be used together.
Example: Update Item or Path Property
To add group TestGrp1 and TestGrp2 to view access, and remove group TestGrp3 and TestGrp4 from view access for item TestItem and path TestPath from the repository path \TestRep\Path:
hrepmngr -b brokername -usr username -pw password -upd  TestItem TestPath -rp \TestRep\Path -addvgrp Grp1 Grp2 -remvgrp Grp3 Grp4
Create Empty Path
The option -cr is used with hrepmngr to create an empty path, and has the following syntax:
hrepmngr -cr -rp 
path
 {
options
}
  • -cr 
    (Required) Specifies to create the repository or path.
  • -b 
    name
    (Required) Specifies the 
    CA Harvest SCM
     broker name.
  • -usr 
    username
    (Required, unless -prompt is specified) Specifies the user name for login to the broker. If -usr is defined without -pw, the user is prompted for the password at runtime.
  • -pw 
    password
    (Required, unless -prompt is specified) Specifies the password for login to the broker. To hide the password from being exposed in plain text on the command line, use the -prompt option.
  • -rp 
    name
     | 
    repositorypath
    (Required) Specifies the repository path.
  • -all
    (Optional) Specifies all baseline, an option for create empty path. This option creates the path structure in all existing baselines of the repository.
Example: Create Empty Path
To create an empty path TestPath2 under \TestRep\TestPath1, and update the repository only with the new item path:
hrepmngr -b brokername -usr username -pw password -cr -rp \TestRep\TestPath1\TestPath2