Section 14.6. Examining the Repository: svnlook


14.6. Examining the Repository: svnlook

svnlook is a command-line utility for examining different aspects of a Subversion repository. It does not make any changes to the repository. svnlook is typically used by the repository hooks, but a repository administrator might find it useful for diagnostic purposes.

Since svnlook works via direct repository access (and thus can only be used on the machine that holds the repository), it refers to the repository with a path, not a URL.

If no revision or transaction is specified, svnlook defaults to the youngest (most recent) revision of the repository.

14.6.1. svnlook Options

Options in svnlook are global, just as in svn and svnadmin; however, most options apply to only one subcommand because the functionality of svnlook is (intentionally) limited in scope.


--no-diff-deleted

Do not print differences for deleted files. The default behavior when a file is deleted in a transaction/revision is to print the same differences that you would see if you had left the file but removed all the content.


--revision rev, -r rev

Examine revision number rev.


--show-ids

Show the filesystem node revision IDs for each path in the filesystem tree.


--transaction tid, -t tid

Examine transaction ID tid.


--verbose

Show property values for the property-related commands, too.


--version

Display version and copyright information.

14.6.2. svnlook Subcommands

author

     svnlook author repos_path 

Print the author of a revision or transaction in the repository.

Options

--revision rev, -r rev
--transaction tid, -t tid
cat

     svnlook cat repos_path path_in_repos 

Print the contents of a file.

Options

--revision rev, -r rev
--transaction tid, -t tid
changed

     svnlook changed repos_path 

Print the paths that were changed in a particular revision or transaction, as well as an svn update-style status letter in the first column: A for added, D for deleted, and U for updated (modified).

Options

--revision rev, -r rev
--transaction tid, -t tid

Example

Show a list of all the changed files in revision 39 of a test repository:

     $ svnlook changed -r 39 /usr/local/svn/repos     A   trunk/vendors/deli/     A   trunk/vendors/deli/chips.txt     A   trunk/vendors/deli/sandwich.txt     A   trunk/vendors/deli/pickle.txt 

date

     svnlook date repos_path 

Print the datestamp of a revision or transaction in a repository.

Options

--revision rev, -r rev
--transaction tid, -t tid
diff

     svnlook diff repos_path 

Print GNU-style differences of changed files and properties in a repository. If a file has a nontextual svn:mime-type property, the differences are explicitly not shown.

Options

--no-diff-deleted
--revision rev, -r rev
--transaction tid, -t tid
dirs-changed

     svnlook dirs-changed repos_path 

Print the directories that were themselves changed (property edits) or whose file children were changed.

Options

--revision rev, -r rev
--transaction tid, -t tid
help

     svnlook help     svnlook -h     svnlook -? 

Provide a quick usage summary. With subcommand, provide information about the given subcommand.

Alternate names: ?, h

history

     svnlook history repos_path [path_in_repos] 

Print information about the history of a path in the repository (or the root directory if no path is supplied).

Options

--revision rev, -r rev
--show-ids

Example

This shows the history output for the path /tags/1.0, as of revision 20 in our sample repository.

     $ svnlook history -r 20 /usr/local/svn/repos /tags/1.0 \     > --show-ids     REVISION   PATH <ID>     --------   ---------           19   /tags/1.0 <1.2.12>           17   /branches/1.0-rc2 <1.1.10>           16   /branches/1.0-rc2 <1.1.x>           14   /trunk <1.0.q>     ... 

info

     svnlook info repos_path 

Print the author, datestamp, log message size, and log message.

Options

--revision rev, -r rev
--transaction tid, -t tid
log

     svnlook log repos_path 

Print the log message.

Options

--revision rev, -r rev
--transaction tid, -t tid
propget

     svnlook propget repos_path propname path_in_repos 

List the value of a property on a path in the repository.

Alternate names: pg, pget

Options

--revision rev, -r rev
--transaction tid, -t tid

Example

Show the value of the seasonings property on the file /trunk/sandwich in the HEAD revision:

     $ svnlook pg /usr/local/svn/repos seasonings /trunk/sandwich     mustard 

proplist

     svnlook proplist repos_path path_in_repos 

List the properties of a path in the repository. With --verbose, show the property values too.

Alternate names: pl, plist

Options

--revision rev, -r rev
--transaction tid, -t tid
--verbose (-v)

Examples

Show the names of properties set on the file /trunk/README in the HEAD revision:

     $ svnlook proplist /usr/local/svn/repos /trunk/README     original-author     svn:mime-type 

This is the same command as in the previous example, but this time it shows the property values as well:

     $ svnlook proplist --verbose /usr/local/svn/repos \     > /trunk/README     original-author : fitz     svn:mime-type : text/plain 

tree

     svnlook tree repos_path[path_in_repos] 

Print the tree, starting at path_in_repos (if supplied; at the root of the tree otherwise), optionally showing node revision IDs.

Options

--revision rev, -r rev
--show-ids
--transaction tid, -t tid

Example

This shows the tree output (with node IDs) for revision 40 in our sample repository:

     $ svnlook tree -r 40 /usr/local/svn/repos --show-ids     / <0.0.2j>      trunk/ <p.0.2j>       vendors/ <q.0.2j>        deli/ <1g.0.2j>         egg.txt <1i.e.2j>         soda.txt <1k.0.2j>         sandwich.txt <1j.0.2j> 

uuid

     svnlook uuid repos_path 

Print the UUID for the repository. The UUID is the repository's Universal Unique IDentifier. The Subversion client uses this identifier to differentiate between one repository and another.

youngest

     svnlook youngest repos_path 

Print the youngest revision number of a repository.



Linux in a Nutshell
Linux in a Nutshell
ISBN: 0596154488
EAN: 2147483647
Year: 2004
Pages: 147

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net