![]() |
![]() |
||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
|
File Contents Contents of a single revision To view contents of a single revision of a file you may use bk get to get any revision of a file. If the revision wanted is not known, bk prs may be used to get a listing of each file revision with revision comments.
File content comparisons (one file) There are two methods to do file content comparisons: via the GUI tools or via the command line. To do file content comparisons via the GUI tools, use bk difftool. Differences between any two revisions of a file can be viewed, including the latest modified but not yet checked in version. It's also possible to compare files in different repositories with difftool. To see the differences between the latest modified version of a file and the latest checked in version of the file, use:
To see the differences between the modified version of a file and another revision:
To see the differences between any two specific revisions of a file:
To see the differences between a file in one repository and a file in a different repository:
To do file content comparisons via the command line, use bk diffs. Differences between the modified version of a file with the last checked in revision of that file, between any two revisions of a file in a repository, or between a specific revision and its preceding revision can be displayed. There is also the ability to do side-by-side diffs as well as author, date, and/or revision annotations if desired. To view the differences between a modified file and the last checked in version of that file, use:
To view the differences between a modified file and any previous version of that file:
To view the differences between any two revisions of a file:
To view the differences between a specific revision and its preceding revision:
There is also the ability to do side-by-side diffs as well as author, date, and/or revision annotations if desired. To do that use the options shown below individually or in combination to produce the desired output. To do side-by-side diffs:
To prefix lines with author annotations:
To prefix lines with the revision date annotations:
To prefix files with revision numbers:
As an example, suppose a side-by-side view of differences of revision 1.5 and 1.14 of file foo.c with author and date annotations is desired. To accomplish this the following command could be issued:
File content comparisons (all files in a directory or repository) Sometimes it is desired to see all the file changes made in a directory or repository since the last time the files were checked out. To view all differences of all modified files in one directory with the corresponding last checked in files (sometimes this output is very long so piping to more or less may be useful), use:
To view all differences of all modified files in a repository with the corresponding last checked in files (sometimes this output is very long so piping to more or less may be useful):
|