Bzr:add

From OpenBrainstem

Jump to: navigation, search

The bzr add<b></code> command is used to place files under revision control. For this to work, the file(s) and/or director(y|ies) specified must be within a directory that is under revision control. New directories must be added either before or at the same time as files that are contained in the new directory.

[edit] Common Usage

[edit] From the man Page

<code><b>bzr add [FILE...]

Options:
--dry-run                 show what would be done, but don´t actually do anything
--file-ids-from ARG       Lookup file ids from here
--help, -h                show help message
--no-recurse
--verbose, -v             display more information

Add specified files or directories.

In non-recursive mode, all the named items are added, regardless of whether they were previously ignored. A warning is given if any of the named files are already versioned.

In recursive mode (the default), files are treated the same way but the behaviour for directories is different. Directories that are already versioned do not give a warning. All directories, whether already versioned or not, are searched for files or subdirectories that are neither versioned or ignored, and these are added. This search proceeds recursively into versioned directories. If no names are given '.' is assumed.

Therefore simply saying ´bzr add´ will version all files that are currently unknown.

Adding a file whose parent directory is not versioned will implicitly add the parent, and so on up to the root. This means you should never need to explicitly add a directory, they´ll just get added when you add a file in the directory.

--dry-run will show which files would be added, but not actually add them.

--file-ids-from will try to use the file ids from the supplied path. It looks up ids trying to find a matching parent directory with the same filename, and then by pure path.

Personal tools