Working Copies

Management of working copies of code in Arch isn't too different from most other revision control systems, but we'll go over the main points here.

If you add a new file or directory to the source, you need to register it with Arch using tla add.

$ tla add foo.c

If you with to remove a file or directory from the source, you need to use tla rm to do it. If you already removed it use tla delete-id.

$ tla rm foo.c
$ rm foo.h
$ tla delete-id foo.h

Arch supports renames, preserves version history across them and can still apply changes from branches which haven't yet had the rename. To rename or move a file use tla mv. If you already moved the file, use tla move-id.

$ tla mv foo.c new_foo.c
$ mv foo.h new_foo.h
$ tla move-id foo.h new_foo.h

To see an overview of the changes you have made to your working copy use tla changes, the output is similar to cvs update or svn stat. To see all of the changes as a GNU diff use tla changes --diffs and to see the differences in a single file use tla file-diffs.

$ tla changes
M  foo.c
M  foo.h
$ tla changes --difs
  :
* modified files

--- orig/foo.c
  :
$ tla file-diff foo.c
--- orig/foo.c
  :

To list the files in your working copy use tla inventory, the S informs you the file is ‘source’ and that changes will be committed to the repository.

$ tla inventory
  :
S  main/help.c
S  main/main.c
S  main/main.h
  :

To check your working copy to make sure you haven't forgotten to commit any files use tla tree-lint. This can also be used to pick up various other problems including broken symlinks.

Arch also provides a couple of useful working-copy wide commands to undo all of your changes, and put them back again afterwards. tla undo reverts your working copy to pristine state so you can work on something else, when done tla redo reapplies your saved changes again.

dpkg: ArchRepository/WorkingCopies (last edited 2004-12-07 17:02:02 by ScottJamesRemnant)