Fossil SCM

Added the "all" command for things like "fossil all sync". I am not sure "all" is quite the right name for this command, so I may yet change it.

drh 2008-10-17 00:20 trunk
Commit 9346f2290c84084f4641a48a5e0fc813d1587251
--- a/src/allrepo.c
+++ b/src/allrepo.c
@@ -0,0 +1,5 @@
1
+/*extras
2
+if( useChecprepaionis file is located inDDATA%
3
+** or %HOMGNU General "SELECT substr(name, 6) FROM hows|lsddsyncsyncsync-R %s -autourl",
4
+ finalize}
5
+onst
--- a/src/allrepo.c
+++ b/src/allrepo.c
@@ -0,0 +1,5 @@
 
 
 
 
 
--- a/src/allrepo.c
+++ b/src/allrepo.c
@@ -0,0 +1,5 @@
1 /*extras
2 if( useChecprepaionis file is located inDDATA%
3 ** or %HOMGNU General "SELECT substr(name, 6) FROM hows|lsddsyncsyncsync-R %s -autourl",
4 finalize}
5 onst
+4 -1
--- src/checkin.c
+++ src/checkin.c
@@ -46,11 +46,13 @@
4646
int isDeleted = db_column_int(&q, 1);
4747
int isChnged = db_column_int(&q,2);
4848
int isNew = db_column_int(&q,3)==0;
4949
char *zFullName = mprintf("%s/%s", g.zLocalRoot, zPathname);
5050
blob_append(report, zPrefix, nPrefix);
51
- if( access(zFullName, 0) ){
51
+ if( isDeleted ){
52
+ blob_appendf(report, "DELETED %s\n", zPathname);
53
+ }else if( access(zFullName, 0) ){
5254
blob_appendf(report, "MISSING %s\n", zPathname);
5355
}else if( isNew ){
5456
blob_appendf(report, "ADDED %s\n", zPathname);
5557
}else if( isDeleted ){
5658
blob_appendf(report, "DELETED %s\n", zPathname);
@@ -398,10 +400,11 @@
398400
if( !db_exists("SELECT 1 FROM user WHERE login=%Q", g.zLogin) ){
399401
fossil_fatal("no such user: %s", g.zLogin);
400402
}
401403
402404
db_begin_transaction();
405
+ db_record_repository_filename(0);
403406
rc = unsaved_changes();
404407
if( rc==0 && !isAMerge && !forceFlag ){
405408
fossil_panic("nothing has changed");
406409
}
407410
408411
--- src/checkin.c
+++ src/checkin.c
@@ -46,11 +46,13 @@
46 int isDeleted = db_column_int(&q, 1);
47 int isChnged = db_column_int(&q,2);
48 int isNew = db_column_int(&q,3)==0;
49 char *zFullName = mprintf("%s/%s", g.zLocalRoot, zPathname);
50 blob_append(report, zPrefix, nPrefix);
51 if( access(zFullName, 0) ){
 
 
52 blob_appendf(report, "MISSING %s\n", zPathname);
53 }else if( isNew ){
54 blob_appendf(report, "ADDED %s\n", zPathname);
55 }else if( isDeleted ){
56 blob_appendf(report, "DELETED %s\n", zPathname);
@@ -398,10 +400,11 @@
398 if( !db_exists("SELECT 1 FROM user WHERE login=%Q", g.zLogin) ){
399 fossil_fatal("no such user: %s", g.zLogin);
400 }
401
402 db_begin_transaction();
 
403 rc = unsaved_changes();
404 if( rc==0 && !isAMerge && !forceFlag ){
405 fossil_panic("nothing has changed");
406 }
407
408
--- src/checkin.c
+++ src/checkin.c
@@ -46,11 +46,13 @@
46 int isDeleted = db_column_int(&q, 1);
47 int isChnged = db_column_int(&q,2);
48 int isNew = db_column_int(&q,3)==0;
49 char *zFullName = mprintf("%s/%s", g.zLocalRoot, zPathname);
50 blob_append(report, zPrefix, nPrefix);
51 if( isDeleted ){
52 blob_appendf(report, "DELETED %s\n", zPathname);
53 }else if( access(zFullName, 0) ){
54 blob_appendf(report, "MISSING %s\n", zPathname);
55 }else if( isNew ){
56 blob_appendf(report, "ADDED %s\n", zPathname);
57 }else if( isDeleted ){
58 blob_appendf(report, "DELETED %s\n", zPathname);
@@ -398,10 +400,11 @@
400 if( !db_exists("SELECT 1 FROM user WHERE login=%Q", g.zLogin) ){
401 fossil_fatal("no such user: %s", g.zLogin);
402 }
403
404 db_begin_transaction();
405 db_record_repository_filename(0);
406 rc = unsaved_changes();
407 if( rc==0 && !isAMerge && !forceFlag ){
408 fossil_panic("nothing has changed");
409 }
410
411
+23 -1
--- src/db.c
+++ src/db.c
@@ -555,10 +555,11 @@
555555
** it does not already exist.
556556
*/
557557
void db_open_config(void){
558558
char *zDbName;
559559
const char *zHome;
560
+ if( g.configOpen ) return;
560561
#ifdef __MINGW32__
561562
zHome = getenv("LOCALAPPDATA");
562563
if( zHome==0 ){
563564
zHome = getenv("APPDATA");
564565
if( zHome==0 ){
@@ -575,11 +576,10 @@
575576
/* . filenames give some window systems problems and many apps problems */
576577
zDbName = mprintf("%//_fossil", zHome);
577578
#else
578579
zDbName = mprintf("%s/.fossil", zHome);
579580
#endif
580
- if( g.configOpen ) return;
581581
if( file_size(zDbName)<1024*3 ){
582582
db_init_database(zDbName, zConfigSchema, (char*)0);
583583
}
584584
db_open_or_attach(zDbName, "configdb");
585585
g.configOpen = 1;
@@ -1118,10 +1118,31 @@
11181118
return db_int(dflt, "SELECT value FROM vvar WHERE name=%Q", zName);
11191119
}
11201120
void db_lset_int(const char *zName, int value){
11211121
db_multi_exec("REPLACE INTO vvar(name,value) VALUES(%Q,%d)", zName, value);
11221122
}
1123
+
1124
+/*
1125
+** Record the name of a local repository in the global_config() database.
1126
+** The repostiroy filename %s is recorded as an entry with a "name" field
1127
+** of the following form:
1128
+**
1129
+** repo:%s
1130
+**
1131
+** The value field is set to 1.
1132
+*/
1133
+void db_record_repository_filename(const char *zName){
1134
+ if( zName==0 ){
1135
+ if( !g.localOpen ) return;
1136
+ zName = db_lget("repository", 0);
1137
+ }
1138
+ db_multi_exec(
1139
+ "INSERT OR IGNORE INTO global_config(name,value)"
1140
+ "VALUES('repo:%q',1)",
1141
+ zName
1142
+ );
1143
+}
11231144
11241145
/*
11251146
** COMMAND: open
11261147
**
11271148
** Usage: open FILENAME
@@ -1144,10 +1165,11 @@
11441165
file_canonical_name(g.argv[2], &path);
11451166
db_open_repository(blob_str(&path));
11461167
db_init_database("./_FOSSIL_", zLocalSchema, (char*)0);
11471168
db_open_local();
11481169
db_lset("repository", blob_str(&path));
1170
+ db_record_repository_filename(blob_str(&path));
11491171
vid = db_int(0, "SELECT pid FROM plink y"
11501172
" WHERE NOT EXISTS(SELECT 1 FROM plink x WHERE x.cid=y.pid)");
11511173
if( vid==0 ){
11521174
db_lset_int("checkout", 1);
11531175
}else{
11541176
--- src/db.c
+++ src/db.c
@@ -555,10 +555,11 @@
555 ** it does not already exist.
556 */
557 void db_open_config(void){
558 char *zDbName;
559 const char *zHome;
 
560 #ifdef __MINGW32__
561 zHome = getenv("LOCALAPPDATA");
562 if( zHome==0 ){
563 zHome = getenv("APPDATA");
564 if( zHome==0 ){
@@ -575,11 +576,10 @@
575 /* . filenames give some window systems problems and many apps problems */
576 zDbName = mprintf("%//_fossil", zHome);
577 #else
578 zDbName = mprintf("%s/.fossil", zHome);
579 #endif
580 if( g.configOpen ) return;
581 if( file_size(zDbName)<1024*3 ){
582 db_init_database(zDbName, zConfigSchema, (char*)0);
583 }
584 db_open_or_attach(zDbName, "configdb");
585 g.configOpen = 1;
@@ -1118,10 +1118,31 @@
1118 return db_int(dflt, "SELECT value FROM vvar WHERE name=%Q", zName);
1119 }
1120 void db_lset_int(const char *zName, int value){
1121 db_multi_exec("REPLACE INTO vvar(name,value) VALUES(%Q,%d)", zName, value);
1122 }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1123
1124 /*
1125 ** COMMAND: open
1126 **
1127 ** Usage: open FILENAME
@@ -1144,10 +1165,11 @@
1144 file_canonical_name(g.argv[2], &path);
1145 db_open_repository(blob_str(&path));
1146 db_init_database("./_FOSSIL_", zLocalSchema, (char*)0);
1147 db_open_local();
1148 db_lset("repository", blob_str(&path));
 
1149 vid = db_int(0, "SELECT pid FROM plink y"
1150 " WHERE NOT EXISTS(SELECT 1 FROM plink x WHERE x.cid=y.pid)");
1151 if( vid==0 ){
1152 db_lset_int("checkout", 1);
1153 }else{
1154
--- src/db.c
+++ src/db.c
@@ -555,10 +555,11 @@
555 ** it does not already exist.
556 */
557 void db_open_config(void){
558 char *zDbName;
559 const char *zHome;
560 if( g.configOpen ) return;
561 #ifdef __MINGW32__
562 zHome = getenv("LOCALAPPDATA");
563 if( zHome==0 ){
564 zHome = getenv("APPDATA");
565 if( zHome==0 ){
@@ -575,11 +576,10 @@
576 /* . filenames give some window systems problems and many apps problems */
577 zDbName = mprintf("%//_fossil", zHome);
578 #else
579 zDbName = mprintf("%s/.fossil", zHome);
580 #endif
 
581 if( file_size(zDbName)<1024*3 ){
582 db_init_database(zDbName, zConfigSchema, (char*)0);
583 }
584 db_open_or_attach(zDbName, "configdb");
585 g.configOpen = 1;
@@ -1118,10 +1118,31 @@
1118 return db_int(dflt, "SELECT value FROM vvar WHERE name=%Q", zName);
1119 }
1120 void db_lset_int(const char *zName, int value){
1121 db_multi_exec("REPLACE INTO vvar(name,value) VALUES(%Q,%d)", zName, value);
1122 }
1123
1124 /*
1125 ** Record the name of a local repository in the global_config() database.
1126 ** The repostiroy filename %s is recorded as an entry with a "name" field
1127 ** of the following form:
1128 **
1129 ** repo:%s
1130 **
1131 ** The value field is set to 1.
1132 */
1133 void db_record_repository_filename(const char *zName){
1134 if( zName==0 ){
1135 if( !g.localOpen ) return;
1136 zName = db_lget("repository", 0);
1137 }
1138 db_multi_exec(
1139 "INSERT OR IGNORE INTO global_config(name,value)"
1140 "VALUES('repo:%q',1)",
1141 zName
1142 );
1143 }
1144
1145 /*
1146 ** COMMAND: open
1147 **
1148 ** Usage: open FILENAME
@@ -1144,10 +1165,11 @@
1165 file_canonical_name(g.argv[2], &path);
1166 db_open_repository(blob_str(&path));
1167 db_init_database("./_FOSSIL_", zLocalSchema, (char*)0);
1168 db_open_local();
1169 db_lset("repository", blob_str(&path));
1170 db_record_repository_filename(blob_str(&path));
1171 vid = db_int(0, "SELECT pid FROM plink y"
1172 " WHERE NOT EXISTS(SELECT 1 FROM plink x WHERE x.cid=y.pid)");
1173 if( vid==0 ){
1174 db_lset_int("checkout", 1);
1175 }else{
1176
+13 -3
--- src/main.mk
+++ src/main.mk
@@ -13,10 +13,11 @@
1313
1414
1515
SRC = \
1616
$(SRCDIR)/add.c \
1717
$(SRCDIR)/admin.c \
18
+ $(SRCDIR)/allrepo.c \
1819
$(SRCDIR)/bag.c \
1920
$(SRCDIR)/blob.c \
2021
$(SRCDIR)/branch.c \
2122
$(SRCDIR)/browse.c \
2223
$(SRCDIR)/cgi.c \
@@ -79,10 +80,11 @@
7980
$(SRCDIR)/zip.c
8081
8182
TRANS_SRC = \
8283
add_.c \
8384
admin_.c \
85
+ allrepo_.c \
8486
bag_.c \
8587
blob_.c \
8688
branch_.c \
8789
browse_.c \
8890
cgi_.c \
@@ -145,10 +147,11 @@
145147
zip_.c
146148
147149
OBJ = \
148150
add.o \
149151
admin.o \
152
+ allrepo.o \
150153
bag.o \
151154
blob.o \
152155
branch.o \
153156
browse.o \
154157
cgi.o \
@@ -249,16 +252,16 @@
249252
# noop
250253
251254
clean:
252255
rm -f *.o *_.c $(APPNAME) VERSION.h
253256
rm -f translate makeheaders mkindex page_index.h headers
254
- rm -f add.h admin.h bag.h blob.h branch.h browse.h cgi.h checkin.h checkout.h clearsign.h clone.h comformat.h configure.h construct.h content.h db.h delta.h deltacmd.h descendants.h diff.h diffcmd.h doc.h encode.h file.h http.h info.h login.h main.h manifest.h md5.h merge.h merge3.h my_page.h name.h pivot.h pqueue.h printf.h rebuild.h report.h rss.h schema.h setup.h sha1.h shun.h stat.h style.h sync.h tag.h tagview.h th_main.h timeline.h tkt.h tktsetup.h undo.h update.h url.h user.h verify.h vfile.h wiki.h wikiformat.h winhttp.h xfer.h zip.h
257
+ rm -f add.h admin.h allrepo.h bag.h blob.h branch.h browse.h cgi.h checkin.h checkout.h clearsign.h clone.h comformat.h configure.h construct.h content.h db.h delta.h deltacmd.h descendants.h diff.h diffcmd.h doc.h encode.h file.h http.h info.h login.h main.h manifest.h md5.h merge.h merge3.h my_page.h name.h pivot.h pqueue.h printf.h rebuild.h report.h rss.h schema.h setup.h sha1.h shun.h stat.h style.h sync.h tag.h tagview.h th_main.h timeline.h tkt.h tktsetup.h undo.h update.h url.h user.h verify.h vfile.h wiki.h wikiformat.h winhttp.h xfer.h zip.h
255258
256259
page_index.h: $(TRANS_SRC) mkindex
257260
./mkindex $(TRANS_SRC) >$@
258
-headers: page_index.h makeheaders $(TRANS_SRC) VERSION.h
259
- ./makeheaders add_.c:add.h admin_.c:admin.h bag_.c:bag.h blob_.c:blob.h branch_.c:branch.h browse_.c:browse.h cgi_.c:cgi.h checkin_.c:checkin.h checkout_.c:checkout.h clearsign_.c:clearsign.h clone_.c:clone.h comformat_.c:comformat.h configure_.c:configure.h construct_.c:construct.h content_.c:content.h db_.c:db.h delta_.c:delta.h deltacmd_.c:deltacmd.h descendants_.c:descendants.h diff_.c:diff.h diffcmd_.c:diffcmd.h doc_.c:doc.h encode_.c:encode.h file_.c:file.h http_.c:http.h info_.c:info.h login_.c:login.h main_.c:main.h manifest_.c:manifest.h md5_.c:md5.h merge_.c:merge.h merge3_.c:merge3.h my_page_.c:my_page.h name_.c:name.h pivot_.c:pivot.h pqueue_.c:pqueue.h printf_.c:printf.h rebuild_.c:rebuild.h report_.c:report.h rss_.c:rss.h schema_.c:schema.h setup_.c:setup.h sha1_.c:sha1.h shun_.c:shun.h stat_.c:stat.h style_.c:style.h sync_.c:sync.h tag_.c:tag.h tagview_.c:tagview.h th_main_.c:th_main.h timeline_.c:timeline.h tkt_.c:tkt.h tktsetup_.c:tktsetup.h undo_.c:undo.h update_.c:update.h url_.c:url.h user_.c:user.h verify_.c:verify.h vfile_.c:vfile.h wiki_.c:wiki.h wikiformat_.c:wikiformat.h winhttp_.c:winhttp.h xfer_.c:xfer.h zip_.c:zip.h $(SRCDIR)/sqlite3.h $(SRCDIR)/th.h VERSION.h
261
+headers: page_index.h makeheaders VERSION.h
262
+ ./makeheaders add_.c:add.h admin_.c:admin.h allrepo_.c:allrepo.h bag_.c:bag.h blob_.c:blob.h branch_.c:branch.h browse_.c:browse.h cgi_.c:cgi.h checkin_.c:checkin.h checkout_.c:checkout.h clearsign_.c:clearsign.h clone_.c:clone.h comformat_.c:comformat.h configure_.c:configure.h construct_.c:construct.h content_.c:content.h db_.c:db.h delta_.c:delta.h deltacmd_.c:deltacmd.h descendants_.c:descendants.h diff_.c:diff.h diffcmd_.c:diffcmd.h doc_.c:doc.h encode_.c:encode.h file_.c:file.h http_.c:http.h info_.c:info.h login_.c:login.h main_.c:main.h manifest_.c:manifest.h md5_.c:md5.h merge_.c:merge.h merge3_.c:merge3.h my_page_.c:my_page.h name_.c:name.h pivot_.c:pivot.h pqueue_.c:pqueue.h printf_.c:printf.h rebuild_.c:rebuild.h report_.c:report.h rss_.c:rss.h schema_.c:schema.h setup_.c:setup.h sha1_.c:sha1.h shun_.c:shun.h stat_.c:stat.h style_.c:style.h sync_.c:sync.h tag_.c:tag.h tagview_.c:tagview.h th_main_.c:th_main.h timeline_.c:timeline.h tkt_.c:tkt.h tktsetup_.c:tktsetup.h undo_.c:undo.h update_.c:update.h url_.c:url.h user_.c:user.h verify_.c:verify.h vfile_.c:vfile.h wiki_.c:wiki.h wikiformat_.c:wikiformat.h winhttp_.c:winhttp.h xfer_.c:xfer.h zip_.c:zip.h $(SRCDIR)/sqlite3.h $(SRCDIR)/th.h VERSION.h
260263
touch headers
261264
headers: Makefile
262265
Makefile:
263266
add_.c: $(SRCDIR)/add.c $(SRCDIR)/VERSION translate
264267
./translate $(SRCDIR)/add.c | sed -f $(SRCDIR)/VERSION >add_.c
@@ -272,10 +275,17 @@
272275
273276
admin.o: admin_.c admin.h $(SRCDIR)/config.h
274277
$(XTCC) -o admin.o -c admin_.c
275278
276279
admin.h: headers
280
+allrepo_.c: $(SRCDIR)/allrepo.c $(SRCDIR)/VERSION translate
281
+ ./translate $(SRCDIR)/allrepo.c | sed -f $(SRCDIR)/VERSION >allrepo_.c
282
+
283
+allrepo.o: allrepo_.c allrepo.h $(SRCDIR)/config.h
284
+ $(XTCC) -o allrepo.o -c allrepo_.c
285
+
286
+allrepo.h: headers
277287
bag_.c: $(SRCDIR)/bag.c $(SRCDIR)/VERSION translate
278288
./translate $(SRCDIR)/bag.c | sed -f $(SRCDIR)/VERSION >bag_.c
279289
280290
bag.o: bag_.c bag.h $(SRCDIR)/config.h
281291
$(XTCC) -o bag.o -c bag_.c
282292
--- src/main.mk
+++ src/main.mk
@@ -13,10 +13,11 @@
13
14
15 SRC = \
16 $(SRCDIR)/add.c \
17 $(SRCDIR)/admin.c \
 
18 $(SRCDIR)/bag.c \
19 $(SRCDIR)/blob.c \
20 $(SRCDIR)/branch.c \
21 $(SRCDIR)/browse.c \
22 $(SRCDIR)/cgi.c \
@@ -79,10 +80,11 @@
79 $(SRCDIR)/zip.c
80
81 TRANS_SRC = \
82 add_.c \
83 admin_.c \
 
84 bag_.c \
85 blob_.c \
86 branch_.c \
87 browse_.c \
88 cgi_.c \
@@ -145,10 +147,11 @@
145 zip_.c
146
147 OBJ = \
148 add.o \
149 admin.o \
 
150 bag.o \
151 blob.o \
152 branch.o \
153 browse.o \
154 cgi.o \
@@ -249,16 +252,16 @@
249 # noop
250
251 clean:
252 rm -f *.o *_.c $(APPNAME) VERSION.h
253 rm -f translate makeheaders mkindex page_index.h headers
254 rm -f add.h admin.h bag.h blob.h branch.h browse.h cgi.h checkin.h checkout.h clearsign.h clone.h comformat.h configure.h construct.h content.h db.h delta.h deltacmd.h descendants.h diff.h diffcmd.h doc.h encode.h file.h http.h info.h login.h main.h manifest.h md5.h merge.h merge3.h my_page.h name.h pivot.h pqueue.h printf.h rebuild.h report.h rss.h schema.h setup.h sha1.h shun.h stat.h style.h sync.h tag.h tagview.h th_main.h timeline.h tkt.h tktsetup.h undo.h update.h url.h user.h verify.h vfile.h wiki.h wikiformat.h winhttp.h xfer.h zip.h
255
256 page_index.h: $(TRANS_SRC) mkindex
257 ./mkindex $(TRANS_SRC) >$@
258 headers: page_index.h makeheaders $(TRANS_SRC) VERSION.h
259 ./makeheaders add_.c:add.h admin_.c:admin.h bag_.c:bag.h blob_.c:blob.h branch_.c:branch.h browse_.c:browse.h cgi_.c:cgi.h checkin_.c:checkin.h checkout_.c:checkout.h clearsign_.c:clearsign.h clone_.c:clone.h comformat_.c:comformat.h configure_.c:configure.h construct_.c:construct.h content_.c:content.h db_.c:db.h delta_.c:delta.h deltacmd_.c:deltacmd.h descendants_.c:descendants.h diff_.c:diff.h diffcmd_.c:diffcmd.h doc_.c:doc.h encode_.c:encode.h file_.c:file.h http_.c:http.h info_.c:info.h login_.c:login.h main_.c:main.h manifest_.c:manifest.h md5_.c:md5.h merge_.c:merge.h merge3_.c:merge3.h my_page_.c:my_page.h name_.c:name.h pivot_.c:pivot.h pqueue_.c:pqueue.h printf_.c:printf.h rebuild_.c:rebuild.h report_.c:report.h rss_.c:rss.h schema_.c:schema.h setup_.c:setup.h sha1_.c:sha1.h shun_.c:shun.h stat_.c:stat.h style_.c:style.h sync_.c:sync.h tag_.c:tag.h tagview_.c:tagview.h th_main_.c:th_main.h timeline_.c:timeline.h tkt_.c:tkt.h tktsetup_.c:tktsetup.h undo_.c:undo.h update_.c:update.h url_.c:url.h user_.c:user.h verify_.c:verify.h vfile_.c:vfile.h wiki_.c:wiki.h wikiformat_.c:wikiformat.h winhttp_.c:winhttp.h xfer_.c:xfer.h zip_.c:zip.h $(SRCDIR)/sqlite3.h $(SRCDIR)/th.h VERSION.h
260 touch headers
261 headers: Makefile
262 Makefile:
263 add_.c: $(SRCDIR)/add.c $(SRCDIR)/VERSION translate
264 ./translate $(SRCDIR)/add.c | sed -f $(SRCDIR)/VERSION >add_.c
@@ -272,10 +275,17 @@
272
273 admin.o: admin_.c admin.h $(SRCDIR)/config.h
274 $(XTCC) -o admin.o -c admin_.c
275
276 admin.h: headers
 
 
 
 
 
 
 
277 bag_.c: $(SRCDIR)/bag.c $(SRCDIR)/VERSION translate
278 ./translate $(SRCDIR)/bag.c | sed -f $(SRCDIR)/VERSION >bag_.c
279
280 bag.o: bag_.c bag.h $(SRCDIR)/config.h
281 $(XTCC) -o bag.o -c bag_.c
282
--- src/main.mk
+++ src/main.mk
@@ -13,10 +13,11 @@
13
14
15 SRC = \
16 $(SRCDIR)/add.c \
17 $(SRCDIR)/admin.c \
18 $(SRCDIR)/allrepo.c \
19 $(SRCDIR)/bag.c \
20 $(SRCDIR)/blob.c \
21 $(SRCDIR)/branch.c \
22 $(SRCDIR)/browse.c \
23 $(SRCDIR)/cgi.c \
@@ -79,10 +80,11 @@
80 $(SRCDIR)/zip.c
81
82 TRANS_SRC = \
83 add_.c \
84 admin_.c \
85 allrepo_.c \
86 bag_.c \
87 blob_.c \
88 branch_.c \
89 browse_.c \
90 cgi_.c \
@@ -145,10 +147,11 @@
147 zip_.c
148
149 OBJ = \
150 add.o \
151 admin.o \
152 allrepo.o \
153 bag.o \
154 blob.o \
155 branch.o \
156 browse.o \
157 cgi.o \
@@ -249,16 +252,16 @@
252 # noop
253
254 clean:
255 rm -f *.o *_.c $(APPNAME) VERSION.h
256 rm -f translate makeheaders mkindex page_index.h headers
257 rm -f add.h admin.h allrepo.h bag.h blob.h branch.h browse.h cgi.h checkin.h checkout.h clearsign.h clone.h comformat.h configure.h construct.h content.h db.h delta.h deltacmd.h descendants.h diff.h diffcmd.h doc.h encode.h file.h http.h info.h login.h main.h manifest.h md5.h merge.h merge3.h my_page.h name.h pivot.h pqueue.h printf.h rebuild.h report.h rss.h schema.h setup.h sha1.h shun.h stat.h style.h sync.h tag.h tagview.h th_main.h timeline.h tkt.h tktsetup.h undo.h update.h url.h user.h verify.h vfile.h wiki.h wikiformat.h winhttp.h xfer.h zip.h
258
259 page_index.h: $(TRANS_SRC) mkindex
260 ./mkindex $(TRANS_SRC) >$@
261 headers: page_index.h makeheaders VERSION.h
262 ./makeheaders add_.c:add.h admin_.c:admin.h allrepo_.c:allrepo.h bag_.c:bag.h blob_.c:blob.h branch_.c:branch.h browse_.c:browse.h cgi_.c:cgi.h checkin_.c:checkin.h checkout_.c:checkout.h clearsign_.c:clearsign.h clone_.c:clone.h comformat_.c:comformat.h configure_.c:configure.h construct_.c:construct.h content_.c:content.h db_.c:db.h delta_.c:delta.h deltacmd_.c:deltacmd.h descendants_.c:descendants.h diff_.c:diff.h diffcmd_.c:diffcmd.h doc_.c:doc.h encode_.c:encode.h file_.c:file.h http_.c:http.h info_.c:info.h login_.c:login.h main_.c:main.h manifest_.c:manifest.h md5_.c:md5.h merge_.c:merge.h merge3_.c:merge3.h my_page_.c:my_page.h name_.c:name.h pivot_.c:pivot.h pqueue_.c:pqueue.h printf_.c:printf.h rebuild_.c:rebuild.h report_.c:report.h rss_.c:rss.h schema_.c:schema.h setup_.c:setup.h sha1_.c:sha1.h shun_.c:shun.h stat_.c:stat.h style_.c:style.h sync_.c:sync.h tag_.c:tag.h tagview_.c:tagview.h th_main_.c:th_main.h timeline_.c:timeline.h tkt_.c:tkt.h tktsetup_.c:tktsetup.h undo_.c:undo.h update_.c:update.h url_.c:url.h user_.c:user.h verify_.c:verify.h vfile_.c:vfile.h wiki_.c:wiki.h wikiformat_.c:wikiformat.h winhttp_.c:winhttp.h xfer_.c:xfer.h zip_.c:zip.h $(SRCDIR)/sqlite3.h $(SRCDIR)/th.h VERSION.h
263 touch headers
264 headers: Makefile
265 Makefile:
266 add_.c: $(SRCDIR)/add.c $(SRCDIR)/VERSION translate
267 ./translate $(SRCDIR)/add.c | sed -f $(SRCDIR)/VERSION >add_.c
@@ -272,10 +275,17 @@
275
276 admin.o: admin_.c admin.h $(SRCDIR)/config.h
277 $(XTCC) -o admin.o -c admin_.c
278
279 admin.h: headers
280 allrepo_.c: $(SRCDIR)/allrepo.c $(SRCDIR)/VERSION translate
281 ./translate $(SRCDIR)/allrepo.c | sed -f $(SRCDIR)/VERSION >allrepo_.c
282
283 allrepo.o: allrepo_.c allrepo.h $(SRCDIR)/config.h
284 $(XTCC) -o allrepo.o -c allrepo_.c
285
286 allrepo.h: headers
287 bag_.c: $(SRCDIR)/bag.c $(SRCDIR)/VERSION translate
288 ./translate $(SRCDIR)/bag.c | sed -f $(SRCDIR)/VERSION >bag_.c
289
290 bag.o: bag_.c bag.h $(SRCDIR)/config.h
291 $(XTCC) -o bag.o -c bag_.c
292
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -7,10 +7,11 @@
77
# "translate" and "makeheaders"
88
#
99
set src {
1010
add
1111
admin
12
+ allrepo
1213
bag
1314
blob
1415
branch
1516
browse
1617
cgi
1718
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -7,10 +7,11 @@
7 # "translate" and "makeheaders"
8 #
9 set src {
10 add
11 admin
 
12 bag
13 blob
14 branch
15 browse
16 cgi
17
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -7,10 +7,11 @@
7 # "translate" and "makeheaders"
8 #
9 set src {
10 add
11 admin
12 allrepo
13 bag
14 blob
15 branch
16 browse
17 cgi
18
+2
--- src/sync.c
+++ src/sync.c
@@ -72,18 +72,20 @@
7272
** of a server to sync against. If no argument is given, use the
7373
** most recently synced URL. Remember the current URL for next time.
7474
*/
7575
void process_sync_args(void){
7676
const char *zUrl = 0;
77
+ int urlOptional = find_option("autourl",0,0)!=0;
7778
url_proxy_options();
7879
db_find_and_open_repository(1);
7980
if( g.argc==2 ){
8081
zUrl = db_get("last-sync-url", 0);
8182
}else if( g.argc==3 ){
8283
zUrl = g.argv[2];
8384
}
8485
if( zUrl==0 ){
86
+ if( urlOptional ) exit(0);
8587
usage("URL");
8688
}
8789
url_parse(zUrl);
8890
if( g.urlIsFile ){
8991
fossil_fatal("network sync only");
9092
--- src/sync.c
+++ src/sync.c
@@ -72,18 +72,20 @@
72 ** of a server to sync against. If no argument is given, use the
73 ** most recently synced URL. Remember the current URL for next time.
74 */
75 void process_sync_args(void){
76 const char *zUrl = 0;
 
77 url_proxy_options();
78 db_find_and_open_repository(1);
79 if( g.argc==2 ){
80 zUrl = db_get("last-sync-url", 0);
81 }else if( g.argc==3 ){
82 zUrl = g.argv[2];
83 }
84 if( zUrl==0 ){
 
85 usage("URL");
86 }
87 url_parse(zUrl);
88 if( g.urlIsFile ){
89 fossil_fatal("network sync only");
90
--- src/sync.c
+++ src/sync.c
@@ -72,18 +72,20 @@
72 ** of a server to sync against. If no argument is given, use the
73 ** most recently synced URL. Remember the current URL for next time.
74 */
75 void process_sync_args(void){
76 const char *zUrl = 0;
77 int urlOptional = find_option("autourl",0,0)!=0;
78 url_proxy_options();
79 db_find_and_open_repository(1);
80 if( g.argc==2 ){
81 zUrl = db_get("last-sync-url", 0);
82 }else if( g.argc==3 ){
83 zUrl = g.argv[2];
84 }
85 if( zUrl==0 ){
86 if( urlOptional ) exit(0);
87 usage("URL");
88 }
89 url_parse(zUrl);
90 if( g.urlIsFile ){
91 fossil_fatal("network sync only");
92
+3
--- src/xfer.c
+++ src/xfer.c
@@ -818,10 +818,13 @@
818818
819819
assert( pushFlag || pullFlag || cloneFlag || configMask );
820820
assert( !g.urlIsFile ); /* This only works for networking */
821821
822822
db_begin_transaction();
823
+ if( pullFlag || cloneFlag ){
824
+ db_record_repository_filename(0);
825
+ }
823826
db_multi_exec(
824827
"CREATE TEMP TABLE onremote(rid INTEGER PRIMARY KEY);"
825828
);
826829
blobarray_zero(xfer.aToken, count(xfer.aToken));
827830
blob_zero(&send);
828831
--- src/xfer.c
+++ src/xfer.c
@@ -818,10 +818,13 @@
818
819 assert( pushFlag || pullFlag || cloneFlag || configMask );
820 assert( !g.urlIsFile ); /* This only works for networking */
821
822 db_begin_transaction();
 
 
 
823 db_multi_exec(
824 "CREATE TEMP TABLE onremote(rid INTEGER PRIMARY KEY);"
825 );
826 blobarray_zero(xfer.aToken, count(xfer.aToken));
827 blob_zero(&send);
828
--- src/xfer.c
+++ src/xfer.c
@@ -818,10 +818,13 @@
818
819 assert( pushFlag || pullFlag || cloneFlag || configMask );
820 assert( !g.urlIsFile ); /* This only works for networking */
821
822 db_begin_transaction();
823 if( pullFlag || cloneFlag ){
824 db_record_repository_filename(0);
825 }
826 db_multi_exec(
827 "CREATE TEMP TABLE onremote(rid INTEGER PRIMARY KEY);"
828 );
829 blobarray_zero(xfer.aToken, count(xfer.aToken));
830 blob_zero(&send);
831

Keyboard Shortcuts

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