Fossil SCM

Add the new special name start:BRANCH to refer to the first check-in of the branch

danield 2022-04-20 15:03 trunk
Commit c92fb60ba9e1829a07d428d2076656aa64bafd953fc3a5d18df629622bcf2ab1
1 file changed +9 -1
+9 -1
--- src/name.c
+++ src/name.c
@@ -261,10 +261,11 @@
261261
** * "next"
262262
**
263263
** The following modifier prefixes may be applied to the above forms:
264264
**
265265
** * "root:BR" = The origin of the branch named BR.
266
+** * "start:BR" = The first check-in of the branch named BR.
266267
** * "merge-in:BR" = The most recent merge-in for the branch named BR.
267268
**
268269
** In those forms, BR may be any symbolic form but is assumed to be a
269270
** checkin. Thus root:2021-02-01 would resolve to a checkin, possibly
270271
** in a branch and possibly in the trunk, but never a wiki edit or
@@ -378,11 +379,18 @@
378379
/* root:BR -> The origin of the branch named BR */
379380
if( strncmp(zTag, "root:", 5)==0 ){
380381
rid = symbolic_name_to_rid(zTag+5, zType);
381382
return start_of_branch(rid, 0);
382383
}
383
- /* merge-in:BR -> Most recent merge-in for the branch name BR */
384
+
385
+ /* start:BR -> The first check-in on branch named BR */
386
+ if( strncmp(zTag, "start:", 6)==0 ){
387
+ rid = symbolic_name_to_rid(zTag+6, zType);
388
+ return start_of_branch(rid, 1);
389
+ }
390
+
391
+ /* merge-in:BR -> Most recent merge-in for the branch named BR */
384392
if( strncmp(zTag, "merge-in:", 9)==0 ){
385393
rid = symbolic_name_to_rid(zTag+9, zType);
386394
return start_of_branch(rid, 2);
387395
}
388396
389397
--- src/name.c
+++ src/name.c
@@ -261,10 +261,11 @@
261 ** * "next"
262 **
263 ** The following modifier prefixes may be applied to the above forms:
264 **
265 ** * "root:BR" = The origin of the branch named BR.
 
266 ** * "merge-in:BR" = The most recent merge-in for the branch named BR.
267 **
268 ** In those forms, BR may be any symbolic form but is assumed to be a
269 ** checkin. Thus root:2021-02-01 would resolve to a checkin, possibly
270 ** in a branch and possibly in the trunk, but never a wiki edit or
@@ -378,11 +379,18 @@
378 /* root:BR -> The origin of the branch named BR */
379 if( strncmp(zTag, "root:", 5)==0 ){
380 rid = symbolic_name_to_rid(zTag+5, zType);
381 return start_of_branch(rid, 0);
382 }
383 /* merge-in:BR -> Most recent merge-in for the branch name BR */
 
 
 
 
 
 
 
384 if( strncmp(zTag, "merge-in:", 9)==0 ){
385 rid = symbolic_name_to_rid(zTag+9, zType);
386 return start_of_branch(rid, 2);
387 }
388
389
--- src/name.c
+++ src/name.c
@@ -261,10 +261,11 @@
261 ** * "next"
262 **
263 ** The following modifier prefixes may be applied to the above forms:
264 **
265 ** * "root:BR" = The origin of the branch named BR.
266 ** * "start:BR" = The first check-in of the branch named BR.
267 ** * "merge-in:BR" = The most recent merge-in for the branch named BR.
268 **
269 ** In those forms, BR may be any symbolic form but is assumed to be a
270 ** checkin. Thus root:2021-02-01 would resolve to a checkin, possibly
271 ** in a branch and possibly in the trunk, but never a wiki edit or
@@ -378,11 +379,18 @@
379 /* root:BR -> The origin of the branch named BR */
380 if( strncmp(zTag, "root:", 5)==0 ){
381 rid = symbolic_name_to_rid(zTag+5, zType);
382 return start_of_branch(rid, 0);
383 }
384
385 /* start:BR -> The first check-in on branch named BR */
386 if( strncmp(zTag, "start:", 6)==0 ){
387 rid = symbolic_name_to_rid(zTag+6, zType);
388 return start_of_branch(rid, 1);
389 }
390
391 /* merge-in:BR -> Most recent merge-in for the branch named BR */
392 if( strncmp(zTag, "merge-in:", 9)==0 ){
393 rid = symbolic_name_to_rid(zTag+9, zType);
394 return start_of_branch(rid, 2);
395 }
396
397

Keyboard Shortcuts

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