9.3 svnlook

svnlook is a command-line utility for examining different aspects of a Subversion repository. It does not make any changes to the repository it's just used for peeking. 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.

9.3.1 svnlook Switches

Switches in svnlook are global, just like in svn and svnadmin; however, most switches only apply to one subcommand since the functionality of svnlook is (intentionally) limited in scope.


--no-diff-deleted

Prevents svnlook from printing 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 (-r)

Specify a particular revision number that you wish to examine.


--transaction (-t)

Specify a particular transaction id that you wish to examine.


--show-ids

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

9.3.2 svnlook Subcommands

svnlook authorPrints the author.

Synopsis

svnlook author REPOS_PATH

Description

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

Switches

--revision (-r) --transaction (-t)

Examples

svnlook author is handy, but not very exciting:

$ svnlook author -r 40 /usr/local/svn/repos  sally

svnlook catPrints the contents of a file.

Synopsis

svnlook cat REPOS_PATH PATH_IN_REPOS

Description

Prints the contents of a file.

Switches

--revision (-r) --transaction (-t)

Examples

This shows the contents of a file in transaction ax8, located at /trunk/README:

 $ svnlook cat -t ax8 /usr/local/svn/repos /trunk/README                Subversion, a version control system.                = = = = = = = = = = = = = = = = = = = = = = = = = $LastChangedDate: 2003-07-17 10:45:25 -0500 (Thu, 17 Jul 2003) $ Contents:      I. A FEW POINTERS     II. DOCUMENTATION    III. PARTICIPATING IN THE SUBVERSION COMMUNITY ...

svnlook changedPrints the paths that were changed.

Synopsis

svnlook changed REPOS_PATH

Description

Prints 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).

Switches

--revision (-r) --transaction (-t)

Examples

This shows 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

svnlook datePrints the datestamp.

Synopsis

svnlook date REPOS_PATH

Description

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

Switches

--revision (-r) --transaction (-t)

Examples

This shows the date of revision 40 of a test repository:

             $ svnlook date -r 40 /tmp/repos/ 2003-02-22 17:44:49 -0600 (Sat, 22 Feb 2003)

svnlook diffPrints differences of changed files and properties.

Synopsis

svnlook diff REPOS_PATH

Description

Prints GNU-style differences of changed files and properties in a repository.

Switches

--revision (-r) --transaction (-t) --no-diff-deleted

Examples

This shows a newly added (empty) file, a deleted file, and a copied file:

$ svnlook diff -r 40 /usr/local/svn/repos/ Copied: egg.txt (from rev 39, trunk/vendors/deli/pickle.txt) Added: trunk/vendors/deli/soda.txt = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Modified: trunk/vendors/deli/sandwich.txt = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = --- trunk/vendors/deli/sandwich.txt        (original) +++ trunk/vendors/deli/sandwich.txt        2003-02-22 17:45:04.000000000 -0600 @@ -0,0 +1 @@ +Don't forget the mayo! Deleted: trunk/vendors/deli/chips.txt = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Deleted: trunk/vendors/deli/pickle.txt = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

svnlook dirs-changedPrints the directories that were themselves changed.

Synopsis

svnlook dirs-changed REPOS_PATH

Description

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

Switches

--revision (-r) --transaction (-t)

Examples

This shows the directories that changed in revision 40 in our sample repository:

$ svnlook dirs-changed -r 40 /usr/local/svn/repos trunk/vendors/deli/

svnlook help Displays the help message for svnlook.

Synopsis

Also svnlook -h and svnlook -?.

Description

Displays the help message for svnlook. This command, like its brother svn help, is also your friend, even though you never call it anymore and forgot to invite it to your last party.

Alternate Names

?, h

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

Synopsis

svnlook history REPOS_PATH              [PATH_IN_REPOS]

Description

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

Switches

--revision (-r) --show-ids

Examples

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>       13   /trunk <1.0.o>       11   /trunk <1.0.k>        9   /trunk <1.0.g>        8   /trunk <1.0.e>        7   /trunk <1.0.b>        6   /trunk <1.0.9>        5   /trunk <1.0.7>        4   /trunk <1.0.6>        2   /trunk <1.0.3>        1   /trunk <1.0.2>

svnlook infoPrints the author, datestamp, log message size, and log message.

Synopsis

svnlook info REPOS_PATH

Description

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

Switches

--revision (-r) --transaction (-t)

Examples

This shows the info output for revision 40 in our sample repository:

$ svnlook info -r 40 /usr/local/svn/repos sally 2003-02-22 17:44:49 -0600 (Sat, 22 Feb 2003) 15 Rearrange lunch.

svnlook logPrints the log message.

Synopsis

svnlook log REPOS_PATH

Description

Prints the log message.

Switches

--revision (-r) --transaction (-t)

Examples

This shows the log output for revision 40 in our sample repository:

$ svnlook log /tmp/repos/ Rearrange lunch.

svnlook propgetPrints the raw value of a property on a path in the repository.

Synopsis

svnlook propget REPOS_PATH PROPNAME PATH_IN_REPOS

Description

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

Alternate Names

pg, pget

Switches

--revision (-r) --transaction (-t)

Examples

This shows the value of the file /trunk/sandwich in the HEAD revision:

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

svnlook proplistPrints the names and values of versioned file and directory properties.

Synopsis

svnlook proplist REPOS_PATH PATH_IN_REPOS

Description

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

Alternate Names

pl, plist

Switches

--revision (-r) --transaction (-t) --verbose (-v)

Examples

This shows 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 showing the property values as well:

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

svnlook treePrints the tree.

Synopsis

svnlook tree REPOS_PATH [PATH_IN_REPOS]

Description

Prints the tree, starting at PATH_IN_REPOS (if supplied; at the root of the tree otherwise), optionally showing node revision ids.

Switches

--revision (-r) --transaction (-t) --show-ids

Examples

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>

svnlook uuidPrints the repository's UUID.

Synopsis

svnlook uuid REPOS_PATH

Description

Prints 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.

Examples

This shows the UUID for the repository at /usr/local/svn/repos:

           $ svnlook uuid /usr/local/svn/repos e7fe1b91-8cd5-0310-98dd-2f12e793c5e8

svnlook youngestPrints the youngest revision number.

Synopsis

svnlook youngest REPOS_PATH

Description

Prints the youngest revision number of a repository.

Examples

This shows the youngest revision of our sample repository:

$ svnlook youngest /tmp/repos/  42



Version Control with Subversion
Version Control with Subversion
ISBN: 0596510330
EAN: 2147483647
Year: 2003
Pages: 127

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