Fossil
Windows XP
Not logged in

When following the tutorial at http://www.fossil-scm.org/fossil/doc/tip/www/quickstart.wiki, already in the second step (fossil ui <rep>) I can't see anything in any browser.

Here come the server console printouts:

Fossil version no such variable: manifest_version no such variable: manifest_date
Status: 200 OK
Cache-control: private
Content-Type: text/html; charset=ISO-8859-1
Content-Length: 87
<p><font color="red">no such repository: (null)</font></p><div class="content"></div><div class="footer">
Fossil version no such variable: manifest_version no such variable: manifest_date
<hr><p><font color="red"><b>ERROR: no such variable: manifest_date</b></font></p>

DRH replies:
I think this problem has been fixed in more recent versions of fossil. However, I am away from my office and cannot rebuild until this weekend. If you can download the latest code and recompile yourself, it might solve your problem.



On 2008-06-08 05:08:53 UTC anonymous added:
While using mingw compilled Fossil (version [3f706b92a5] from 2008-06-06) on Win XP SP2, server console printout produces similar output. It spawn empty browser window.

c:\soft\bin>fossil new myrep
fossil: unable to open database file

[sqlite table myrep is created anyway]

c:\soft\bin>fossil ui myrep
Listening for HTTP requests on TCP port 8080
Launch webbrowser: start http://127.0.0.1:8080/
Type Ctrl-C to stop the HTTP server
Status: 200 OK
Cache-control: private
Content-Type: text/html; charset=ISO-8859-1
Content-Length: 311

<p><font color="red">repository does not exists or is in an unreadable directory
: (null)</font></p>

Fossil version no such variable: manifest_version no such variable: manifest_dat
e<hr><p><font color="red"><b>ERROR: no such variable: manifest_date</b></font></
p>

On 2008-06-08 15:53:08 UTC drh added:
This problem should now be fixed. Either recompile using the latest source code or else download the latest precompiled binary. Thanks for the bug report. Please let me know if you find any other issues.



On 2008-06-08 21:30:57 UTC anonymous (claiming to be PF) added:
Thank you for prompt fix, your precompiled binary works nicely. (it was little intriguing to get past login page, till I figured out that I can update user table in my repository with login and pw values) Since then it seems to be working fine.

Maybe another issue would be with clone command. It seems not to clone and still complain about being not able to open database.

c:\soft\bin>fossil clone http://www.fossil-scm.org/ myclone.fossil
fossil: unable to open database file

c:\soft\bin>fossil new myclone.fossil
fossil: unable to open database file

c:\soft\bin>fossil new myclone.fossil
fossil: table blob already exists

c:\soft\bin>fossil clone http://www.fossil-scm.org/ myclone.fossil
fossil: unable to open database file


On 2008-07-08 21:22:43 UTC anonymous added:

c:\soft\bin>fossil.exe info myrep
fossil.exe: unable to open database: C:\Documents and Settings\myuser\Data aplikacÝ/_fossil
ATTACH DATABASE 'C:\Documents and Settings\myuser\Data aplikacÝ/_fossil' AS configdb
profiling:C:\soft\msys\home\myuser\fossil/merge.gcda:Invocation mismatch - some dat
a files may have been removed or concurrent update without locking support



On 2008-07-14 21:13:52 UTC anonymous added:
By modifying line  576 in file db.c to:

  zDbName = mprintf("%s\\_fossil", zHome); /* fills zDbName with C:\\Documents and Settings\\user\\Data aplikací\\_fossil instead of C:\\Documents and Settings\\user\\Data aplikací/_fossil */

AND
  creating directory on C: drive "C:\Documents and Settings\user\Data aplikac" (please note one ascended character (0xa1) short from original path)

I can get this output:

c:\soft\bin>fossil.exe  new rep01
project-id: 3cf63a764197eaa7f82c0704bcc5cf035d65d9f2
server-id:  9ea3a39a51325ed2212ab2ad35b2fbdc6b9979bb
admin-user: user (no password set yet!)
baseline:   ef6859b040afc1987a09b3c53d75b6c7eaf398f6

(if i dont create such directory, fossil still fails with fossil.exe: unable to open database file)

I can trace it to line 515 in db_.c:

rc = sqlite3_open(zFileName, &db);

where it either creates database file _fossil in doctored directory of fails with error message.

Where to take from here? Thanks.

Oh joy, by using doctored directory for _fossil file, I was able to  clone fossil repository:

