Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Changes In Branch nick.lloyd-git-interop Excluding Merge-Ins
This is equivalent to a diff from 3ca2bc105a to b2e0fda9e1
|
2016-10-26
| ||
| 21:28 | Fixes for incremental Git import/export. check-in: 27c8985cc1 user: mistachkin tags: trunk | |
|
2016-10-23
| ||
| 02:16 | Fixes for incremental Git import/export. check-in: 9599705c69 user: mistachkin tags: experimental | |
|
2016-10-08
| ||
| 14:06 | Fix a regression introduced in [69668f8c57] that broke export of tags. Closed-Leaf check-in: b2e0fda9e1 user: nick.lloyd tags: nick.lloyd-git-interop | |
| 13:42 | Add missing arguments to Git->Fossil import example. check-in: 880e3fb51f user: nick.lloyd tags: nick.lloyd-git-interop | |
|
2016-09-23
| ||
| 13:53 | Add the help_to_html() routine which transforms plaintext help into HTML for display on web pages. So far it only surrounds the text with <pre>..</pre>. But it can (in theory) be enhanced to do more sophisticated formatting. check-in: 7a69e5db64 user: drh tags: trunk | |
| 07:33 | merge trunk. Update references to OpenSSL 1.1.0a check-in: 85f8133ce7 user: jan.nijtmans tags: openssl-1.1 | |
| 02:40 | Merge updates from trunk. check-in: 98f4ee8f71 user: mistachkin tags: nick.lloyd-git-interop | |
| 02:28 | Merge updates from trunk. check-in: 4f619c020a user: mistachkin tags: seeEnhanced | |
| 02:27 | Merge updates from trunk. check-in: 0934366187 user: mistachkin tags: jan-manifest-tags | |
| 02:10 | Clarify the exact type used for cmdFlags. check-in: 3ca2bc105a user: mistachkin tags: trunk | |
| 02:06 | Missed a couple places with the old OpenSSL version reference. check-in: a29e05d1ef user: mistachkin tags: trunk | |
Changes to src/export.c.
| ︙ | |||
130 131 132 133 134 135 136 137 138 139 140 | 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 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 | + + + + - + - + - + + + + + - - - + + + - + - + - + + - + - + + - + + + + + + + + - + - + - + + + + - + - + - - - + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - + + - - - - - - - - + - - | ); } /* ** create_mark() ** Create a new (mark,rid,uuid) entry for the given rid in the 'xmark' table, ** and return that information as a struct mark_t in *mark. ** *unused_mark is a value representing a mark that is free for use--that is, ** it does not appear in the marks file, and has not been used during this ** export run. Specifically, it is the supremum of the set of used marks ** plus one. ** This function returns -1 in the case where 'rid' does not exist, otherwise ** it returns 0. ** mark->name is dynamically allocated and is owned by the caller upon return. */ |
| ︙ | |||
334 335 336 337 338 339 340 341 342 343 344 345 346 347 | 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 | + |
**
** See also: import
*/
void export_cmd(void){
Stmt q, q2, q3;
int i;
Bag blobs, vers;
unsigned int unused_mark = 1;
const char *markfile_in;
const char *markfile_out;
bag_init(&blobs);
bag_init(&vers);
find_option("git", 0, 0); /* Ignore the --git option for now */
|
| ︙ | |||
360 361 362 363 364 365 366 | 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 | - + - + - + |
FILE *f;
int rid;
f = fossil_fopen(markfile_in, "r");
if( f==0 ){
fossil_fatal("cannot open %s for reading", markfile_in);
}
|
| ︙ | |||
414 415 416 417 418 419 420 421 422 423 424 | 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 | + + - + + |
db_prepare(&q2, "INSERT INTO oldblob VALUES (:rid)");
db_prepare(&q3, "SELECT rid FROM newblob WHERE srcid= (:srcid)");
while( db_step(&q)==SQLITE_ROW ){
int rid = db_column_int(&q, 0);
Blob content;
while( !bag_find(&blobs, rid) ){
char *zMark;
content_get(rid, &content);
db_bind_int(&q2, ":rid", rid);
db_step(&q2);
db_reset(&q2);
zMark = mark_name_from_rid(rid, &unused_mark);
|
| ︙ | |||
468 469 470 471 472 473 474 | 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 | - + - + - + - + - + + - + + |
db_step(&q2);
db_reset(&q2);
if( zBranch==0 ) zBranch = "trunk";
zBr = mprintf("%s", zBranch);
for(i=0; zBr[i]; i++){
if( !fossil_isalnum(zBr[i]) ) zBr[i] = '_';
}
|
| ︙ | |||
545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 | 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 | + - + + - + |
" FROM tagxref JOIN tag USING(tagid)"
" WHERE tagtype=1 AND tagname GLOB 'sym-*'"
);
while( db_step(&q)==SQLITE_ROW ){
const char *zTagname = db_column_text(&q, 0);
char *zEncoded = 0;
int rid = db_column_int(&q, 1);
char *zMark = mark_name_from_rid(rid, &unused_mark);
const char *zSecSince1970 = db_column_text(&q, 2);
int i;
if( rid==0 || !bag_find(&vers, rid) ) continue;
zTagname += 4;
zEncoded = mprintf("%s", zTagname);
for(i=0; zEncoded[i]; i++){
if( !fossil_isalnum(zEncoded[i]) ) zEncoded[i] = '_';
}
printf("tag %s\n", zEncoded);
|
Changes to src/import.c.
| ︙ | |||
1768 1769 1770 1771 1772 1773 1774 | 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 | - + |
);
if( markfile_in ){
FILE *f = fossil_fopen(markfile_in, "r");
if( !f ){
fossil_fatal("cannot open %s for reading\n", markfile_in);
}
|
| ︙ | |||
1793 1794 1795 1796 1797 1798 1799 | 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 | - - + + - + |
Stmt q_marks;
FILE *f;
db_prepare(&q_marks, "SELECT DISTINCT trid FROM xmark");
while( db_step(&q_marks)==SQLITE_ROW ){
rid = db_column_int(&q_marks, 0);
if( db_int(0, "SELECT count(objid) FROM event"
" WHERE objid=%d AND type='ci'", rid)==0 ){
|
| ︙ |
Changes to www/inout.wiki.
| ︙ | |||
47 48 49 50 51 52 53 | 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 | + + + + + - + + + + - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | As with the "import" command, the --git option is not required since the git-fast-export file format is currently the only VCS interchange format that Fossil will generate. However, future versions of Fossil might add the ability to generate other VCS interchange formats, and so for compatibility, the use of the --git option recommended. <h2>Bidirectional Synchronization</h2> Fossil also has the ability to synchronize with a Git repository via repeated imports and/or exports. To do this, it uses marks files to store a record of artifacts which are known by both Git and Fossil to exist at a given point in time. |