[Sourcebo-commits] jstoddard commits r87 - in trunk: . lib/sourcebo

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Fri Feb 29 14:35:41 PST 2008


Author: jstoddard
Date: 2008-02-29 14:35:40 -0800 (Fri, 29 Feb 2008)
New Revision: 87

Modified:
   trunk/lib/sourcebo/config.py
   trunk/sb_create
   trunk/sb_gen_index
Log:
Modifications to allow use of viewvc for viewing source.



Modified: trunk/lib/sourcebo/config.py
===================================================================
--- trunk/lib/sourcebo/config.py	2007-06-21 23:06:27 UTC (rev 86)
+++ trunk/lib/sourcebo/config.py	2008-02-29 22:35:40 UTC (rev 87)
@@ -111,6 +111,7 @@
     conf['cvsmirrorpath'] = os.path.join(conf['projectpath'], "cvsmirror")
     conf['newspath'] = os.path.join(conf['projectpath'], "news")
     conf['srcpath'] = os.path.join(conf['projectpath'], "src")
+    conf['viewvcpath'] = os.path.join(conf['datapath'],"viewvc",conf['project'])
     conf['contentpath'] = os.path.join(conf['projectpath'], "content")
     conf['bugpath'] = os.path.join(conf['projectpath'], "bug")
     conf['listpath'] = os.path.join(conf['projectpath'], "mailman")
@@ -126,6 +127,7 @@
     htmlconf['newspath'] = os.path.join(htmlconf['projectpath'], "news")
     htmlconf['contentpath'] = os.path.join(htmlconf['projectpath'], "content")
     htmlconf['srcpath'] = os.path.join(htmlconf['projectpath'], "src")
+    htmlconf['viewvcpath'] = conf['viewvcpath'].replace(conf['datapath'], "")
     htmlconf['filepath'] = os.path.join(htmlconf['projectpath'], "files")
     htmlconf['docpath'] = os.path.join(htmlconf['projectpath'], "documentation")
     htmlconf['filedistpath'] = os.path.join(htmlconf['distpath'], "files")

Modified: trunk/sb_create
===================================================================
--- trunk/sb_create	2007-06-21 23:06:27 UTC (rev 86)
+++ trunk/sb_create	2008-02-29 22:35:40 UTC (rev 87)
@@ -145,6 +145,10 @@
     create_repos()
 
 def create_repos():
+    if not os.path.islink(conf['viewvcpath']):
+        log.out("linking src into viewvc dir")
+        os.symlink(conf['srcpath'],conf['viewvcpath'])
+
     for i in ('src', 'content'):
         path = conf[i + 'path']
 

Modified: trunk/sb_gen_index
===================================================================
--- trunk/sb_gen_index	2007-06-21 23:06:27 UTC (rev 86)
+++ trunk/sb_gen_index	2008-02-29 22:35:40 UTC (rev 87)
@@ -748,7 +748,7 @@
 <UL>
 <P>
 <LI>
-<A HREF="%(srcpath)s/">Browse</A>
+<A HREF="%(viewvcpath)s/">Browse</A>
 source code on-line to view this project's directory structure and
 files.
 </LI>




More information about the Sourcebo-commits mailing list