Fossil SCM

Win32 port now functional except network operations. This commit was done on windows :-). See win32.txt for status of all commands. No networking commands are functional yet. All path operations are now functioning.

jnc 2007-09-22 06:47 trunk
Commit c7278fd013abfe2490ed36ad257e716c9daebf2b
+2 -2
--- src/add.c
+++ src/add.c
@@ -50,11 +50,11 @@
5050
char *zName;
5151
char *zPath;
5252
Blob pathname;
5353
int isDir;
5454
55
- zName = mprintf("%s", g.argv[i]);
55
+ zName = mprintf("%/", g.argv[i]);
5656
isDir = file_isdir(zName);
5757
if( isDir==1 ) continue;
5858
if( isDir==0 ){
5959
fossil_fatal("not found: %s", zName);
6060
}
@@ -100,11 +100,11 @@
100100
for(i=2; i<g.argc; i++){
101101
char *zName;
102102
char *zPath;
103103
Blob pathname;
104104
105
- zName = mprintf("%s", g.argv[i]);
105
+ zName = mprintf("%/", g.argv[i]);
106106
file_tree_name(zName, &pathname);
107107
zPath = blob_str(&pathname);
108108
if( !db_exists(
109109
"SELECT 1 FROM vfile WHERE pathname=%Q AND NOT deleted", zPath) ){
110110
fossil_fatal("not in the repository: %s", zName);
111111
--- src/add.c
+++ src/add.c
@@ -50,11 +50,11 @@
50 char *zName;
51 char *zPath;
52 Blob pathname;
53 int isDir;
54
55 zName = mprintf("%s", g.argv[i]);
56 isDir = file_isdir(zName);
57 if( isDir==1 ) continue;
58 if( isDir==0 ){
59 fossil_fatal("not found: %s", zName);
60 }
@@ -100,11 +100,11 @@
100 for(i=2; i<g.argc; i++){
101 char *zName;
102 char *zPath;
103 Blob pathname;
104
105 zName = mprintf("%s", g.argv[i]);
106 file_tree_name(zName, &pathname);
107 zPath = blob_str(&pathname);
108 if( !db_exists(
109 "SELECT 1 FROM vfile WHERE pathname=%Q AND NOT deleted", zPath) ){
110 fossil_fatal("not in the repository: %s", zName);
111
--- src/add.c
+++ src/add.c
@@ -50,11 +50,11 @@
50 char *zName;
51 char *zPath;
52 Blob pathname;
53 int isDir;
54
55 zName = mprintf("%/", g.argv[i]);
56 isDir = file_isdir(zName);
57 if( isDir==1 ) continue;
58 if( isDir==0 ){
59 fossil_fatal("not found: %s", zName);
60 }
@@ -100,11 +100,11 @@
100 for(i=2; i<g.argc; i++){
101 char *zName;
102 char *zPath;
103 Blob pathname;
104
105 zName = mprintf("%/", g.argv[i]);
106 file_tree_name(zName, &pathname);
107 zPath = blob_str(&pathname);
108 if( !db_exists(
109 "SELECT 1 FROM vfile WHERE pathname=%Q AND NOT deleted", zPath) ){
110 fossil_fatal("not in the repository: %s", zName);
111
+13 -2
--- src/blob.c
+++ src/blob.c
@@ -571,13 +571,24 @@
571571
}
572572
nName = file_simplify_name(zName, nName);
573573
for(i=1; i<nName; i++){
574574
if( zName[i]=='/' ){
575575
zName[i] = 0;
576
- if( file_mkdir(zName, 1) ){
577
- fossil_panic("unable to create directory %s", zName);
576
+#ifdef __MINGW32__
577
+ /*
578
+ ** On Windows, local path looks like: C:/develop/project/file.txt
579
+ ** The if stops us from trying to create a directory of a drive letter
580
+ ** C: in this example.
581
+ */
582
+ if( !(i==2 && zName[1]==':') ){
583
+#endif
584
+ if( file_mkdir(zName, 1) ){
585
+ fossil_panic("unable to create directory %s", zName);
586
+ }
587
+#ifdef __MINGW32__
578588
}
589
+#endif
579590
zName[i] = '/';
580591
}
581592
}
582593
out = fopen(zName, "wb");
583594
if( out==0 ){
584595
--- src/blob.c
+++ src/blob.c
@@ -571,13 +571,24 @@
571 }
572 nName = file_simplify_name(zName, nName);
573 for(i=1; i<nName; i++){
574 if( zName[i]=='/' ){
575 zName[i] = 0;
576 if( file_mkdir(zName, 1) ){
577 fossil_panic("unable to create directory %s", zName);
 
 
 
 
 
 
 
 
 
 
578 }
 
579 zName[i] = '/';
580 }
581 }
582 out = fopen(zName, "wb");
583 if( out==0 ){
584
--- src/blob.c
+++ src/blob.c
@@ -571,13 +571,24 @@
571 }
572 nName = file_simplify_name(zName, nName);
573 for(i=1; i<nName; i++){
574 if( zName[i]=='/' ){
575 zName[i] = 0;
576 #ifdef __MINGW32__
577 /*
578 ** On Windows, local path looks like: C:/develop/project/file.txt
579 ** The if stops us from trying to create a directory of a drive letter
580 ** C: in this example.
581 */
582 if( !(i==2 && zName[1]==':') ){
583 #endif
584 if( file_mkdir(zName, 1) ){
585 fossil_panic("unable to create directory %s", zName);
586 }
587 #ifdef __MINGW32__
588 }
589 #endif
590 zName[i] = '/';
591 }
592 }
593 out = fopen(zName, "wb");
594 if( out==0 ){
595
+21 -1
--- src/db.c
+++ src/db.c
@@ -490,15 +490,31 @@
490490
** Open the user database in "~/.fossil". Create the database anew if
491491
** it does not already exist.
492492
*/
493493
void db_open_config(void){
494494
char *zDbName;
495
- const char *zHome = getenv("HOME");
495
+ const char *zHome;
496
+#ifdef __MINGW32__
497
+ zHome = getenv("LOCALAPPDATA");
498
+ if( zHome==0 ){
499
+ zHome = getenv("APPDATA");
500
+ if( zHome==0 ){
501
+ zHome = getenv("HOMEPATH");
502
+ }
503
+ }
504
+#else
505
+ zHome = getenv("HOME");
506
+#endif
496507
if( zHome==0 ){
497508
db_err("cannot local home directory");
498509
}
510
+#ifdef __MINGW32__
511
+ /* . filenames give some window systems problems and many apps problems */
512
+ zDbName = mprintf("%s/_fossil", zHome);
513
+#else
499514
zDbName = mprintf("%s/.fossil", zHome);
515
+#endif
500516
if( g.configOpen ) return;
501517
if( file_size(zDbName)<1024*3 ){
502518
db_init_database(zDbName, zConfigSchema, (char*)0);
503519
}
504520
db_open_or_attach(zDbName, "configdb");
@@ -536,15 +552,19 @@
536552
** it is attached to the open database connection too.
537553
*/
538554
int db_open_local(void){
539555
int n;
540556
char zPwd[2000];
557
+ char *zPwdConv;
541558
if( g.localOpen) return 1;
542559
if( getcwd(zPwd, sizeof(zPwd)-20)==0 ){
543560
db_err("pwd too big: max %d", sizeof(zPwd)-20);
544561
}
545562
n = strlen(zPwd);
563
+ zPwdConv = mprintf("%/", zPwd);
564
+ strncpy(zPwd, zPwdConv, 2000-20);
565
+ free(zPwdConv);
546566
while( n>0 ){
547567
if( access(zPwd, W_OK) ) break;
548568
strcpy(&zPwd[n], "/_FOSSIL_");
549569
if( isValidLocalDb(zPwd) ){
550570
/* Found a valid _FOSSIL_ file */
551571
--- src/db.c
+++ src/db.c
@@ -490,15 +490,31 @@
490 ** Open the user database in "~/.fossil". Create the database anew if
491 ** it does not already exist.
492 */
493 void db_open_config(void){
494 char *zDbName;
495 const char *zHome = getenv("HOME");
 
 
 
 
 
 
 
 
 
 
 
496 if( zHome==0 ){
497 db_err("cannot local home directory");
498 }
 
 
 
 
499 zDbName = mprintf("%s/.fossil", zHome);
 
500 if( g.configOpen ) return;
501 if( file_size(zDbName)<1024*3 ){
502 db_init_database(zDbName, zConfigSchema, (char*)0);
503 }
504 db_open_or_attach(zDbName, "configdb");
@@ -536,15 +552,19 @@
536 ** it is attached to the open database connection too.
537 */
538 int db_open_local(void){
539 int n;
540 char zPwd[2000];
 
541 if( g.localOpen) return 1;
542 if( getcwd(zPwd, sizeof(zPwd)-20)==0 ){
543 db_err("pwd too big: max %d", sizeof(zPwd)-20);
544 }
545 n = strlen(zPwd);
 
 
 
546 while( n>0 ){
547 if( access(zPwd, W_OK) ) break;
548 strcpy(&zPwd[n], "/_FOSSIL_");
549 if( isValidLocalDb(zPwd) ){
550 /* Found a valid _FOSSIL_ file */
551
--- src/db.c
+++ src/db.c
@@ -490,15 +490,31 @@
490 ** Open the user database in "~/.fossil". Create the database anew if
491 ** it does not already exist.
492 */
493 void db_open_config(void){
494 char *zDbName;
495 const char *zHome;
496 #ifdef __MINGW32__
497 zHome = getenv("LOCALAPPDATA");
498 if( zHome==0 ){
499 zHome = getenv("APPDATA");
500 if( zHome==0 ){
501 zHome = getenv("HOMEPATH");
502 }
503 }
504 #else
505 zHome = getenv("HOME");
506 #endif
507 if( zHome==0 ){
508 db_err("cannot local home directory");
509 }
510 #ifdef __MINGW32__
511 /* . filenames give some window systems problems and many apps problems */
512 zDbName = mprintf("%s/_fossil", zHome);
513 #else
514 zDbName = mprintf("%s/.fossil", zHome);
515 #endif
516 if( g.configOpen ) return;
517 if( file_size(zDbName)<1024*3 ){
518 db_init_database(zDbName, zConfigSchema, (char*)0);
519 }
520 db_open_or_attach(zDbName, "configdb");
@@ -536,15 +552,19 @@
552 ** it is attached to the open database connection too.
553 */
554 int db_open_local(void){
555 int n;
556 char zPwd[2000];
557 char *zPwdConv;
558 if( g.localOpen) return 1;
559 if( getcwd(zPwd, sizeof(zPwd)-20)==0 ){
560 db_err("pwd too big: max %d", sizeof(zPwd)-20);
561 }
562 n = strlen(zPwd);
563 zPwdConv = mprintf("%/", zPwd);
564 strncpy(zPwd, zPwdConv, 2000-20);
565 free(zPwdConv);
566 while( n>0 ){
567 if( access(zPwd, W_OK) ) break;
568 strcpy(&zPwd[n], "/_FOSSIL_");
569 if( isValidLocalDb(zPwd) ){
570 /* Found a valid _FOSSIL_ file */
571
+1 -1
--- src/file.c
+++ src/file.c
@@ -192,11 +192,11 @@
192192
if( getcwd(zPwd, sizeof(zPwd)-20)==0 ){
193193
fprintf(stderr, "pwd too big: max %d\n", sizeof(zPwd)-20);
194194
exit(1);
195195
}
196196
blob_zero(pOut);
197
- blob_appendf(pOut, "%s/%s", zPwd, zOrigName);
197
+ blob_appendf(pOut, "%//%/", zPwd, zOrigName);
198198
}
199199
blob_resize(pOut, file_simplify_name(blob_buffer(pOut), blob_size(pOut)));
200200
}
201201
202202
/*
203203
--- src/file.c
+++ src/file.c
@@ -192,11 +192,11 @@
192 if( getcwd(zPwd, sizeof(zPwd)-20)==0 ){
193 fprintf(stderr, "pwd too big: max %d\n", sizeof(zPwd)-20);
194 exit(1);
195 }
196 blob_zero(pOut);
197 blob_appendf(pOut, "%s/%s", zPwd, zOrigName);
198 }
199 blob_resize(pOut, file_simplify_name(blob_buffer(pOut), blob_size(pOut)));
200 }
201
202 /*
203
--- src/file.c
+++ src/file.c
@@ -192,11 +192,11 @@
192 if( getcwd(zPwd, sizeof(zPwd)-20)==0 ){
193 fprintf(stderr, "pwd too big: max %d\n", sizeof(zPwd)-20);
194 exit(1);
195 }
196 blob_zero(pOut);
197 blob_appendf(pOut, "%//%/", zPwd, zOrigName);
198 }
199 blob_resize(pOut, file_simplify_name(blob_buffer(pOut), blob_size(pOut)));
200 }
201
202 /*
203
+22 -1
--- src/http.c
+++ src/http.c
@@ -40,21 +40,41 @@
4040
4141
/*
4242
** Persistent information about the HTTP connection.
4343
*/
4444
static FILE *pSocket = 0; /* The socket on which we talk to the server */
45
+
46
+#ifdef __MINGW32__
47
+static WSADATA ws_info;
48
+#endif
49
+
50
+static void ws_init(){
51
+#ifdef __MINGW32__
52
+ if (WSAStartup(MAKEWORD(1,1), &ws_info) != 0){
53
+ fossil_panic("can't initialize winsock");
54
+ }
55
+#endif
56
+}
57
+
58
+static void ws_cleanup(){
59
+#ifdef __MINGW32__
60
+ WSACleanup();
61
+#endif
62
+}
4563
4664
/*
4765
** Open a socket connection to the server. Return 0 on success and
4866
** non-zero if an error occurs.
4967
*/
5068
static int http_open_socket(void){
5169
static struct sockaddr_in addr; /* The server address */
5270
static int addrIsInit = 0; /* True once addr is initialized */
5371
int s;
54
-
72
+
5573
if( !addrIsInit ){
74
+ ws_init();
75
+
5676
addr.sin_family = AF_INET;
5777
addr.sin_port = htons(g.urlPort);
5878
*(int*)&addr.sin_addr = inet_addr(g.urlName);
5979
if( -1 == *(int*)&addr.sin_addr ){
6080
#ifndef FOSSIL_STATIC_LINK
@@ -269,7 +289,8 @@
269289
*/
270290
void http_close(void){
271291
if( pSocket ){
272292
fclose(pSocket);
273293
pSocket = 0;
294
+ ws_cleanup();
274295
}
275296
}
276297
--- src/http.c
+++ src/http.c
@@ -40,21 +40,41 @@
40
41 /*
42 ** Persistent information about the HTTP connection.
43 */
44 static FILE *pSocket = 0; /* The socket on which we talk to the server */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
45
46 /*
47 ** Open a socket connection to the server. Return 0 on success and
48 ** non-zero if an error occurs.
49 */
50 static int http_open_socket(void){
51 static struct sockaddr_in addr; /* The server address */
52 static int addrIsInit = 0; /* True once addr is initialized */
53 int s;
54
55 if( !addrIsInit ){
 
 
56 addr.sin_family = AF_INET;
57 addr.sin_port = htons(g.urlPort);
58 *(int*)&addr.sin_addr = inet_addr(g.urlName);
59 if( -1 == *(int*)&addr.sin_addr ){
60 #ifndef FOSSIL_STATIC_LINK
@@ -269,7 +289,8 @@
269 */
270 void http_close(void){
271 if( pSocket ){
272 fclose(pSocket);
273 pSocket = 0;
 
274 }
275 }
276
--- src/http.c
+++ src/http.c
@@ -40,21 +40,41 @@
40
41 /*
42 ** Persistent information about the HTTP connection.
43 */
44 static FILE *pSocket = 0; /* The socket on which we talk to the server */
45
46 #ifdef __MINGW32__
47 static WSADATA ws_info;
48 #endif
49
50 static void ws_init(){
51 #ifdef __MINGW32__
52 if (WSAStartup(MAKEWORD(1,1), &ws_info) != 0){
53 fossil_panic("can't initialize winsock");
54 }
55 #endif
56 }
57
58 static void ws_cleanup(){
59 #ifdef __MINGW32__
60 WSACleanup();
61 #endif
62 }
63
64 /*
65 ** Open a socket connection to the server. Return 0 on success and
66 ** non-zero if an error occurs.
67 */
68 static int http_open_socket(void){
69 static struct sockaddr_in addr; /* The server address */
70 static int addrIsInit = 0; /* True once addr is initialized */
71 int s;
72
73 if( !addrIsInit ){
74 ws_init();
75
76 addr.sin_family = AF_INET;
77 addr.sin_port = htons(g.urlPort);
78 *(int*)&addr.sin_addr = inet_addr(g.urlName);
79 if( -1 == *(int*)&addr.sin_addr ){
80 #ifndef FOSSIL_STATIC_LINK
@@ -269,7 +289,8 @@
289 */
290 void http_close(void){
291 if( pSocket ){
292 fclose(pSocket);
293 pSocket = 0;
294 ws_cleanup();
295 }
296 }
297
+18
--- src/printf.c
+++ src/printf.c
@@ -49,10 +49,11 @@
4949
#define etPOINTER 15 /* The %p conversion */
5050
#define etHTMLIZE 16 /* Make text safe for HTML */
5151
#define etHTTPIZE 17 /* Make text safe for HTTP. "/" encoded as %2f */
5252
#define etURLIZE 18 /* Make text safe for HTTP. "/" not encoded */
5353
#define etFOSSILIZE 19 /* The fossil header encoding format. */
54
+#define etPATH 20 /* Path type */
5455
5556
5657
/*
5758
** An "etByte" is an 8-bit unsigned value.
5859
*/
@@ -109,10 +110,11 @@
109110
{ 'G', 0, 1, etGENERIC, 14, 0 },
110111
{ 'i', 10, 1, etRADIX, 0, 0 },
111112
{ 'n', 0, 0, etSIZE, 0, 0 },
112113
{ '%', 0, 0, etPERCENT, 0, 0 },
113114
{ 'p', 16, 0, etPOINTER, 0, 1 },
115
+ { '/', 0, 0, etPATH, 0, 0 },
114116
};
115117
#define etNINFO (sizeof(fmtinfo)/sizeof(fmtinfo[0]))
116118
117119
/*
118120
** "*val" is a double such that 0.1 <= *val < 10.0
@@ -541,10 +543,26 @@
541543
}else{
542544
length =1;
543545
}
544546
bufpt = buf;
545547
break;
548
+ case etPATH: {
549
+ int i;
550
+ char *e = va_arg(ap,char*);
551
+ if( e==0 ){e="";}
552
+ length = strlen(e);
553
+ zExtra = bufpt = malloc(length+1);
554
+ for( i=0; i<length; i++ ){
555
+ if( e[i]=='\\' ){
556
+ bufpt[i]='/';
557
+ }else{
558
+ bufpt[i]=e[i];
559
+ }
560
+ }
561
+ bufpt[length]='\0';
562
+ break;
563
+ }
546564
case etSTRING:
547565
case etDYNSTRING:
548566
bufpt = va_arg(ap,char*);
549567
if( bufpt==0 ){
550568
bufpt = "";
551569
--- src/printf.c
+++ src/printf.c
@@ -49,10 +49,11 @@
49 #define etPOINTER 15 /* The %p conversion */
50 #define etHTMLIZE 16 /* Make text safe for HTML */
51 #define etHTTPIZE 17 /* Make text safe for HTTP. "/" encoded as %2f */
52 #define etURLIZE 18 /* Make text safe for HTTP. "/" not encoded */
53 #define etFOSSILIZE 19 /* The fossil header encoding format. */
 
54
55
56 /*
57 ** An "etByte" is an 8-bit unsigned value.
58 */
@@ -109,10 +110,11 @@
109 { 'G', 0, 1, etGENERIC, 14, 0 },
110 { 'i', 10, 1, etRADIX, 0, 0 },
111 { 'n', 0, 0, etSIZE, 0, 0 },
112 { '%', 0, 0, etPERCENT, 0, 0 },
113 { 'p', 16, 0, etPOINTER, 0, 1 },
 
114 };
115 #define etNINFO (sizeof(fmtinfo)/sizeof(fmtinfo[0]))
116
117 /*
118 ** "*val" is a double such that 0.1 <= *val < 10.0
@@ -541,10 +543,26 @@
541 }else{
542 length =1;
543 }
544 bufpt = buf;
545 break;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
546 case etSTRING:
547 case etDYNSTRING:
548 bufpt = va_arg(ap,char*);
549 if( bufpt==0 ){
550 bufpt = "";
551
--- src/printf.c
+++ src/printf.c
@@ -49,10 +49,11 @@
49 #define etPOINTER 15 /* The %p conversion */
50 #define etHTMLIZE 16 /* Make text safe for HTML */
51 #define etHTTPIZE 17 /* Make text safe for HTTP. "/" encoded as %2f */
52 #define etURLIZE 18 /* Make text safe for HTTP. "/" not encoded */
53 #define etFOSSILIZE 19 /* The fossil header encoding format. */
54 #define etPATH 20 /* Path type */
55
56
57 /*
58 ** An "etByte" is an 8-bit unsigned value.
59 */
@@ -109,10 +110,11 @@
110 { 'G', 0, 1, etGENERIC, 14, 0 },
111 { 'i', 10, 1, etRADIX, 0, 0 },
112 { 'n', 0, 0, etSIZE, 0, 0 },
113 { '%', 0, 0, etPERCENT, 0, 0 },
114 { 'p', 16, 0, etPOINTER, 0, 1 },
115 { '/', 0, 0, etPATH, 0, 0 },
116 };
117 #define etNINFO (sizeof(fmtinfo)/sizeof(fmtinfo[0]))
118
119 /*
120 ** "*val" is a double such that 0.1 <= *val < 10.0
@@ -541,10 +543,26 @@
543 }else{
544 length =1;
545 }
546 bufpt = buf;
547 break;
548 case etPATH: {
549 int i;
550 char *e = va_arg(ap,char*);
551 if( e==0 ){e="";}
552 length = strlen(e);
553 zExtra = bufpt = malloc(length+1);
554 for( i=0; i<length; i++ ){
555 if( e[i]=='\\' ){
556 bufpt[i]='/';
557 }else{
558 bufpt[i]=e[i];
559 }
560 }
561 bufpt[length]='\0';
562 break;
563 }
564 case etSTRING:
565 case etDYNSTRING:
566 bufpt = va_arg(ap,char*);
567 if( bufpt==0 ){
568 bufpt = "";
569
+99 -14
--- win32.txt
+++ win32.txt
@@ -1,15 +1,99 @@
1
-Notes: Porting fossil to win32
2
-======================================================================
3
-
4
-Setting up my build environment:
-----------------------------------------------------------------------
5
-
6
- Install:
7
- MinGW 5.1.3
8
- MSYS 1.0.10
9
-
10
- Download/compile/install zlib (configure --prefix=/mingw)
11
- Download/compile/install tclsh (configure --prefix=/) (for tests)
12
-
13
- All commands were issued in the MSYS shell, not a cmd.exe
14
-
1
+Notes: Porting fossil to win32
2
+======================================================================
3
+
4
+Setting up my build environment:
5
+----------------------------------------------------------------------
6
+
7
+ Install:
8
+ MinGW 5.1.3
9
+ MSYS 1.0.10
10
+
11
+ Download/compile/install zlib (configure --prefix=/mingw)
12
+ Download/compile/install tclsh (configure --prefix=/) (for tests)
13
+
14
+ All commands were issued in the MSYS shell, not a cmd.exe
15
+
16
+
17
+
18
+Outstanding Issues:
19
+----------------------------------------------------------------------
20
+
21
+* server is totally non-functional - #if/#end'd out of the code
22
+* all path operations are defunct
23
+* remote network operations are reporting: can't resolve host name: xyz
24
+
25
+ Winsock must be initialized before using:
26
+
27
+ WSADATA info;
28
+ if (WSAStartup(MAKEWORD(1,1), &info) != 0){
29
+ fossil_panic("can't initialize winsock");
30
+ }
31
+
32
+
33
+
34
+Commands status:
35
+----------------------------------------------------------------------
36
+
37
+add OK
38
+cgi Not tested
39
+changes OK
40
+checkout BAD #1
41
+clean OK
42
+clone Local Only #2
43
+close OK
44
+commit OK (not tested with gpg signing yet)
45
+config OK
46
+deconstruct OK
47
+del OK
48
+descendents OK
49
+diff OK
50
+extra OK
51
+help OK
52
+http Not Tested
53
+info OK
54
+leaves OK
55
+ls OK
56
+merge OK
57
+new OK
58
+open OK
59
+pull BAD #2
60
+push BAD #2
61
+rebuild OK (didn't have a corrupt file to try on though)
62
+redo BAD #3
63
+rm OK
64
+server BAD #2,#4
65
+status OK
66
+sync BAD #2
67
+timeline OK
68
+tkdiff OK
69
+undo OK
70
+update OK
71
+user capabilities OK
72
+user default OK
73
+user list OK
74
+user new OK
75
+user password OK
76
+
77
+#1 Have a repo where I removed a file. I did a fossil checkout 123abc,
78
+ which is the last version that had the file. The file does not
79
+ appear. fossil checkout --force 123abc does things, but still the
80
+ file does not appear.
81
+
82
+ Make a new dir, fossil open ../repo.fsl && fossil checkout 123abc and
83
+ the file appears.
84
+
85
+ Is that normal operation?
86
+
87
+#2 No socket operations are functioning yet
88
+
89
+#3 In test1/ I edited a file, test2/ I updated, type file.txt changes
90
+ were there. I then did fossil undo file.txt. The changes were gone
91
+ and fossil status said I had edited file.txt. A fossil redo did not
92
+ print anything to the screen and the changes for file.txt are not
93
+ in the file. fossil status still reports that the file was edited.
94
+ There was no commit/update or any other command inbetween these
95
+ actions.
96
+
97
+#4 There were various difficulties in this function beyond simple socket
98
+ problems. The major one being fork. This will probably be the last
99
+ command to be functional in fossil on windows.
15100
--- win32.txt
+++ win32.txt
@@ -1,15 +1,99 @@
1 Notes: Porting fossil to win32
2 ======================================================================
3
4 Setting up my build environment:
-----------------------------------------------------------------------
5
6 Install:
7 MinGW 5.1.3
8 MSYS 1.0.10
9
10 Download/compile/install zlib (configure --prefix=/mingw)
11 Download/compile/install tclsh (configure --prefix=/) (for tests)
12
13 All commands were issued in the MSYS shell, not a cmd.exe
14
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
--- win32.txt
+++ win32.txt
@@ -1,15 +1,99 @@
 
 
 
 
-----------------------------------------------------------------------
1 Notes: Porting fossil to win32
2 ======================================================================
3
4 Setting up my build environment:
5 ----------------------------------------------------------------------
6
7 Install:
8 MinGW 5.1.3
9 MSYS 1.0.10
10
11 Download/compile/install zlib (configure --prefix=/mingw)
12 Download/compile/install tclsh (configure --prefix=/) (for tests)
13
14 All commands were issued in the MSYS shell, not a cmd.exe
15
16
17
18 Outstanding Issues:
19 ----------------------------------------------------------------------
20
21 * server is totally non-functional - #if/#end'd out of the code
22 * all path operations are defunct
23 * remote network operations are reporting: can't resolve host name: xyz
24
25 Winsock must be initialized before using:
26
27 WSADATA info;
28 if (WSAStartup(MAKEWORD(1,1), &info) != 0){
29 fossil_panic("can't initialize winsock");
30 }
31
32
33
34 Commands status:
35 ----------------------------------------------------------------------
36
37 add OK
38 cgi Not tested
39 changes OK
40 checkout BAD #1
41 clean OK
42 clone Local Only #2
43 close OK
44 commit OK (not tested with gpg signing yet)
45 config OK
46 deconstruct OK
47 del OK
48 descendents OK
49 diff OK
50 extra OK
51 help OK
52 http Not Tested
53 info OK
54 leaves OK
55 ls OK
56 merge OK
57 new OK
58 open OK
59 pull BAD #2
60 push BAD #2
61 rebuild OK (didn't have a corrupt file to try on though)
62 redo BAD #3
63 rm OK
64 server BAD #2,#4
65 status OK
66 sync BAD #2
67 timeline OK
68 tkdiff OK
69 undo OK
70 update OK
71 user capabilities OK
72 user default OK
73 user list OK
74 user new OK
75 user password OK
76
77 #1 Have a repo where I removed a file. I did a fossil checkout 123abc,
78 which is the last version that had the file. The file does not
79 appear. fossil checkout --force 123abc does things, but still the
80 file does not appear.
81
82 Make a new dir, fossil open ../repo.fsl && fossil checkout 123abc and
83 the file appears.
84
85 Is that normal operation?
86
87 #2 No socket operations are functioning yet
88
89 #3 In test1/ I edited a file, test2/ I updated, type file.txt changes
90 were there. I then did fossil undo file.txt. The changes were gone
91 and fossil status said I had edited file.txt. A fossil redo did not
92 print anything to the screen and the changes for file.txt are not
93 in the file. fossil status still reports that the file was edited.
94 There was no commit/update or any other command inbetween these
95 actions.
96
97 #4 There were various difficulties in this function beyond simple socket
98 problems. The major one being fork. This will probably be the last
99 command to be functional in fossil on windows.
100

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button