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 SwitchesSwitches 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.
9.3.2 svnlook Subcommands
Synopsissvnlook author REPOS_PATH DescriptionPrints the author of a revision or transaction in the repository. Switches--revision (-r) --transaction (-t) Examplessvnlook author is handy, but not very exciting: $ svnlook author -r 40 /usr/local/svn/repos sally
Synopsissvnlook cat REPOS_PATH PATH_IN_REPOS DescriptionPrints the contents of a file. Switches--revision (-r) --transaction (-t) ExamplesThis 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 ...
Synopsissvnlook changed REPOS_PATH DescriptionPrints 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) ExamplesThis 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
Synopsissvnlook date REPOS_PATH DescriptionPrints the datestamp of a revision or transaction in a repository. Switches--revision (-r) --transaction (-t) ExamplesThis 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)
Synopsissvnlook diff REPOS_PATH DescriptionPrints GNU-style differences of changed files and properties in a repository. Switches--revision (-r) --transaction (-t) --no-diff-deleted ExamplesThis 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 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Synopsissvnlook dirs-changed REPOS_PATH DescriptionPrints the directories that were themselves changed (property edits) or whose file children were changed. Switches--revision (-r) --transaction (-t) ExamplesThis shows the directories that changed in revision 40 in our sample repository: $ svnlook dirs-changed -r 40 /usr/local/svn/repos trunk/vendors/deli/
SynopsisAlso svnlook -h and svnlook -?. DescriptionDisplays 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
Synopsissvnlook history REPOS_PATH [PATH_IN_REPOS] DescriptionPrints information about the history of a path in the repository (or the root directory, if no path is supplied). Switches--revision (-r) --show-ids ExamplesThis 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>
Synopsissvnlook info REPOS_PATH DescriptionPrints the author, datestamp, log message size, and log message. Switches--revision (-r) --transaction (-t) ExamplesThis 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.
Synopsissvnlook log REPOS_PATH DescriptionPrints the log message. Switches--revision (-r) --transaction (-t) ExamplesThis shows the log output for revision 40 in our sample repository: $ svnlook log /tmp/repos/ Rearrange lunch.
Synopsissvnlook propget REPOS_PATH PROPNAME PATH_IN_REPOS DescriptionLists the value of a property on a path in the repository. Alternate Namespg, pget Switches--revision (-r) --transaction (-t) ExamplesThis shows the value of the file /trunk/sandwich in the HEAD revision: $ svnlook pg /usr/local/svn/repos seasonings /trunk/sandwich mustard
Synopsissvnlook proplist REPOS_PATH PATH_IN_REPOS DescriptionLists the properties of a path in the repository. With --verbose, show the property values too. Alternate Namespl, plist Switches--revision (-r) --transaction (-t) --verbose (-v) ExamplesThis 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
Synopsissvnlook tree REPOS_PATH [PATH_IN_REPOS] DescriptionPrints 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 ExamplesThis 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>
Synopsissvnlook uuid REPOS_PATH DescriptionPrints 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. ExamplesThis shows the UUID for the repository at /usr/local/svn/repos: $ svnlook uuid /usr/local/svn/repos e7fe1b91-8cd5-0310-98dd-2f12e793c5e8
Synopsissvnlook youngest REPOS_PATH DescriptionPrints the youngest revision number of a repository. ExamplesThis shows the youngest revision of our sample repository: $ svnlook youngest /tmp/repos/ 42 |