Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Add the --cherrypick option to the trunk. I had intended to put the previous check-in on the truck but mistakenly left the local repository on the ssl branch. Fortunately, I was able to use to new --cherrypick option to pull the changes over into trunk without pulling all ssl changes. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
d2204a00fb6bc71bdd13ffdafc469667 |
User & Date: | drh 2010-01-20 16:25:30 |
Context
2010-01-20
| ||
18:35 | On windows, do not allow the "add" command to add files that differ from existing files only in case. Only works for ASCII. Ticket [36cb6b45fd9d]. check-in: 4b9455bf user: drh tags: trunk | |
16:25 | Add the --cherrypick option to the trunk. I had intended to put the previous check-in on the truck but mistakenly left the local repository on the ssl branch. Fortunately, I was able to use to new --cherrypick option to pull the changes over into trunk without pulling all ssl changes. check-in: d2204a00 user: drh tags: trunk | |
15:48 | Fix the object ID decoding on the /info page. Ticket [a5403e6eee]. check-in: 5eea3db6 user: drh tags: trunk | |
Changes
Changes to src/merge.c.
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
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
...
283
284
285
286
287
288
289
290
291
292
293
|
#include "merge.h" #include <assert.h> /* ** COMMAND: merge ** ** Usage: %fossil merge VERSION ** ** The argument is a version that should be merged into the current ** checkout. ** ** Only file content is merged. The result continues to use the ** file and directory names from the current check-out even if those ** names might have been changed in the branch being merged in. */ void merge_cmd(void){ int vid; /* Current version */ int mid; /* Version we are merging against */ int pid; /* The pivot version - most recent common ancestor */ Stmt q; int detailFlag; detailFlag = find_option("detail",0,0)!=0; if( g.argc!=3 ){ usage("VERSION"); } db_must_be_within_tree(); vid = db_lget_int("checkout", 0); if( vid==0 ){ fossil_panic("nothing is checked out"); } mid = name_to_rid(g.argv[2]); if( mid==0 ){ fossil_panic("not a version: %s", g.argv[2]); } if( mid>1 && !db_exists("SELECT 1 FROM plink WHERE cid=%d", mid) ){ fossil_panic("not a version: %s", g.argv[2]); } pivot_set_primary(mid); pivot_set_secondary(vid); db_prepare(&q, "SELECT merge FROM vmerge WHERE id=0"); while( db_step(&q)==SQLITE_ROW ){ pivot_set_secondary(db_column_int(&q,0)); } db_finalize(&q); pid = pivot_find(); if( pid<=0 ){ fossil_panic("cannot find a common ancestor between the current" "checkout and %s", g.argv[2]); } if( pid>1 && !db_exists("SELECT 1 FROM plink WHERE cid=%d", pid) ){ fossil_panic("not a version: record #%d", mid); } vfile_check_signature(vid, 1); db_begin_transaction(); undo_begin(); load_vfile_from_rid(mid); load_vfile_from_rid(pid); ................................................................................ } db_finalize(&q); /* ** Clean up the mid and pid VFILE entries. Then commit the changes. */ db_multi_exec("DELETE FROM vfile WHERE vid!=%d", vid); db_multi_exec("INSERT OR IGNORE INTO vmerge(id,merge) VALUES(0,%d)", mid); undo_finish(); db_end_transaction(0); } |
|
|
>
>
>
>
>
<
>
|
|
|
>
>
>
>
>
>
|
|
|
|
|
|
|
|
|
|
|
|
>
|
>
|
>
|
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
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
...
295
296
297
298
299
300
301
302
303
304
305
306
307
|
#include "merge.h" #include <assert.h> /* ** COMMAND: merge ** ** Usage: %fossil merge [--cherrypick] VERSION ** ** The argument is a version that should be merged into the current ** checkout. All changes from VERSION back to the nearest common ** ancestor are merged. Except, if the --cherrypick option is used ** only the changes associated with the single check-in VERSION are ** merged. ** ** Only file content is merged. The result continues to use the ** file and directory names from the current check-out even if those ** names might have been changed in the branch being merged in. */ void merge_cmd(void){ int vid; /* Current version */ int mid; /* Version we are merging against */ int pid; /* The pivot version - most recent common ancestor */ int detailFlag; /* True if the --detail option is present */ int pickFlag; /* True if the --cherrypick option is present */ Stmt q; detailFlag = find_option("detail",0,0)!=0; pickFlag = find_option("cherrypick",0,0)!=0; if( g.argc!=3 ){ usage("VERSION"); } db_must_be_within_tree(); vid = db_lget_int("checkout", 0); if( vid==0 ){ fossil_fatal("nothing is checked out"); } mid = name_to_rid(g.argv[2]); if( mid==0 ){ fossil_fatal("not a version: %s", g.argv[2]); } if( mid>1 && !db_exists("SELECT 1 FROM plink WHERE cid=%d", mid) ){ fossil_fatal("not a version: %s", g.argv[2]); } if( pickFlag ){ pid = db_int(0, "SELECT pid FROM plink WHERE cid=%d AND isprim", mid); if( pid<=0 ){ fossil_fatal("cannot find an ancestor for %s", g.argv[2]); } }else{ pivot_set_primary(mid); pivot_set_secondary(vid); db_prepare(&q, "SELECT merge FROM vmerge WHERE id=0"); while( db_step(&q)==SQLITE_ROW ){ pivot_set_secondary(db_column_int(&q,0)); } db_finalize(&q); pid = pivot_find(); if( pid<=0 ){ fossil_fatal("cannot find a common ancestor between the current" "checkout and %s", g.argv[2]); } } if( pid>1 && !db_exists("SELECT 1 FROM plink WHERE cid=%d", pid) ){ fossil_fatal("not a version: record #%d", mid); } vfile_check_signature(vid, 1); db_begin_transaction(); undo_begin(); load_vfile_from_rid(mid); load_vfile_from_rid(pid); ................................................................................ } db_finalize(&q); /* ** Clean up the mid and pid VFILE entries. Then commit the changes. */ db_multi_exec("DELETE FROM vfile WHERE vid!=%d", vid); if( !pickFlag ){ db_multi_exec("INSERT OR IGNORE INTO vmerge(id,merge) VALUES(0,%d)", mid); } undo_finish(); db_end_transaction(0); } |