Fossil SCM

The undocumented feature of resolving RID-looking strings as RIDs has been changed to rid:### instead to avoid surprise, per ML discussion.

stephan 2013-08-21 14:24 trunk
Commit 4c80aa2ae106a5b364e43dc1ba27cf94681d8172
1 file changed +13 -10
+13 -10
--- src/name.c
+++ src/name.c
@@ -248,20 +248,23 @@
248248
zTag, zType
249249
);
250250
if( rid>0 ) return rid;
251251
252252
/* Undocumented: numeric tags get translated directly into the RID */
253
- for(i=0; fossil_isdigit(zTag[i]); i++){}
254
- if( zTag[i]==0 ){
255
- if( strcmp(zType,"*")==0 ){
256
- rid = atoi(zTag);
257
- }else{
258
- rid = db_int(0,
259
- "SELECT event.objid"
260
- " FROM event"
261
- " WHERE event.objid=%s"
262
- " AND event.type GLOB '%q'", zTag, zType);
253
+ if( memcmp(zTag, "rid:", 4)==0 ){
254
+ zTag += 4;
255
+ for(i=0; fossil_isdigit(zTag[i]); i++){}
256
+ if( zTag[i]==0 ){
257
+ if( strcmp(zType,"*")==0 ){
258
+ rid = atoi(zTag);
259
+ }else{
260
+ rid = db_int(0,
261
+ "SELECT event.objid"
262
+ " FROM event"
263
+ " WHERE event.objid=%s"
264
+ " AND event.type GLOB '%q'", zTag, zType);
265
+ }
263266
}
264267
}
265268
return rid;
266269
}
267270
268271
--- src/name.c
+++ src/name.c
@@ -248,20 +248,23 @@
248 zTag, zType
249 );
250 if( rid>0 ) return rid;
251
252 /* Undocumented: numeric tags get translated directly into the RID */
253 for(i=0; fossil_isdigit(zTag[i]); i++){}
254 if( zTag[i]==0 ){
255 if( strcmp(zType,"*")==0 ){
256 rid = atoi(zTag);
257 }else{
258 rid = db_int(0,
259 "SELECT event.objid"
260 " FROM event"
261 " WHERE event.objid=%s"
262 " AND event.type GLOB '%q'", zTag, zType);
 
 
 
263 }
264 }
265 return rid;
266 }
267
268
--- src/name.c
+++ src/name.c
@@ -248,20 +248,23 @@
248 zTag, zType
249 );
250 if( rid>0 ) return rid;
251
252 /* Undocumented: numeric tags get translated directly into the RID */
253 if( memcmp(zTag, "rid:", 4)==0 ){
254 zTag += 4;
255 for(i=0; fossil_isdigit(zTag[i]); i++){}
256 if( zTag[i]==0 ){
257 if( strcmp(zType,"*")==0 ){
258 rid = atoi(zTag);
259 }else{
260 rid = db_int(0,
261 "SELECT event.objid"
262 " FROM event"
263 " WHERE event.objid=%s"
264 " AND event.type GLOB '%q'", zTag, zType);
265 }
266 }
267 }
268 return rid;
269 }
270
271

Keyboard Shortcuts

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