Overview
SHA1 Hash: | 7847b418bb514bd8f63784aeddcb1647693ef045 |
---|---|
Date: | 2009-08-14 14:00:10 |
User: | drh |
Comment: | Improvements to the way the update target is computed when saying "fossil update" without specifying what to update to. Avoid the "bad object id: 0" error. |
Timelines: | ancestors | descendants | both | trunk |
Other Links: | files | ZIP archive | manifest |
Tags And Properties
- branch=trunk inherited from [a28c83647d]
- sym-trunk inherited from [a28c83647d]
Changes
[hide diffs]Modified src/descendants.c from [fabaf35b08] to [b32d794817].
@@ -79,12 +79,25 @@ /* Initialize the bags. */ bag_init(&seen); bag_init(&pending); bag_insert(&pending, iBase); - /* This query returns all non-merge children of check-in :rid */ - db_prepare(&q1, "SELECT cid FROM plink WHERE pid=:rid AND isprim"); + /* This query returns all non-branch-merge children of check-in :rid. + ** + ** If a a child is a merge of a fork within the same branch, it is + ** returned. Only merge children in different branches are excluded. + */ + db_prepare(&q1, + "SELECT cid FROM plink" + " WHERE pid=:rid" + " AND (isprim" + " OR coalesce((SELECT value FROM tagxref" + " WHERE tagid=%d AND rid=plink.pid), 'trunk')" + "=coalesce((SELECT value FROM tagxref" + " WHERE tagid=%d AND rid=plink.cid), 'trunk'))", + TAG_BRANCH, TAG_BRANCH + ); /* This query returns a single row if check-in :rid is the first ** check-in of a new branch. */ db_prepare(&isBr,