diff --git a/.hgignore b/.hgignore index 49549a2da..4c0da0267 100644 --- a/.hgignore +++ b/.hgignore @@ -2,3 +2,8 @@ \.swp$ \.o$ \.obj$ +^docs/docs/web/ +^docs/docs/chm/ +^docs/docs/log.txt$ +^docs/docs/old_log.txt$ + diff --git a/docs/.logger_revnum b/docs/.logger_revnum index e8c78231f..d28240d94 100644 --- a/docs/.logger_revnum +++ b/docs/.logger_revnum @@ -1 +1 @@ -4256 +b4566fa0b468 diff --git a/docs/README.txt b/docs/README.txt index fe43fd61b..bc7fdac42 100644 --- a/docs/README.txt +++ b/docs/README.txt @@ -2,8 +2,8 @@ This "package" is just a copy of the stuff I use to generate the documentation for the dlib library. It contains a copy of the XSLT and XML I use to generate the HTML documentation. -The current version of these files can be obtained from the dlib subversion -repository at: https://dclib.svn.sourceforge.net/svnroot/dclib/trunk/docs +The current version of these files can be obtained from the dlib Mercurial +repository at: http://dclib.hg.sourceforge.net:8000/hgroot/dclib/dclib ======================== Overview ======================== diff --git a/docs/docs/change_log.xml b/docs/docs/change_log.xml index b9d978ae6..6088c869e 100644 --- a/docs/docs/change_log.xml +++ b/docs/docs/change_log.xml @@ -3,7 +3,7 @@ Change Log - +
Old Change Logs

diff --git a/docs/docs/compile.xml b/docs/docs/compile.xml index fbe91f593..b907d540f 100644 --- a/docs/docs/compile.xml +++ b/docs/docs/compile.xml @@ -44,9 +44,8 @@

- Finally, note that dlib/revision.h defines DLIB_REVISION - which is a #define you can use to see what version of dlib you have. The number in this file - is the subversion revision number associated with the particular copy of dlib you have. + Finally, note that dlib/revision.h defines DLIB_MAJOR_VERSION + and DLIB_MINOR_VERSION which are #defines you can use to see what version of dlib you have.

Preprocessor Directives