c:\soft\bin>fossil clone http://www.fossil-scm.org/ myclone.foss
                Bytes      Cards  Artifacts     Deltas
Send:             378         16          0          0
Received:      148119       3170          0          0
Send:            9406        200          0          0
Received:      545353        203         26        174
Send:           26796        570          0          0
Received:      828104        532         66        463
Send:           70365       1497          0          0
Received:     1992241       1440         87       1350
Send:          127517       2713          0          0
Received:     6327446       2622        189       2153
Send:          103406       2200          0          0
Received:     5013359       2173        108       1787
Send:           38076        810          0          0
Received:     1219330        789         61        725
Rebuilding repository meta-data...
3159 (100%)...

Still, I would like to be able to use default "APPDATA" directory (on systems I cant change it/create suitable directory at will)
even if it contains ascended characters in it. Any idea? Many thanks.
What do I need to do to check files in? 
fossil ui command seems to be mostly working, allowing me to create wiki pages.
So far I was not succesfull with checking in any file in.

C:\soft\bin>fossil.exe new myrep01
project-id: c4c93d7b1c74c6b823292b5490a1019dded55c2d
server-id:  fc3f293d4232069d55038ee3cbd47687cf0be7a0
admin-user: user (no password set yet!)
baseline:   461a7daf42b849f08c069d47e1917e1bcac786cb

(creates file c:\soft\bin\myrep01,c:\Documents and Settings\user\Data aplikací\_fossil)

C:\soft\bin>fossil.exe open myrep01
fossil.exe: table global_config already exists

(creates files c:\Documents and Settings\ron\Data aplikací\_fossil-journal and c:\soft\bin\_FOSSIL_)

C:\soft\bin>fossil.exe info myrep01
fossil.exe: table global_config already exists

C:\soft\bin>fossil add mytestfile
fossil: table global_config already exists

C:\soft\bin>fossil.exe configuration pull http://www.hwaci.com
fossil.exe: table global_config already exists

--another chain of tests

C:\soft\bin>fossil.exe new myrep01
project-id: ed5f0badb8c844c5e5f53331f1589cf0098e228a
server-id:  755cce5836f70fd2a6a6a4aadc4c22a6eaebf406
admin-user: user (no password set yet!)
baseline:   228b5784d0b403cd66525e5703e1cb58d5b555e3

C:\soft\bin>cd zz_testrep

C:\soft\bin\zz_testrep>fossil.exe open ..\myrep01
fossil.exe: table global_config already exists


C:\soft\bin\zz_testrep>fossil.exe info myrep01
fossil.exe: not within an open checkout

C:\soft\bin\zz_testrep>fossil.exe status myrep01
fossil.exe: not within an open checkout

C:\soft\bin\zz_testrep>fossil.exe timeline myrep01
fossil.exe: use --repository or -R to specific the repository database

C:\soft\bin\zz_testrep>fossil.exe timeline -R ..\myrep01
(states nothing)

C:\soft\bin\zz_testrep>fossil.exe add mytestfile
fossil.exe: not within an open checkout

What could be done about it? Thanks.

On 2008-07-17 00:44:24 UTC drh added:
I am unable to replicate any of these problems using the latest version of fossil for windows (available from the download page.) The commands above all work correctly for me.


