Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 12 Feb 2011 08:29:16 +0000 (UTC)
From:      Hiroki Sato <hrs@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org
Subject:   svn commit: r218597 - releng/8.2/release/doc/share/sgml
Message-ID:  <201102120829.p1C8TGH7090339@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hrs
Date: Sat Feb 12 08:29:16 2011
New Revision: 218597
URL: http://svn.freebsd.org/changeset/base/218597

Log:
  Add revision attribute handling.  Links are now generated at the end
  of the paragraph from revision="NNN".
  
  Approved by:	re (implicit)

Modified:
  releng/8.2/release/doc/share/sgml/release.dsl

Modified: releng/8.2/release/doc/share/sgml/release.dsl
==============================================================================
--- releng/8.2/release/doc/share/sgml/release.dsl	Sat Feb 12 07:06:40 2011	(r218596)
+++ releng/8.2/release/doc/share/sgml/release.dsl	Sat Feb 12 08:29:16 2011	(r218597)
@@ -209,6 +209,7 @@
 					  (normalize "footnote")))
 	      (tgroup (have-ancestor? (normalize "tgroup")))
 	      (arch (attribute-string (normalize "arch")))
+	      (rev (attribute-string (normalize "revision")))
 	      (role (attribute-string (normalize "role")))
 	      (arch-string (entity-text "arch"))
 	      (merged-string (entity-text "merged")))
@@ -219,28 +220,46 @@
 				   (list (list "ALIGN" %default-quadding%))
 				   '()))
 		  (make sequence
-		    (cond
-		     ;; If arch= not specified, then print unconditionally.  This clause
-		     ;; handles the majority of cases.
-		     ((or (equal? arch #f)
-			  (equal? arch "")
-			  (equal? arch "all"))
-			(process-children))
-		     (else
-		      (sosofo-append
-		       (make sequence
-			 (literal "[")
-			 (let loop ((prev (car (split-string-to-list arch)))
-				    (rest (cdr (split-string-to-list arch))))
-			   (make sequence
-			     (literal prev)
-			     (if (not (null? rest))
-				 (make sequence
-				   (literal ", ")
-				   (loop (car rest) (cdr rest)))
-				 (empty-sosofo))))
-			 (literal "] ")
-			 (process-children)))))
+		    (sosofo-append
+		     (if (and (not (equal? arch #f))
+			      (not (equal? arch ""))
+			      (not (equal? arch "all")))
+			 (make sequence
+			   (literal "[")
+			   (let loop ((prev (car (split-string-to-list arch)))
+				      (rest (cdr (split-string-to-list arch))))
+			     (make sequence
+			       (literal prev)
+			       (if (not (null? rest))
+				   (make sequence
+				     (literal ", ")
+				     (loop (car rest) (cdr rest)))
+				   (empty-sosofo))))
+			   (literal "] "))
+			 (empty-sosofo))
+		     (process-children)
+		     (if (and (not (equal? rev #f))
+			      (not (equal? rev "")))
+			 (make sequence
+			   (literal "[")
+			   (let loop ((prev (car (split-string-to-list rev)))
+				      (rest (cdr (split-string-to-list rev))))
+			     (make sequence
+			       (make element gi: "A"
+				     attributes: (list
+						  (list "HREF" (string-append
+								"http://svn.freebsd.org/viewvc/base?view=revision&#38;revision="
+								prev))
+						  (list "TARGET" "_top"))
+				     (literal "r")
+				     (literal prev))
+			       (if (not (null? rest))
+				   (make sequence
+				     (literal ", ")
+				     (loop (car rest) (cdr rest)))
+				   (empty-sosofo))))
+			   (literal "] "))
+			 (empty-sosofo)))
 		    (if (and (not (null? role)) (equal? role "merged"))
 			(literal " [" merged-string "]")
 			(empty-sosofo))



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201102120829.p1C8TGH7090339>