diff --git a/docs/docs/old_change_log.xml b/docs/docs/old_change_log.xml index 2ddeaecae..bddb0b479 100644 --- a/docs/docs/old_change_log.xml +++ b/docs/docs/old_change_log.xml @@ -3,5 +3,5 @@ Old Change Logs - + diff --git a/docs/docs/release_notes.xml b/docs/docs/release_notes.xml index 51481b22b..497cbedc5 100644 --- a/docs/docs/release_notes.xml +++ b/docs/docs/release_notes.xml @@ -14,10 +14,13 @@ New Stuff: Non-Backwards Compatible Changes: + - Removed the DLIB_REVISION macro and replaced it with DLIB_MAJOR_VERSION and + DLIB_MINOR_VERSION. Bug fixes: Other: + - dlib's version control system has switched from Subversion to Mercurial. diff --git a/docs/docs/stylesheet.xsl b/docs/docs/stylesheet.xsl index a22b08ab2..95e996b0e 100644 --- a/docs/docs/stylesheet.xsl +++ b/docs/docs/stylesheet.xsl @@ -900,7 +900,7 @@ - + @@ -945,7 +945,7 @@ - Revision:
+ Revision:
Date:
diff --git a/docs/makedocs b/docs/makedocs index 197003428..b1a94d2c2 100755 --- a/docs/makedocs +++ b/docs/makedocs @@ -27,33 +27,34 @@ htmlify_cmake () echo "" >> $1; } +get_short_revision_number() +{ + RESULT=`hg log -r $1 | grep changeset | awk '{print $2}' | sed -e 's/:.*//'` +} + makedocs () { -#make sure the .docs_last_update_rev file exists - if [ ! -f .docs_last_update_rev ] - then - echo 0 > .docs_last_update_rev - fi; - COUNTER_FILE=.current_release_number MINOR_COUTNER_FILE=.current_minor_release_number REVNUM_FILE=.logger_revnum - DOCS_LAST_UPDATE_REV=$(cat .docs_last_update_rev) - LOGGER_REVNUM=`cat $REVNUM_FILE` +# figure out the short number that identifies this particular changeset + get_short_revision_number `cat $REVNUM_FILE` + LOGGER_REVNUM=$RESULT + XSLT_OPTIONS="--nodtdattr --nonet --novalid" DATE=`date --date= "+%b %d, %Y"`; -# root dlib repository URL - DLIB_REPOS=`svn info | grep URL | awk '{print $2}' | sed -e 's/\/docs$//' ` # The revision number we are currently at - REVISION=`svn info | grep Revision | awk '{ print $2 }'` + CHANGESET_ID=`hg id -i | sed -e 's/\+//'` + get_short_revision_number $CHANGESET_ID + REVISION=$RESULT if [ "$1" = "snapshot" ] @@ -65,36 +66,37 @@ makedocs () RELEASE=${MAJOR_NUM}.${MINOR_NUM} fi; +# get XML versions of the change logs + BASE_LOGGER_REVNUM=`echo $LOGGER_REVNUM - 1000 | bc` + echo Getting the mercurial change logs for revisions $LOGGER_REVNUM:$REVISION + hg log ../dlib --style=xml -r$LOGGER_REVNUM:$REVISION > docs/log.txt || report_failure + echo Getting the mercurial change logs for revisions $BASE_LOGGER_REVNUM:$LOGGER_REVNUM + hg log ../dlib --style=xml -r$BASE_LOGGER_REVNUM:$LOGGER_REVNUM > docs/old_log.txt || report_failure -# update the cache of the library files from subversion if they aren't from the current revision - if [ $DOCS_LAST_UPDATE_REV -ne $REVISION ] - then - BASE_LOGGER_REVNUM=`echo $LOGGER_REVNUM - 1000 | bc` - echo Getting the subversion change logs for $DLIB_REPOS/dlib $LOGGER_REVNUM:$REVISION - svn log $DLIB_REPOS/dlib -v --xml -r$LOGGER_REVNUM:$REVISION > docs/svnlog.txt || report_failure - echo Getting the subversion change logs for $DLIB_REPOS/dlib $BASE_LOGGER_REVNUM:$LOGGER_REVNUM - svn log $DLIB_REPOS/dlib -v --xml -r$BASE_LOGGER_REVNUM:$LOGGER_REVNUM > docs/old_svnlog.txt || report_failure +# grab a clean copy of the repository + rm -rf docs/cache + rm -rf cache.$$ + hg clone .. cache.$$ > /dev/null || report_failure +# put the stuff we need into the docs/cache folder + mkdir docs/cache + mv cache.$$/dlib docs/cache/ + mv cache.$$/examples docs/cache/ + rm -rf cache.$$ - rm -rf docs/cache - - echo $REVISION > .docs_last_update_rev - - echo Getting a copy of the source from subversion - svn export -r $REVISION $DLIB_REPOS/examples docs/cache/examples > /dev/null || report_failure - svn export -r $REVISION $DLIB_REPOS/dlib docs/cache/dlib > /dev/null || report_failure - - fi; echo "#ifndef DLIB_REVISION_H" > docs/cache/dlib/revision.h echo "// Version: " $RELEASE >> docs/cache/dlib/revision.h echo "// Date: " `date` >> docs/cache/dlib/revision.h - echo "// Subversion Revision Number" >> docs/cache/dlib/revision.h - echo "#define DLIB_REVISION " $REVISION >> docs/cache/dlib/revision.h + echo "// Mercurial Revision ID: " $CHANGESET_ID >> docs/cache/dlib/revision.h + echo "#define DLIB_MAJOR_VERSION " $MAJOR_NUM >> docs/cache/dlib/revision.h + echo "#define DLIB_MINOR_VERSION " $MINOR_NUM >> docs/cache/dlib/revision.h echo "#endif" >> docs/cache/dlib/revision.h - rm -rf docs/web/* - rm -rf docs/chm/docs/* + rm -rf docs/web + rm -rf docs/chm/docs + mkdir docs/web + mkdir docs/chm/docs echo Creating HTML version of the source htmlify --title "dlib C++ Library - " -i docs/cache -o htmltemp.$$ @@ -117,6 +119,7 @@ makedocs () cp docs/cache/examples/CMakeLists.txt docs/web/examples mkdir docs/chm/docs/examples || report_failure cp docs/cache/examples/CMakeLists.txt docs/chm/docs/examples + rm -rf docs/cache cp docs/*.gif docs/web cp docs/*.gif docs/chm/docs cp docs/*.html docs/web @@ -184,8 +187,6 @@ makedocs () ./testenv || report_failure -#echo Update the docs to the newest version in subversion -#svn update || report_failure # build all the html documentation