Check with precompiled version downloaded from [http://www.fossil-scm.org/download/fossil-w32-b3ee50c946.zip]

C:\soft\bin>fossil help
Usage: fossil help COMMAND.
Available COMMANDs:
(list of command removed)
This is fossil version [b3ee50c946] 2008-07-15 19:03:42

C:\soft\bin>fossil.exe new .\myrep01
fossil.exe: unable to open database file


So far no joy with opening repository/adding files to it. 
I am checking it on Czech mutation of win XP, SP2 (that's why I have 
path with some weird ascented characters in APPDATA variable)
After reading "Note to windows users" at [http://sqlite.org/capi3ref.html#sqlite3_open], 
I realized there shall be UTF-8 encoded path presented. So as a temp workaround 
I modified  line 561 in db.c as follows:

zHome = "C:\\Documents and Settings\\user\\Data aplikac\xC3\xAD";/*  zHome = getenv("LOCALAPPDATA");*/

With this change it creates "user" and "local checkout" database files at "c:\soft\bin" 
or "c:\Documents and Settings\user\Data aplikací" directories (with journals at times)


Debugging fossil.exe open .\myrep01 (with myrep01 already created) with breakpoint set 
on vfile_scan function does not stop there (I can catch sqlite3ErrorMsg, with backtrace log below)

Would you recommend some places to look at/things to check? Many thanks.

--checks
C:\soft\bin>fossil.exe help
Usage: fossil.exe help COMMAND.
Available COMMANDs:
(list of command removed)
This is fossil version [849b94c631] 2008-07-17 01:49:16

C:\soft\bin>fossil.exe new .\myrep01
project-id: f9037fb9096c9532d56b243e43c5c7d886e0940f
server-id:  620679182a479091377a5d51eecac3edb0c18227
admin-user: user (no password set yet!)
baseline:   ef6cbffd434aaaa8aa58de44d545fe5eff9a80fd

C:\soft\bin>fossil.exe open .\myrep01
fossil.exe: table global_config already exists

C:\soft\bin>fossil.exe info .\myrep01
fossil.exe: not within an open checkout

--removed all database files
C:\soft\bin>fossil.exe open .\myrep01
fossil.exe: repository does not exists or is in an unreadable directory: C:/soft/bin/myrep01

--backtrace log of running C:\soft\bin>fossil.exe open .\myrep01 :
(gdb) backtrace
#0  sqlite3ErrorMsg (pParse=0x22f3e0, zFormat=0x4cb985 "table %T already exists") at ./src/sqlite3.c:17355
#1  0x00462240 in sqlite3StartTable (pParse=0x22f3e0, pName1=0x7a431c, pName2=0x7a4330, isTemp=0, isView=0, isVirtual=0, noErr=0) at ./src/sqlite3.c:55547
#2  0x00484b56 in yy_reduce (yypParser=0x7a4290, yyruleno=21) at ./src/sqlite3.c:12016
#3  0x004875a7 in sqlite3Parser (yyp=0x7a4290, yymajor=19, yyminor={z = 0x4ba85a "(\n  name TEXT PRIMARY KEY,\n  value TEXT\n);\n", dyn = 0, n = 1}, pParse=0x22f3e0) at ./src/sqlite3.c:13064
#4  0x00488124 in sqlite3RunParser (pParse=0x22f3e0, zSql=0x4ba840 "CREATE TABLE global_config(\n  name TEXT PRIMARY KEY,\n  value TEXT\n);\n", pzErrMsg=0x22f3dc) at ./src/sqlite3.c:13710
#5  0x00472394 in sqlite3Prepare (db=0x7a0f70, zSql=0x4ba840 "CREATE TABLE global_config(\n  name TEXT PRIMARY KEY,\n  value TEXT\n);\n", nBytes=-1, saveSqlFlag=0, ppStmt=0x22f634, pzTail=0x22f638) at ./src/sqlite3.c:65288
#6  0x004727ac in sqlite3LockAndPrepare (db=0x7a0f70, zSql=0x4ba840 "CREATE TABLE global_config(\n  name TEXT PRIMARY KEY,\n  value TEXT\n);\n", nBytes=-1, saveSqlFlag=0, ppStmt=0x22f634, pzTail=0x22f638) at ./src/sqlite3.c:65369
#7  0x004728a7 in sqlite3_prepare (db=0x7a0f70, zSql=0x4ba840 "CREATE TABLE global_config(\n  name TEXT PRIMARY KEY,\n  value TEXT\n);\n", nBytes=-1, ppStmt=0x22f634, pzTail=0x22f638) at ./src/sqlite3.c:65425
#8  0x0046e1e1 in sqlite3_exec (db=0x7a0f70, zSql=0x4ba840 "CREATE TABLE global_config(\n  name TEXT PRIMARY KEY,\n  value TEXT\n);\n", xCallback=0, pArg=0x0, pzErrMsg=0x0) at ./src/sqlite3.c:62344
#9  0x0040b64a in db_init_database (zFileName=0x7a0700 "C:/Documents and Settings/user/Data aplikací/_fossil", zSchema=0x4ba840 "CREATE TABLE global_config(\n  name TEXT PRIMARY KEY,\n  value TEXT\n);\n") at db_.c:520
#10 0x0040b80e in db_open_config () at db_.c:582
#11 0x0040b8bf in isValidLocalDb (zDbName=0x22f700 "C:/soft/bin/_FOSSIL_") at db_.c:599
#12 0x0040b9d5 in db_open_local () at db_.c:633
#13 0x0040c69a in cmd_open () at db_.c:1047
#14 0x00415b57 in main (argc=3, argv=0x3d2528) at main_.c:233



DRH replies:
Please correspond with me about this problem using email. drh@sqlite.org. Communication via wiki is cumbersome.