Understanding the sws checkin Command

This command creates a new commit that contains the changes made in the workspace in the semiconductor item repository.

See Also
Locking Files or Folders in a Workspace
Creating a Semiconductor Item Workspace
sws create Command Options
Unlocking Files and Folders in the Workspace
Excluding Objects from Workspace Operations

The checkin command commits the set of specified files and folders to the associated semiconductor logical item. Objects you want to checkin must be locked in the workspace performing the checkin. The workspace must be up to date and at the latest commit to update the files and folders with a checkin. When you supply a folder, the command always runs recursively on the folder. All unmanaged files in the folder, unless explicitly exempted by the .dsrepoignore file, are committed as new objects.

The specified paths can include more than one repository or item. The checkin command groups the files and folders for checkin by repository or item, updating each independently in a single commit.

The paths specified by the argument can be relative or absolute. Any relative path uses the base directory specified with the --dir option. If you do not specify a --dir, then the base directory path uses the current working directory as the default.

Specify a comment for every checkin operation. You can use either the --comment option or use a file containing a text comment with the --cfile option.

When you do not specify the --verbose, the command returns a success message that includes the number of files committed and the amount of data transferred. When you specify the --verbose option, the output also includes a list of the added, removed, and modified files committed to the server.

The command does not succeed if:

  • any objects specified do not belong to a workspace.
  • you do not specify any files or folders to checkin.
  • the files are not locked in the workspace performing the checkin.
Note: Use .dsrepoignore files to enter patterns for files to ignore.

The checkin operation, by default, releases locks on the files being checked in and any unmodified files included within the specified path. If a file is explictly locked, it can be unlocked by the checkin of a folder at a higher level in the folder tree. For example, the following commands explicitly lock a file and the checkin implicitly unlocks the file.

sws lock ./src/cpu.h
sws checkin ./src

Use the --keep-locks option for the command to retain the locks after the checkin operation. If you keep the lock, you can release them later with a subsequent checkin or unlock operation.