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

Overview
Comment:merged trunk to branch
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | wolfgangFormat2CSS
Files: files | file ages | folders
SHA1:ef6979eac9abdedb609154ea48178a0d91a5b571
User & Date: wolfgang 2010-09-09 20:04:14
Context
2010-09-09
20:12
timeline css skinned check-in: dc8a247e user: wolfgang tags: wolfgangFormat2CSS
20:04
merged trunk to branch check-in: ef6979ea user: wolfgang tags: wolfgangFormat2CSS
13:57
Allow checkout of versions that have neither ancestors nor children. check-in: 4980b9a7 user: drh tags: trunk
10:02
Fix a large memory leak in the "fossil reconstruct" command. Ticket [fc1a61329403f605c494] check-in: 9ef4a184 user: drh tags: trunk
09:59
Allow ~ and % characters in the URL. Ticket [74ccf51c7d24414b1]. check-in: a203674a user: drh tags: trunk
2010-09-08
21:15
made default css handled by loop instead of explizit calls, .. check-in: a5576e2d user: wolfgang tags: wolfgangFormat2CSS
Changes

Changes to src/encode.c.

98
99
100
101
102
103
104
105

106
107
108
109
110
111
112
static char *EncodeHttp(const char *zIn, int n, int encodeSlash){
  int c;
  int i = 0;
  int count = 0;
  char *zOut;
  int other;
# define IsSafeChar(X)  \
     (isalnum(X) || (X)=='.' || (X)=='$' || (X)=='-' || (X)=='_' || (X)==other)


  if( zIn==0 ) return 0;
  if( n<0 ) n = strlen(zIn);
  other = encodeSlash ? 'a' : '/';
  while( i<n && (c = zIn[i])!=0 ){
    if( IsSafeChar(c) || c==' ' ){
      count++;







|
>







98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
static char *EncodeHttp(const char *zIn, int n, int encodeSlash){
  int c;
  int i = 0;
  int count = 0;
  char *zOut;
  int other;
# define IsSafeChar(X)  \
     (isalnum(X) || (X)=='.' || (X)=='$' \
      || (X)=='~' || (X)=='-' || (X)=='_' || (X)==other)

  if( zIn==0 ) return 0;
  if( n<0 ) n = strlen(zIn);
  other = encodeSlash ? 'a' : '/';
  while( i<n && (c = zIn[i])!=0 ){
    if( IsSafeChar(c) || c==' ' ){
      count++;

Changes to src/rebuild.c.

444
445
446
447
448
449
450


451
452
453
454
455
456
457
        continue;
      }
      blob_appendf(&path, "%s/%s", g.argv[3], pEntry->d_name);
      if( blob_read_from_file(&aContent, blob_str(&path))==-1 ){
        fossil_panic("Some unknown error occurred while reading \"%s\"", blob_str(&path));
      }
      content_put(&aContent, 0, 0);


    }
  }
  else {
    fossil_panic("Encountered error %d while trying to open \"%s\".", errno, g.argv[3]);
  }

  rebuild_db(0, 1);







>
>







444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
        continue;
      }
      blob_appendf(&path, "%s/%s", g.argv[3], pEntry->d_name);
      if( blob_read_from_file(&aContent, blob_str(&path))==-1 ){
        fossil_panic("Some unknown error occurred while reading \"%s\"", blob_str(&path));
      }
      content_put(&aContent, 0, 0);
      blob_reset(&path);
      blob_reset(&aContent);
    }
  }
  else {
    fossil_panic("Encountered error %d while trying to open \"%s\".", errno, g.argv[3]);
  }

  rebuild_db(0, 1);

Changes to src/setup.c.

907
908
909
910
911
912
913

914
915
916
917
918
919
920
  @ <hr>
  @ The default CSS is shown below for reference.  Other examples
  @ of CSS files can be seen on the <a href="setup_skin">skins page</a>.
  @ See also the <a href="setup_header">header</a> and
  @ <a href="setup_footer">footer</a> editing screens.
  @ <blockquote><pre>
  cgi_append_default_css();

  style_footer();
  db_end_transaction(0);
}

/*
** WEBPAGE: setup_header
*/







>







907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
  @ <hr>
  @ The default CSS is shown below for reference.  Other examples
  @ of CSS files can be seen on the <a href="setup_skin">skins page</a>.
  @ See also the <a href="setup_header">header</a> and
  @ <a href="setup_footer">footer</a> editing screens.
  @ <blockquote><pre>
  cgi_append_default_css();
  @ </pre></blockquote>
  style_footer();
  db_end_transaction(0);
}

/*
** WEBPAGE: setup_header
*/

Changes to src/update.c.

22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#include "update.h"
#include <assert.h>

/*
** Return true if artifact rid is a version
*/
int is_a_version(int rid){
  return db_exists("SELECT 1 FROM plink WHERE cid=%d "
                   "UNION ALL SELECT 1 FROM plink WHERE pid=%d",
                    rid, rid);
}

/*
** COMMAND: update
**
** Usage: %fossil update ?VERSION? ?FILES...?
**







|
<
<







22
23
24
25
26
27
28
29


30
31
32
33
34
35
36
#include "update.h"
#include <assert.h>

/*
** Return true if artifact rid is a version
*/
int is_a_version(int rid){
  return db_exists("SELECT 1 FROM event WHERE objid=%d AND type='ci'", rid);


}

/*
** COMMAND: update
**
** Usage: %fossil update ?VERSION? ?FILES...?
**

Changes to src/url.c.

117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
      }
      g.urlHostname = mprintf("%s:%d", g.urlName, g.urlPort);
    }else{
      g.urlPort = g.urlDfltPort;
      g.urlHostname = g.urlName;
    }
    dehttpize(g.urlName);
    g.urlPath = mprintf(&zUrl[i]);
    for(i=0; g.urlPath[i] && g.urlPath[i]!='?'; i++){}
    if( g.urlPath[i] ){
      g.urlPath[i] = 0;
      i++;
    }
    zExe = mprintf("");
    while( g.urlPath[i]!=0 ){







|







117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
      }
      g.urlHostname = mprintf("%s:%d", g.urlName, g.urlPort);
    }else{
      g.urlPort = g.urlDfltPort;
      g.urlHostname = g.urlName;
    }
    dehttpize(g.urlName);
    g.urlPath = mprintf("%s", &zUrl[i]);
    for(i=0; g.urlPath[i] && g.urlPath[i]!='?'; i++){}
    if( g.urlPath[i] ){
      g.urlPath[i] = 0;
      i++;
    }
    zExe = mprintf("");
    while( g.urlPath[i]!=0 ){