Fossil SCM

Internal API additions in symbolic_name_to_rid().

stephan 2021-02-15 15:50 trunk
Commit 20391d1e58b6b7c8d2aa23ec27a9f090d4a0086e8e31bcafe811e855757aa55d
1 file changed +11 -1
+11 -1
--- src/name.c
+++ src/name.c
@@ -242,10 +242,20 @@
242242
** The following additional forms are available in local checkouts:
243243
**
244244
** * "current"
245245
** * "prev" or "previous"
246246
** * "next"
247
+**
248
+** The following modifier prefixes may be applied to the above forms:
249
+**
250
+** * "root:BR" = The origin of the branch named BR.
251
+** * "merge-in:BR" = The most recent merge-in for the branch named BR.
252
+**
253
+** In those forms, BR may be any symbolic form but is assumed to be a
254
+** checkin. Thus root:2021-02-01 would resolve to a checkin, possibly
255
+** in a branch and possibly in the trunk, but never a wiki edit or
256
+** forum post.
247257
**
248258
** Return the RID of the matching artifact. Or return 0 if the name does not
249259
** match any known object. Or return -1 if the name is ambiguous.
250260
**
251261
** The zType parameter specifies the type of artifact: ci, t, w, e, g, f.
@@ -353,11 +363,11 @@
353363
/* root:BR -> The origin of the branch named BR */
354364
if( strncmp(zTag, "root:", 5)==0 ){
355365
rid = symbolic_name_to_rid(zTag+5, zType);
356366
return start_of_branch(rid, 0);
357367
}
358
- /* rootx:BR -> Most recent merge-in for the branch name BR */
368
+ /* merge-in:BR -> Most recent merge-in for the branch name BR */
359369
if( strncmp(zTag, "merge-in:", 9)==0 ){
360370
rid = symbolic_name_to_rid(zTag+9, zType);
361371
return start_of_branch(rid, 2);
362372
}
363373
364374
--- src/name.c
+++ src/name.c
@@ -242,10 +242,20 @@
242 ** The following additional forms are available in local checkouts:
243 **
244 ** * "current"
245 ** * "prev" or "previous"
246 ** * "next"
 
 
 
 
 
 
 
 
 
 
247 **
248 ** Return the RID of the matching artifact. Or return 0 if the name does not
249 ** match any known object. Or return -1 if the name is ambiguous.
250 **
251 ** The zType parameter specifies the type of artifact: ci, t, w, e, g, f.
@@ -353,11 +363,11 @@
353 /* root:BR -> The origin of the branch named BR */
354 if( strncmp(zTag, "root:", 5)==0 ){
355 rid = symbolic_name_to_rid(zTag+5, zType);
356 return start_of_branch(rid, 0);
357 }
358 /* rootx:BR -> Most recent merge-in for the branch name BR */
359 if( strncmp(zTag, "merge-in:", 9)==0 ){
360 rid = symbolic_name_to_rid(zTag+9, zType);
361 return start_of_branch(rid, 2);
362 }
363
364
--- src/name.c
+++ src/name.c
@@ -242,10 +242,20 @@
242 ** The following additional forms are available in local checkouts:
243 **
244 ** * "current"
245 ** * "prev" or "previous"
246 ** * "next"
247 **
248 ** The following modifier prefixes may be applied to the above forms:
249 **
250 ** * "root:BR" = The origin of the branch named BR.
251 ** * "merge-in:BR" = The most recent merge-in for the branch named BR.
252 **
253 ** In those forms, BR may be any symbolic form but is assumed to be a
254 ** checkin. Thus root:2021-02-01 would resolve to a checkin, possibly
255 ** in a branch and possibly in the trunk, but never a wiki edit or
256 ** forum post.
257 **
258 ** Return the RID of the matching artifact. Or return 0 if the name does not
259 ** match any known object. Or return -1 if the name is ambiguous.
260 **
261 ** The zType parameter specifies the type of artifact: ci, t, w, e, g, f.
@@ -353,11 +363,11 @@
363 /* root:BR -> The origin of the branch named BR */
364 if( strncmp(zTag, "root:", 5)==0 ){
365 rid = symbolic_name_to_rid(zTag+5, zType);
366 return start_of_branch(rid, 0);
367 }
368 /* merge-in:BR -> Most recent merge-in for the branch name BR */
369 if( strncmp(zTag, "merge-in:", 9)==0 ){
370 rid = symbolic_name_to_rid(zTag+9, zType);
371 return start_of_branch(rid, 2);
372 }
373
374

Keyboard Shortcuts

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