[svnbook commit] r2000 - trunk/src/en/book
cmpilato
svnbook-dev at red-bean.com
Tue Feb 14 08:37:21 CST 2006
Author: cmpilato
Date: Tue Feb 14 08:37:17 2006
New Revision: 2000
Modified:
trunk/src/en/book/ch08.xml
Log:
* src/en/book/ch08.xml
(svn.developer.usingapi.otherlangs.ex-1,
svn.developer.usingapi.otherlangs.ex-2): Canonicalize input paths in these
Python examples so they don't trigger assertions in the C libraries.
Modified: trunk/src/en/book/ch08.xml
==============================================================================
--- trunk/src/en/book/ch08.xml (original)
+++ trunk/src/en/book/ch08.xml Tue Feb 14 08:37:17 2006
@@ -1028,9 +1028,14 @@
% (os.path.basename(sys.argv[0])))
sys.exit(1)
+ # Canonicalize (enough for Subversion, at least) the repository path.
+ repos_path = os.path.normpath(sys.argv[1])
+ if repos_path == '.':
+ repos_path = ''
+
# Call the app-wrapper, which takes care of APR initialization/shutdown
# and the creation and cleanup of our top-level memory pool.
- svn.core.run_app(crawl_youngest, os.path.normpath(sys.argv[1]))
+ svn.core.run_app(crawl_youngest, repos_path)
</programlisting>
</example>
@@ -1146,9 +1151,14 @@
if len(args) != 1:
usage_and_exit(2)
+ # Canonicalize (enough for Subversion, at least) the working copy path.
+ wc_path = os.path.normpath(args[0])
+ if wc_path == '.':
+ wc_path = ''
+
# Call the app-wrapper, which takes care of APR initialization/shutdown
# and the creation and cleanup of our top-level memory pool.
- svn.core.run_app(do_status, os.path.normpath(args[0]), verbose)
+ svn.core.run_app(do_status, wc_path, verbose)
</programlisting>
</example>
More information about the svnbook-dev
mailing list