# CHANGELIST

> Manage changelists with the Unity Version Control CLI.

## Description

Groups pending changes in changelists.

### Usage

```bash
cm changelist | clist [--symlink]
```

(Displays all changelists.)

```bash
cm changelist | clist create <clist_name> [<clist_desc>] [--persistent | --notpersistent] [--symlink]
```

(Creates a changelist.)

```bash
cm changelist | clist delete <clist_name> [--symlink]
```

(Deletes the selected changelist. If this changelist contains pending changes, then these will be moved to the **default** changelist.)

```bash
cm changelist | clist edit <clist_name> [<action_name> <action_value>] [--persistent | --notpersistent] [--symlink]
```

(Edits the selected changelist.)

```bash
cm changelist | clist <clist_name> (add | rm) <path_name>[ ...] [--symlink]
```

(Edits the selected changelist by adding ('**add**') or removing ('**rm**') the change(s) that match with the given path\_name(s). Use a whitespace to separate path\_names. Use double quotes (" ") to specify paths containing spaces. The status of the paths must be '**Added**' or '**Checked-out**'.)

### Options

| Option / Argument     | Description                                                                                                                                                             |
| :-------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| clist\_name           | The name of the changelist. A path to a file containing the name can be used instead. More info at --**namefile**.                                                      |
| clist\_desc           | The description of the changelist. A path to a file containing the description can be used instead. More info at --**descriptionfile**.                                 |
| action\_name          | Choose between '**rename**' or '**description**' to edit the changelist.                                                                                                |
| action\_value         | Applies the new name or new description when editing the changelist.                                                                                                    |
| --**persistent**      | The changelist will remain in the workspace even if its contents are checked-in or reverted.                                                                            |
| --**notpersistent**   | (Default) The changelist will not remain in the workspace even if its contents are checked-in or reverted.                                                              |
| --**symlink**         | Applies the operation to the symlink and not to the target.                                                                                                             |
| --**namefile**        | A valid path to a file containing the name of the changelist. Bear in mind the file must exist and its content cannot be neither empty nor multiline.                   |
| --**newnamefile**     | A valid path to a file containing the new name of the changelist when renaming. Bear in mind the file must exist and its content cannot be neither empty nor multiline. |
| --**descriptionfile** | A valid path to a file containing the description for the changelist. Bear in mind the file must exist.                                                                 |

## Help

### Remarks

The '**changelist**' command handles both the workspace pending changelists and the changes contained in a changelist.

### Examples

```bash
cm changelist
```

(Shows the current workspace changelists.)

```bash
cm changelist create config_changes "dotConf files" --persistent
```

(Creates a new changelist named 'config\_changes' and description 'dotConf files' which will remain persistent in the current workspace once the pending changelist is either checked-in or reverted.)

```bash
cm changelist create --namefile="name.txt" --descriptionfile="desc.txt"
```

(Creates a new changelist which name and description are both taken from files.)

```bash
cm changelist edit config_changes rename config_files --notpersistent
```

(Edits the changelist named 'config\_changes' and renames it to 'config\_files'. Also, it turns the changelist into "not persistent".)

```bash
cm changelist edit config_changes --notpersistent
```

(Edits the changelist named 'config\_changes' by turning it into "not persistent".)

```bash
cm changelist delete config_files
```

(Removes the pending changelist 'config\_files' from the current workspace.)

```bash
cm changelist delete --namefile="name.txt"
```

(Removes the changelist identified by the content of 'name.txt' file from the current workspace.)

```bash
cm changelist config_files add foo.conf
```

(Adds the file 'foo.conf' to the 'config\_files' changelist.)

```bash
cm changelist config_files rm foo.conf readme.txt
```

(Removes the files 'foo.conf' and 'readme.txt' from the 'config\_files' changelist and moves the files to the system default changelist.)

```bash
cm changelist edit --namefile="name.txt" description --descriptionfile="desc.txt"
```

(Edits the changelist identified by the content of 'name.txt' file, changing its description to the text content of the 'desc.txt' file.)

```bash
cm changelist edit --namefile="name.txt" rename --newnamefile="newname.txt"
```

(Edits the changelist identified by the content of 'name.txt' file, renaming it to the text content of the 'newname.txt' file.)
