Fossil SCM

Merge recent trunk changes into the retro-sbsdiff branch.

drh 2012-02-03 15:15 UTC retro-sbsdiff merge
Commit c7cf0cbee612d4cbca5d8e641911de4df819f39f
--- ajax/js/whajaj.js
+++ ajax/js/whajaj.js
@@ -109,10 +109,11 @@
109109
!window.location ||
110110
!window.location.search ) return false;
111111
else str = (''+window.location.search).substring(1);
112112
}
113113
if( ! str ) return false;
114
+ str = (''+str).split(/#/,2)[0]; // remove #... to avoid it being added as part of the last value.
114115
var args = {};
115116
var sp = str.split(/&+/);
116117
var rx = /^([^=]+)(=(.+))?/;
117118
var i, m;
118119
for( i in sp ) {
119120
--- ajax/js/whajaj.js
+++ ajax/js/whajaj.js
@@ -109,10 +109,11 @@
109 !window.location ||
110 !window.location.search ) return false;
111 else str = (''+window.location.search).substring(1);
112 }
113 if( ! str ) return false;
 
114 var args = {};
115 var sp = str.split(/&+/);
116 var rx = /^([^=]+)(=(.+))?/;
117 var i, m;
118 for( i in sp ) {
119
--- ajax/js/whajaj.js
+++ ajax/js/whajaj.js
@@ -109,10 +109,11 @@
109 !window.location ||
110 !window.location.search ) return false;
111 else str = (''+window.location.search).substring(1);
112 }
113 if( ! str ) return false;
114 str = (''+str).split(/#/,2)[0]; // remove #... to avoid it being added as part of the last value.
115 var args = {};
116 var sp = str.split(/&+/);
117 var rx = /^([^=]+)(=(.+))?/;
118 var i, m;
119 for( i in sp ) {
120
+37 -1
--- src/merge.c
+++ src/merge.c
@@ -20,10 +20,43 @@
2020
*/
2121
#include "config.h"
2222
#include "merge.h"
2323
#include <assert.h>
2424
25
+/*
26
+** Print information about a particular check-in.
27
+*/
28
+void print_checkin_description(int rid, int indent, const char *zLabel){
29
+ Stmt q;
30
+ db_prepare(&q,
31
+ "SELECT datetime(mtime,'localtime'),"
32
+ " coalesce(euser,user), coalesce(ecomment,comment),"
33
+ " (SELECT uuid FROM blob WHERE rid=%d),"
34
+ " (SELECT group_concat(substr(tagname,5), ', ') FROM tag, tagxref"
35
+ " WHERE tagname GLOB 'sym-*' AND tag.tagid=tagxref.tagid"
36
+ " AND tagxref.rid=%d AND tagxref.tagtype>0)"
37
+ " FROM event WHERE objid=%d", rid, rid, rid);
38
+ if( db_step(&q)==SQLITE_ROW ){
39
+ const char *zTagList = db_column_text(&q, 4);
40
+ char *zCom;
41
+ if( zTagList && zTagList[0] ){
42
+ zCom = mprintf("%s (%s)", db_column_text(&q, 2), zTagList);
43
+ }else{
44
+ zCom = mprintf("%s", db_column_text(&q,2));
45
+ }
46
+ fossil_print("%-*s [%S] by %s on %s\n%*s",
47
+ indent-1, zLabel,
48
+ db_column_text(&q, 3),
49
+ db_column_text(&q, 1),
50
+ db_column_text(&q, 0),
51
+ indent, "");
52
+ comment_print(zCom, indent, 78);
53
+ fossil_free(zCom);
54
+ }
55
+ db_finalize(&q);
56
+}
57
+
2558
2659
/*
2760
** COMMAND: merge
2861
**
2962
** Usage: %fossil merge ?OPTIONS? VERSION
@@ -116,11 +149,10 @@
116149
fossil_fatal("not a version: %s", zPivot);
117150
}
118151
if( pickFlag ){
119152
fossil_fatal("incompatible options: --cherrypick & --baseline");
120153
}
121
- /* pickFlag = 1; // Using --baseline is really like doing a cherrypick */
122154
}else if( pickFlag || backoutFlag ){
123155
pid = db_int(0, "SELECT pid FROM plink WHERE cid=%d AND isprim", mid);
124156
if( pid<=0 ){
125157
fossil_fatal("cannot find an ancestor for %s", g.argv[2]);
126158
}
@@ -144,10 +176,14 @@
144176
mid = t;
145177
}
146178
if( !is_a_version(pid) ){
147179
fossil_fatal("not a version: record #%d", pid);
148180
}
181
+ if( detailFlag ){
182
+ print_checkin_description(mid, 12, "merge-from:");
183
+ print_checkin_description(pid, 12, "baseline:");
184
+ }
149185
vfile_check_signature(vid, 1, 0);
150186
db_begin_transaction();
151187
if( !nochangeFlag ) undo_begin();
152188
load_vfile_from_rid(mid);
153189
load_vfile_from_rid(pid);
154190
--- src/merge.c
+++ src/merge.c
@@ -20,10 +20,43 @@
20 */
21 #include "config.h"
22 #include "merge.h"
23 #include <assert.h>
24
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25
26 /*
27 ** COMMAND: merge
28 **
29 ** Usage: %fossil merge ?OPTIONS? VERSION
@@ -116,11 +149,10 @@
116 fossil_fatal("not a version: %s", zPivot);
117 }
118 if( pickFlag ){
119 fossil_fatal("incompatible options: --cherrypick & --baseline");
120 }
121 /* pickFlag = 1; // Using --baseline is really like doing a cherrypick */
122 }else if( pickFlag || backoutFlag ){
123 pid = db_int(0, "SELECT pid FROM plink WHERE cid=%d AND isprim", mid);
124 if( pid<=0 ){
125 fossil_fatal("cannot find an ancestor for %s", g.argv[2]);
126 }
@@ -144,10 +176,14 @@
144 mid = t;
145 }
146 if( !is_a_version(pid) ){
147 fossil_fatal("not a version: record #%d", pid);
148 }
 
 
 
 
149 vfile_check_signature(vid, 1, 0);
150 db_begin_transaction();
151 if( !nochangeFlag ) undo_begin();
152 load_vfile_from_rid(mid);
153 load_vfile_from_rid(pid);
154
--- src/merge.c
+++ src/merge.c
@@ -20,10 +20,43 @@
20 */
21 #include "config.h"
22 #include "merge.h"
23 #include <assert.h>
24
25 /*
26 ** Print information about a particular check-in.
27 */
28 void print_checkin_description(int rid, int indent, const char *zLabel){
29 Stmt q;
30 db_prepare(&q,
31 "SELECT datetime(mtime,'localtime'),"
32 " coalesce(euser,user), coalesce(ecomment,comment),"
33 " (SELECT uuid FROM blob WHERE rid=%d),"
34 " (SELECT group_concat(substr(tagname,5), ', ') FROM tag, tagxref"
35 " WHERE tagname GLOB 'sym-*' AND tag.tagid=tagxref.tagid"
36 " AND tagxref.rid=%d AND tagxref.tagtype>0)"
37 " FROM event WHERE objid=%d", rid, rid, rid);
38 if( db_step(&q)==SQLITE_ROW ){
39 const char *zTagList = db_column_text(&q, 4);
40 char *zCom;
41 if( zTagList && zTagList[0] ){
42 zCom = mprintf("%s (%s)", db_column_text(&q, 2), zTagList);
43 }else{
44 zCom = mprintf("%s", db_column_text(&q,2));
45 }
46 fossil_print("%-*s [%S] by %s on %s\n%*s",
47 indent-1, zLabel,
48 db_column_text(&q, 3),
49 db_column_text(&q, 1),
50 db_column_text(&q, 0),
51 indent, "");
52 comment_print(zCom, indent, 78);
53 fossil_free(zCom);
54 }
55 db_finalize(&q);
56 }
57
58
59 /*
60 ** COMMAND: merge
61 **
62 ** Usage: %fossil merge ?OPTIONS? VERSION
@@ -116,11 +149,10 @@
149 fossil_fatal("not a version: %s", zPivot);
150 }
151 if( pickFlag ){
152 fossil_fatal("incompatible options: --cherrypick & --baseline");
153 }
 
154 }else if( pickFlag || backoutFlag ){
155 pid = db_int(0, "SELECT pid FROM plink WHERE cid=%d AND isprim", mid);
156 if( pid<=0 ){
157 fossil_fatal("cannot find an ancestor for %s", g.argv[2]);
158 }
@@ -144,10 +176,14 @@
176 mid = t;
177 }
178 if( !is_a_version(pid) ){
179 fossil_fatal("not a version: record #%d", pid);
180 }
181 if( detailFlag ){
182 print_checkin_description(mid, 12, "merge-from:");
183 print_checkin_description(pid, 12, "baseline:");
184 }
185 vfile_check_signature(vid, 1, 0);
186 db_begin_transaction();
187 if( !nochangeFlag ) undo_begin();
188 load_vfile_from_rid(mid);
189 load_vfile_from_rid(pid);
190
+13 -5
--- src/name.c
+++ src/name.c
@@ -403,16 +403,21 @@
403403
fossil_print("Ambiguous artifact name prefix: %s\n", zName);
404404
}else if( rid==0 ){
405405
fossil_print("Unknown artifact: %s\n", zName);
406406
}else{
407407
Stmt q;
408
- db_prepare(&q, "SELECT uuid, size, datetime(mtime, 'localtime'), ipaddr"
409
- " FROM blob, rcvfrom"
410
- " WHERE rid=%d"
411
- " AND rcvfrom.rcvid=blob.rcvid",
412
- rid);
408
+ db_prepare(&q,
409
+ "SELECT uuid, size, datetime(mtime, 'localtime'), ipaddr,"
410
+ " (SELECT group_concat(substr(tagname,5), ', ') FROM tag, tagxref"
411
+ " WHERE tagname GLOB 'sym-*' AND tag.tagid=tagxref.tagid"
412
+ " AND tagxref.rid=blob.rid AND tagxref.tagtype>0)"
413
+ " FROM blob, rcvfrom"
414
+ " WHERE rid=%d"
415
+ " AND rcvfrom.rcvid=blob.rcvid",
416
+ rid);
413417
if( db_step(&q)==SQLITE_ROW ){
418
+ const char *zTagList = db_column_text(&q, 4);
414419
if( fExtra ){
415420
fossil_print("artifact: %s (%d)\n", db_column_text(&q,0), rid);
416421
fossil_print("size: %d bytes\n", db_column_int(&q,1));
417422
fossil_print("received: %s from %s\n",
418423
db_column_text(&q, 2),
@@ -419,10 +424,13 @@
419424
db_column_text(&q, 3));
420425
}else{
421426
fossil_print("artifact: %s\n", db_column_text(&q,0));
422427
fossil_print("size: %d bytes\n", db_column_int(&q,1));
423428
}
429
+ if( zTagList && zTagList[0] ){
430
+ fossil_print("tags: %s\n", zTagList);
431
+ }
424432
}
425433
db_finalize(&q);
426434
db_prepare(&q,
427435
"SELECT type, datetime(mtime,'localtime'),"
428436
" coalesce(euser,user), coalesce(ecomment,comment)"
429437
--- src/name.c
+++ src/name.c
@@ -403,16 +403,21 @@
403 fossil_print("Ambiguous artifact name prefix: %s\n", zName);
404 }else if( rid==0 ){
405 fossil_print("Unknown artifact: %s\n", zName);
406 }else{
407 Stmt q;
408 db_prepare(&q, "SELECT uuid, size, datetime(mtime, 'localtime'), ipaddr"
409 " FROM blob, rcvfrom"
410 " WHERE rid=%d"
411 " AND rcvfrom.rcvid=blob.rcvid",
412 rid);
 
 
 
 
413 if( db_step(&q)==SQLITE_ROW ){
 
414 if( fExtra ){
415 fossil_print("artifact: %s (%d)\n", db_column_text(&q,0), rid);
416 fossil_print("size: %d bytes\n", db_column_int(&q,1));
417 fossil_print("received: %s from %s\n",
418 db_column_text(&q, 2),
@@ -419,10 +424,13 @@
419 db_column_text(&q, 3));
420 }else{
421 fossil_print("artifact: %s\n", db_column_text(&q,0));
422 fossil_print("size: %d bytes\n", db_column_int(&q,1));
423 }
 
 
 
424 }
425 db_finalize(&q);
426 db_prepare(&q,
427 "SELECT type, datetime(mtime,'localtime'),"
428 " coalesce(euser,user), coalesce(ecomment,comment)"
429
--- src/name.c
+++ src/name.c
@@ -403,16 +403,21 @@
403 fossil_print("Ambiguous artifact name prefix: %s\n", zName);
404 }else if( rid==0 ){
405 fossil_print("Unknown artifact: %s\n", zName);
406 }else{
407 Stmt q;
408 db_prepare(&q,
409 "SELECT uuid, size, datetime(mtime, 'localtime'), ipaddr,"
410 " (SELECT group_concat(substr(tagname,5), ', ') FROM tag, tagxref"
411 " WHERE tagname GLOB 'sym-*' AND tag.tagid=tagxref.tagid"
412 " AND tagxref.rid=blob.rid AND tagxref.tagtype>0)"
413 " FROM blob, rcvfrom"
414 " WHERE rid=%d"
415 " AND rcvfrom.rcvid=blob.rcvid",
416 rid);
417 if( db_step(&q)==SQLITE_ROW ){
418 const char *zTagList = db_column_text(&q, 4);
419 if( fExtra ){
420 fossil_print("artifact: %s (%d)\n", db_column_text(&q,0), rid);
421 fossil_print("size: %d bytes\n", db_column_int(&q,1));
422 fossil_print("received: %s from %s\n",
423 db_column_text(&q, 2),
@@ -419,10 +424,13 @@
424 db_column_text(&q, 3));
425 }else{
426 fossil_print("artifact: %s\n", db_column_text(&q,0));
427 fossil_print("size: %d bytes\n", db_column_int(&q,1));
428 }
429 if( zTagList && zTagList[0] ){
430 fossil_print("tags: %s\n", zTagList);
431 }
432 }
433 db_finalize(&q);
434 db_prepare(&q,
435 "SELECT type, datetime(mtime,'localtime'),"
436 " coalesce(euser,user), coalesce(ecomment,comment)"
437
+1 -1
--- src/tar.c
+++ src/tar.c
@@ -525,11 +525,11 @@
525525
}
526526
527527
/*
528528
** COMMAND: tarball*
529529
**
530
-** Usage: %fossil tarball VERSION OUTPUTFILE [--name DIRECTORYNAME]
530
+** Usage: %fossil tarball VERSION OUTPUTFILE [--name DIRECTORYNAME] [-R|--repository REPO]
531531
**
532532
** Generate a compressed tarball for a specified version. If the --name
533533
** option is used, its argument becomes the name of the top-level directory
534534
** in the resulting tarball. If --name is omitted, the top-level directory
535535
** named is derived from the project name, the check-in date and time, and
536536
--- src/tar.c
+++ src/tar.c
@@ -525,11 +525,11 @@
525 }
526
527 /*
528 ** COMMAND: tarball*
529 **
530 ** Usage: %fossil tarball VERSION OUTPUTFILE [--name DIRECTORYNAME]
531 **
532 ** Generate a compressed tarball for a specified version. If the --name
533 ** option is used, its argument becomes the name of the top-level directory
534 ** in the resulting tarball. If --name is omitted, the top-level directory
535 ** named is derived from the project name, the check-in date and time, and
536
--- src/tar.c
+++ src/tar.c
@@ -525,11 +525,11 @@
525 }
526
527 /*
528 ** COMMAND: tarball*
529 **
530 ** Usage: %fossil tarball VERSION OUTPUTFILE [--name DIRECTORYNAME] [-R|--repository REPO]
531 **
532 ** Generate a compressed tarball for a specified version. If the --name
533 ** option is used, its argument becomes the name of the top-level directory
534 ** in the resulting tarball. If --name is omitted, the top-level directory
535 ** named is derived from the project name, the check-in date and time, and
536
+1 -1
--- src/zip.c
+++ src/zip.c
@@ -379,11 +379,11 @@
379379
}
380380
381381
/*
382382
** COMMAND: zip*
383383
**
384
-** Usage: %fossil zip VERSION OUTPUTFILE [--name DIRECTORYNAME]
384
+** Usage: %fossil zip VERSION OUTPUTFILE [--name DIRECTORYNAME] [-R|--repository REPO]
385385
**
386386
** Generate a ZIP archive for a specified version. If the --name option is
387387
** used, it argument becomes the name of the top-level directory in the
388388
** resulting ZIP archive. If --name is omitted, the top-level directory
389389
** named is derived from the project name, the check-in date and time, and
390390
--- src/zip.c
+++ src/zip.c
@@ -379,11 +379,11 @@
379 }
380
381 /*
382 ** COMMAND: zip*
383 **
384 ** Usage: %fossil zip VERSION OUTPUTFILE [--name DIRECTORYNAME]
385 **
386 ** Generate a ZIP archive for a specified version. If the --name option is
387 ** used, it argument becomes the name of the top-level directory in the
388 ** resulting ZIP archive. If --name is omitted, the top-level directory
389 ** named is derived from the project name, the check-in date and time, and
390
--- src/zip.c
+++ src/zip.c
@@ -379,11 +379,11 @@
379 }
380
381 /*
382 ** COMMAND: zip*
383 **
384 ** Usage: %fossil zip VERSION OUTPUTFILE [--name DIRECTORYNAME] [-R|--repository REPO]
385 **
386 ** Generate a ZIP archive for a specified version. If the --name option is
387 ** used, it argument becomes the name of the top-level directory in the
388 ** resulting ZIP archive. If --name is omitted, the top-level directory
389 ** named is derived from the project name, the check-in date and time, and
390

Keyboard Shortcuts

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