Fossil

Check-in [a85eb7c6]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix timeline command bug reported by Roy Keene. If the nearest artifact found is a wiki page, it may not have a child, so instead use the time of whatever name_to_uuid finds. For example: fossil timeline after 2015-03-14T13:46:20
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: a85eb7c6dcc616b961a1ccee2bcad37d7e0b1932
User & Date: andybradford 2016-09-13 03:42:55
Original Comment: Fix timeline command bug reported by Roy Keene. If the nearest artifact found is a wiki page, it may not have a child, so instead use time time of whatever name_to_uuid finds. For example: fossil timeline after 2015-03-14T13:46:20
Context
2016-09-13
17:51
Refactor command and webpage name lookup. Move all associated logic out of main.c and into a new file named "dispatch.c". There is now a single const array of objects named "aCommand" that contains all command and webpage names together with their help text. check-in: e6aab1a4 user: drh tags: trunk
04:35
Add '--no-prompt' option to the 'commit' command. Closed-Leaf check-in: 4f3f39c4 user: mistachkin tags: commitNoPrompt
03:42
Fix timeline command bug reported by Roy Keene. If the nearest artifact found is a wiki page, it may not have a child, so instead use the time of whatever name_to_uuid finds. For example: fossil timeline after 2015-03-14T13:46:20 check-in: a85eb7c6 user: andybradford tags: trunk
03:11
Fix typo. check-in: 88e1bef9 user: mistachkin tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/timeline.c.

2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
    if( !g.localOpen ){
      fossil_fatal("must be within a local checkout to use 'current'");
    }
    objid = db_lget_int("checkout",0);
    zDate = mprintf("(SELECT mtime FROM plink WHERE cid=%d)", objid);
  }else if( name_to_uuid(&uuid, 0, "*")==0 ){
    objid = db_int(0, "SELECT rid FROM blob WHERE uuid=%B", &uuid);
    zDate = mprintf("(SELECT mtime FROM plink WHERE cid=%d)", objid);
  }else{
    const char *zShift = "";
    if( mode==3 || mode==4 ){
      fossil_fatal("cannot compute descendants or ancestors of a date");
    }
    if( mode==0 ){
      if( isIsoDate(zOrigin) ) zShift = ",'+1 day'";







|







2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
    if( !g.localOpen ){
      fossil_fatal("must be within a local checkout to use 'current'");
    }
    objid = db_lget_int("checkout",0);
    zDate = mprintf("(SELECT mtime FROM plink WHERE cid=%d)", objid);
  }else if( name_to_uuid(&uuid, 0, "*")==0 ){
    objid = db_int(0, "SELECT rid FROM blob WHERE uuid=%B", &uuid);
    zDate = mprintf("(SELECT mtime FROM event WHERE objid=%d)", objid);
  }else{
    const char *zShift = "";
    if( mode==3 || mode==4 ){
      fossil_fatal("cannot compute descendants or ancestors of a date");
    }
    if( mode==0 ){
      if( isIsoDate(zOrigin) ) zShift = ",'+1 day'";