Index: src/name.c ================================================================== --- src/name.c +++ src/name.c @@ -182,10 +182,11 @@ int i; int startOfBranch = 0; const char *zXTag; /* zTag with optional [...] removed */ int nXTag; /* Size of zXTag */ const char *zDate; /* Expanded date-time string */ + const char *zTagPrefix = "sym"; if( zType==0 || zType[0]==0 ){ zType = "*"; }else if( zType[0]=='b' ){ zType = "ci"; @@ -339,20 +340,24 @@ } db_finalize(&q); if( rid ) return rid; } + if( zType[0]=='w' ){ + zTagPrefix = "wiki"; + } /* Symbolic name */ rid = db_int(0, "SELECT event.objid, max(event.mtime)" " FROM tag, tagxref, event" - " WHERE tag.tagname='sym-%q' " + " WHERE tag.tagname='%q-%q' " " AND tagxref.tagid=tag.tagid AND tagxref.tagtype>0 " " AND event.objid=tagxref.rid " " AND event.type GLOB '%q'", - zTag, zType + zTagPrefix, zTag, zType ); + if( rid>0 ){ if( startOfBranch ) rid = start_of_branch(rid,1); return rid; } Index: test/settings.test ================================================================== --- test/settings.test +++ test/settings.test @@ -39,11 +39,11 @@ # proc extract_setting_names { data } { set names [list] foreach {dummy name} [regexp \ - -all -line -inline -- {^([a-z][a-z0-9\-]*) } $data] { + -all -line -inline -- {^([a-z][a-z0-9\-]*) ?.*$} $data] { lappend names $name } return $names } Index: test/tester.tcl ================================================================== --- test/tester.tcl +++ test/tester.tcl @@ -272,22 +272,32 @@ auto-captcha \ auto-hyperlink \ auto-shun \ autosync \ autosync-tries \ + backoffice-disable \ + backoffice-logfile \ + backoffice-nodelay \ binary-glob \ case-sensitive \ clean-glob \ clearsign \ + comment-format \ crlf-glob \ crnl-glob \ default-perms \ diff-binary \ diff-command \ dont-push \ dotfiles \ editor \ + email-self \ + email-send-command \ + email-send-db \ + email-send-dir \ + email-send-method \ + email-send-relayhost \ empty-dirs \ encoding-glob \ exec-rel-paths \ gdiff-command \ gmerge-command \ @@ -308,10 +318,11 @@ repo-cksum \ self-register \ ssh-command \ ssl-ca-location \ ssl-identity \ + tclsh \ th1-setup \ th1-uri-regexp \ uv-sync \ web-browser] Index: test/wiki.test ================================================================== --- test/wiki.test +++ test/wiki.test @@ -45,25 +45,25 @@ # Note: Makes fossil calls, so $CODE and $RESULT will be corrupted proc get_mime_type {name} { global CODE RESULT fossil http << "GET /wiki?name=$name" if {$CODE != 0} { - return error: /wiki?name=$name $CODE $RESULT" + return "error: /wiki?name=$name $CODE $RESULT" + } + fossil whatis --type w $name + if {$CODE != 0} { + return "error: fossil whatis --type w $name $CODE $RESULT" } - set CODE [regexp {href="/info/([0-9a-f]+)"} $RESULT match info] + set CODE [regexp -line {^artifact:\s*([0-9a-f]+)$} $RESULT match info] if {$CODE == 0} { - return "error: No info link found for wiki page $name" + return "error: whatis returned no info for wiki page $name" } - fossil http << "GET /artifact/$info" + fossil artifact $info if {$CODE != 0} { - return "error: /artifact/$info $CODE $RESULT" + return "error: fossil artifact $info $CODE $RESULT" } - set CODE [regexp {
(.*)
} $RESULT match pre] - if {$CODE == 0} { - return "error: No pre block in /artifact/$info" - } - set CODE [regexp -line {^N (.*)$} $pre match mimetype] + set CODE [regexp -line {^N (.*)$} $RESULT match mimetype] if {$CODE == 0} { return "text/x-fossil-wiki" } return $mimetype }