865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
|
** to the root of the source tree of the repository. The FILE must
** be a part of CHECKIN, except when CHECKIN=="ckout" when FILE is read
** directly from disk and need not be a managed file. For /uv, FILE
** can also be the hash of the unversioned file.
**
** The "ckout" CHECKIN is intended for development - to provide a mechanism
** for looking at what a file will look like using the /doc webpage after
** it gets checked in.
**
** The file extension is used to decide how to render the file.
**
** If FILE ends in "/" then the names "FILE/index.html", "FILE/index.wiki",
** and "FILE/index.md" are tried in that order. If the binary was compiled
** with TH1 embedded documentation support and the "th1-docs" setting is
** enabled, the name "FILE/index.th1" is also tried. If none of those are
|
|
>
>
>
>
>
|
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
|
** to the root of the source tree of the repository. The FILE must
** be a part of CHECKIN, except when CHECKIN=="ckout" when FILE is read
** directly from disk and need not be a managed file. For /uv, FILE
** can also be the hash of the unversioned file.
**
** The "ckout" CHECKIN is intended for development - to provide a mechanism
** for looking at what a file will look like using the /doc webpage after
** it gets checked in. Some commands like "fossil ui", "fossil server",
** and "fossil http" accept an argument "--ckout-alias NAME" when allows
** NAME to be understood as an alias for "ckout". On a site with many
** embedded hyperlinks to /doc/trunk/... one can run with "--ckout-alias trunk"
** to simulate what the pending changes will look like after they are
** checked in. The NAME alias is stored in g.zCkoutAlias.
**
** The file extension is used to decide how to render the file.
**
** If FILE ends in "/" then the names "FILE/index.html", "FILE/index.wiki",
** and "FILE/index.md" are tried in that order. If the binary was compiled
** with TH1 embedded documentation support and the "th1-docs" setting is
** enabled, the name "FILE/index.th1" is also tried. If none of those are
|
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
|
}else if( rid==2 ){
zName = db_text(zName,
"SELECT name FROM unversioned WHERE hash=%Q", zName);
g.isConst = 1;
}
zDfltTitle = zName;
}
}else if( fossil_strcmp(zCheckin,"ckout")==0 ){
/* Read from the local checkout */
char *zFullpath;
db_must_be_within_tree();
zFullpath = mprintf("%s/%s", g.zLocalRoot, zName);
if( file_isfile(zFullpath, RepoFILE)
&& blob_read_from_file(&filebody, zFullpath, RepoFILE)>0 ){
rid = 1; /* Fake RID just to get the loop to end */
|
|
>
>
|
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
|
}else if( rid==2 ){
zName = db_text(zName,
"SELECT name FROM unversioned WHERE hash=%Q", zName);
g.isConst = 1;
}
zDfltTitle = zName;
}
}else if( fossil_strcmp(zCheckin,"ckout")==0
|| fossil_strcmp(zCheckin,g.zCkoutAlias)==0
){
/* Read from the local checkout */
char *zFullpath;
db_must_be_within_tree();
zFullpath = mprintf("%s/%s", g.zLocalRoot, zName);
if( file_isfile(zFullpath, RepoFILE)
&& blob_read_from_file(&filebody, zFullpath, RepoFILE)>0 ){
rid = 1; /* Fake RID just to get the loop to end */
|