Fossil

Check-in [49bdd78b]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:merge trunk. Seems to work now. Still to be tested more.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | ticket-d17d6e5b17
Files: files | file ages | folders
SHA1: 49bdd78b75d639b855bd284e5a6489aef74894cd
User & Date: jan.nijtmans 2012-11-29 21:21:32
Context
2012-11-30
12:36
merge trunk. appears to work well again. check-in: 0c659161 user: jan.nijtmans tags: ticket-d17d6e5b17
2012-11-29
21:21
merge trunk. Seems to work now. Still to be tested more. check-in: 49bdd78b user: jan.nijtmans tags: ticket-d17d6e5b17
20:23
All the --verbose option on "all sync", "all push", and "all pull". check-in: 4ee99cc8 user: drh tags: trunk
15:13
merge trunk. Broken on win32! check-in: 258cedd6 user: jan.nijtmans tags: ticket-d17d6e5b17
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/allrepo.c.

130
131
132
133
134
135
136

137
138

139
140
141
142
143
144
145
146
147
148
149
150

151
152
153
154
155
156
157
  blob_zero(&extra);
  zCmd = g.argv[2];
  if( strncmp(zCmd, "list", n)==0 || strncmp(zCmd,"ls",n)==0 ){
    zCmd = "list";
    useCheckouts = find_option("ckout","c",0)!=0;
  }else if( strncmp(zCmd, "push", n)==0 ){
    zCmd = "push -autourl -R";

  }else if( strncmp(zCmd, "pull", n)==0 ){
    zCmd = "pull -autourl -R";

  }else if( strncmp(zCmd, "rebuild", n)==0 ){
    zCmd = "rebuild";
    collect_argument(&extra, "cluster");
    collect_argument(&extra, "compress");
    collect_argument(&extra, "noverify");
    collect_argument_value(&extra, "pagesize");
    collect_argument(&extra, "vacuum");
    collect_argument(&extra, "deanalyze");
    collect_argument(&extra, "wal");
    collect_argument(&extra, "stat");
  }else if( strncmp(zCmd, "sync", n)==0 ){
    zCmd = "sync -autourl -R";

  }else if( strncmp(zCmd, "test-integrity", n)==0 ){
    zCmd = "test-integrity";
  }else if( strncmp(zCmd, "test-orphans", n)==0 ){
    zCmd = "test-orphans -R";
  }else if( strncmp(zCmd, "test-missing", n)==0 ){
    zCmd = "test-missing -q -R";
    collect_argument(&extra, "notshunned");







>


>












>







130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
  blob_zero(&extra);
  zCmd = g.argv[2];
  if( strncmp(zCmd, "list", n)==0 || strncmp(zCmd,"ls",n)==0 ){
    zCmd = "list";
    useCheckouts = find_option("ckout","c",0)!=0;
  }else if( strncmp(zCmd, "push", n)==0 ){
    zCmd = "push -autourl -R";
    collect_argument(&extra, "verbose");
  }else if( strncmp(zCmd, "pull", n)==0 ){
    zCmd = "pull -autourl -R";
    collect_argument(&extra, "verbose");
  }else if( strncmp(zCmd, "rebuild", n)==0 ){
    zCmd = "rebuild";
    collect_argument(&extra, "cluster");
    collect_argument(&extra, "compress");
    collect_argument(&extra, "noverify");
    collect_argument_value(&extra, "pagesize");
    collect_argument(&extra, "vacuum");
    collect_argument(&extra, "deanalyze");
    collect_argument(&extra, "wal");
    collect_argument(&extra, "stat");
  }else if( strncmp(zCmd, "sync", n)==0 ){
    zCmd = "sync -autourl -R";
    collect_argument(&extra, "verbose");
  }else if( strncmp(zCmd, "test-integrity", n)==0 ){
    zCmd = "test-integrity";
  }else if( strncmp(zCmd, "test-orphans", n)==0 ){
    zCmd = "test-orphans -R";
  }else if( strncmp(zCmd, "test-missing", n)==0 ){
    zCmd = "test-missing -q -R";
    collect_argument(&extra, "notshunned");

Changes to src/info.c.

1108
1109
1110
1111
1112
1113
1114



1115
1116
1117
1118
1119
1120
1121
      @ %z(href("%R/annotate?checkin=%S&filename=%T",zVers,zName))
      @ [annotate]</a>
    }
    cnt++;
    if( pDownloadName && blob_size(pDownloadName)==0 ){
      blob_append(pDownloadName, zName, -1);
    }



  }
  @ </ul>
  free(prevName);
  db_finalize(&q);
  db_prepare(&q,
    "SELECT substr(tagname, 6, 10000), datetime(event.mtime),"
    "       coalesce(event.euser, event.user)"







>
>
>







1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
      @ %z(href("%R/annotate?checkin=%S&filename=%T",zVers,zName))
      @ [annotate]</a>
    }
    cnt++;
    if( pDownloadName && blob_size(pDownloadName)==0 ){
      blob_append(pDownloadName, zName, -1);
    }
  }
  if( prevName ){
    @ </ul>
  }
  @ </ul>
  free(prevName);
  db_finalize(&q);
  db_prepare(&q,
    "SELECT substr(tagname, 6, 10000), datetime(event.mtime),"
    "       coalesce(event.euser, event.user)"

Changes to src/main.c.

490
491
492
493
494
495
496




497
498
499
500
501
502
503
504
505
506
507
....
2032
2033
2034
2035
2036
2037
2038

2039
2040
2041
2042
2043
2044
2045

  g.argc = argc;
  g.argv = argv;
#if defined(_WIN32) && !defined(__MINGW32__)
  parse_windows_command_line(&g.argc, &g.argv);
  GetModuleFileNameW(NULL, buf, MAX_PATH);
  g.nameOfExe = fossil_filename_to_utf8(buf);




#else
  g.nameOfExe = g.argv[0];
#endif
  for(i=0; i<g.argc; i++) g.argv[i] = fossil_filename_to_utf8(g.argv[i]);
  for(i=1; i<g.argc-1; i++){
    z = g.argv[i];
    if( z[0]!='-' ) continue;
    z++;
    if( z[0]=='-' ) z++;
    if( z[0]==0 ) return;   /* Stop searching at "--" */
    if( fossil_strcmp(z, "args")==0 ) break;
................................................................................
**
** With the --hex option, show the output as hexadecimal.  This can be used
** to verify the fossil_filename_to_utf8() routine on Windows and Mac.
*/
void test_echo_cmd(void){
  int i, j;
  if( find_option("hex",0,0)==0 ){

    for(i=0; i<g.argc; i++){
      fossil_print("argv[%d] = [%s]\n", i, g.argv[i]);
    }
  }else{
    unsigned char *z, c;
    for(i=0; i<g.argc; i++){
      fossil_print("argv[%d] = [", i);







>
>
>
>



<







 







>







490
491
492
493
494
495
496
497
498
499
500
501
502
503

504
505
506
507
508
509
510
....
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049

  g.argc = argc;
  g.argv = argv;
#if defined(_WIN32) && !defined(__MINGW32__)
  parse_windows_command_line(&g.argc, &g.argv);
  GetModuleFileNameW(NULL, buf, MAX_PATH);
  g.nameOfExe = fossil_filename_to_utf8(buf);
  for(i=0; i<g.argc; i++) g.argv[i] = fossil_filename_to_utf8(g.argv[i]);
#elif defined(__APPLE__)
  for(i=0; i<g.argc; i++) g.argv[i] = fossil_filename_to_utf8(g.argv[i]);
  g.nameOfExe = g.argv[0];
#else
  g.nameOfExe = g.argv[0];
#endif

  for(i=1; i<g.argc-1; i++){
    z = g.argv[i];
    if( z[0]!='-' ) continue;
    z++;
    if( z[0]=='-' ) z++;
    if( z[0]==0 ) return;   /* Stop searching at "--" */
    if( fossil_strcmp(z, "args")==0 ) break;
................................................................................
**
** With the --hex option, show the output as hexadecimal.  This can be used
** to verify the fossil_filename_to_utf8() routine on Windows and Mac.
*/
void test_echo_cmd(void){
  int i, j;
  if( find_option("hex",0,0)==0 ){
    fossil_print("g.nameOfExe = [%s]\n", g.nameOfExe);
    for(i=0; i<g.argc; i++){
      fossil_print("argv[%d] = [%s]\n", i, g.argv[i]);
    }
  }else{
    unsigned char *z, c;
    for(i=0; i<g.argc; i++){
      fossil_print("argv[%d] = [", i);

Changes to src/utf8.c.

132
133
134
135
136
137
138

139
140
141
142
143
144
145
146

147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
  zUtf = sqlite3_malloc( nByte );
  if( zUtf==0 ){
    return 0;
  }
  WideCharToMultiByte(CP_UTF8, 0, zFilename, -1, zUtf, nByte, 0, 0);
  return zUtf;
#elif defined(__APPLE__)

  char *zOut;
  iconv_t cd;
  size_t n, x;
  const char *zUtf = zFilename1
  for(n=0; zUtf[n]>0 && zUtf[n]<=0x7f; n++){}
  if( zUtf[n]!=0 && (cd = iconv_open("UTF-8", "UTF-8-MAC"))!=(iconv_t)-1 ){
    char *zIn = (char*)zUtf;
    char *zOutx;

    size_t nIn, nOutx;
    nIn = n = strlen(zUtf);
    nOutx = nIn+100;
    zOutx = zOut = fossil_malloc( nOutx+1 );
    x = iconv(cd, &zIn, &nIn, &zOutx, &nOutx);
    if( x==(size_t)-1 ){
      fossil_free(zOut);
      zOut = fossil_strdup(zUtf);
    }else{
      zOut[n+100-nOutx] = 0;
    }
    iconv_close(cd);
  }else{
    zOut = fossil_strdup(zUtf);
  }







>



|
<
|
<

>

|





|







132
133
134
135
136
137
138
139
140
141
142
143

144

145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
  zUtf = sqlite3_malloc( nByte );
  if( zUtf==0 ){
    return 0;
  }
  WideCharToMultiByte(CP_UTF8, 0, zFilename, -1, zUtf, nByte, 0, 0);
  return zUtf;
#elif defined(__APPLE__)
  char *zIn = (char*)zFilename;
  char *zOut;
  iconv_t cd;
  size_t n, x;
  for(n=0; zIn[n]>0 && zIn[n]<=0x7f; n++){}

  if( zIn[n]!=0 && (cd = iconv_open("UTF-8", "UTF-8-MAC"))!=(iconv_t)-1 ){

    char *zOutx;
    char *zOrig = zIn;
    size_t nIn, nOutx;
    nIn = n = strlen(zIn);
    nOutx = nIn+100;
    zOutx = zOut = fossil_malloc( nOutx+1 );
    x = iconv(cd, &zIn, &nIn, &zOutx, &nOutx);
    if( x==(size_t)-1 ){
      fossil_free(zOut);
      zOut = fossil_strdup(zOrig);
    }else{
      zOut[n+100-nOutx] = 0;
    }
    iconv_close(cd);
  }else{
    zOut = fossil_strdup(zUtf);
  }

Changes to win/Makefile.mingw.

11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
...
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
# This is a makefile for use on Windows/Linux/Darwin/Cygwin using MinGW or
# MinGW-w64.
#

#### Select one of MinGW, MinGW-64 (32-bit) or MinGW-w64 (64-bit) compilers.
#    By default, this is an empty string (i.e. use the native compiler).
#
# PREFIX =
# PREFIX = mingw32-
# PREFIX = i686-pc-mingw32-
PREFIX = i686-w64-mingw32-
# PREFIX = x86_64-w64-mingw32-

#### The toplevel directory of the source tree.  Fossil can be built
#    in a directory that is separate from the source tree.  Just change
#    the following to point from the build directory to the src/ folder.
#
SRCDIR = src
................................................................................
else
LIB += -lkernel32 -lws2_32
endif

#### Tcl shell for use in running the fossil test suite.  This is only
#    used for testing.
#
TCLSH = tclsh86

#### Nullsoft installer MakeNSIS location
#
MAKENSIS = "$(ProgramFiles)\NSIS\MakeNSIS.exe"

#### Include a configuration file that can override any one of these settings.
#







|


|







 







|







11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
...
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
# This is a makefile for use on Windows/Linux/Darwin/Cygwin using MinGW or
# MinGW-w64.
#

#### Select one of MinGW, MinGW-64 (32-bit) or MinGW-w64 (64-bit) compilers.
#    By default, this is an empty string (i.e. use the native compiler).
#
PREFIX =
# PREFIX = mingw32-
# PREFIX = i686-pc-mingw32-
# PREFIX = i686-w64-mingw32-
# PREFIX = x86_64-w64-mingw32-

#### The toplevel directory of the source tree.  Fossil can be built
#    in a directory that is separate from the source tree.  Just change
#    the following to point from the build directory to the src/ folder.
#
SRCDIR = src
................................................................................
else
LIB += -lkernel32 -lws2_32
endif

#### Tcl shell for use in running the fossil test suite.  This is only
#    used for testing.
#
TCLSH = tclsh

#### Nullsoft installer MakeNSIS location
#
MAKENSIS = "$(ProgramFiles)\NSIS\MakeNSIS.exe"

#### Include a configuration file that can override any one of these settings.
#