Fossil SCM
Add some explanatory text to the update command to make it easier for new users to learn fossil.
Commit
858940c68e5793ae9272c93d7db732a2c2f977a7
Parent
7954ccba68bd84f…
1 file changed
+12
-1
+12
-1
| --- src/update.c | ||
| +++ src/update.c | ||
| @@ -102,13 +102,24 @@ | ||
| 102 | 102 | "%s " |
| 103 | 103 | " AND event.objid IN leaves" |
| 104 | 104 | " ORDER BY event.mtime DESC", |
| 105 | 105 | timeline_query_for_tty() |
| 106 | 106 | ); |
| 107 | + printf( | |
| 108 | + "\n" | |
| 109 | + "Multiple descendants of the current check-in:" | |
| 110 | + "\n\n" | |
| 111 | + ); | |
| 107 | 112 | print_timeline(&q, 100); |
| 108 | 113 | db_finalize(&q); |
| 109 | - fossil_fatal("Multiple descendants"); | |
| 114 | + printf("\n"); | |
| 115 | + fossil_fatal( | |
| 116 | + "You must select one branch or leaf.\n" | |
| 117 | + "Select a branch or leaf with 'update VERSION', where 'VERSION' is a UUID\n" | |
| 118 | + "or branch name. Alternatively, you may use 'latest' to refer to the most\n" | |
| 119 | + "recent check-in." | |
| 120 | + ); | |
| 110 | 121 | } |
| 111 | 122 | tid = db_int(0, "SELECT rid FROM leaves, event" |
| 112 | 123 | " WHERE event.objid=leaves.rid" |
| 113 | 124 | " ORDER BY event.mtime DESC"); |
| 114 | 125 | } |
| 115 | 126 |
| --- src/update.c | |
| +++ src/update.c | |
| @@ -102,13 +102,24 @@ | |
| 102 | "%s " |
| 103 | " AND event.objid IN leaves" |
| 104 | " ORDER BY event.mtime DESC", |
| 105 | timeline_query_for_tty() |
| 106 | ); |
| 107 | print_timeline(&q, 100); |
| 108 | db_finalize(&q); |
| 109 | fossil_fatal("Multiple descendants"); |
| 110 | } |
| 111 | tid = db_int(0, "SELECT rid FROM leaves, event" |
| 112 | " WHERE event.objid=leaves.rid" |
| 113 | " ORDER BY event.mtime DESC"); |
| 114 | } |
| 115 |
| --- src/update.c | |
| +++ src/update.c | |
| @@ -102,13 +102,24 @@ | |
| 102 | "%s " |
| 103 | " AND event.objid IN leaves" |
| 104 | " ORDER BY event.mtime DESC", |
| 105 | timeline_query_for_tty() |
| 106 | ); |
| 107 | printf( |
| 108 | "\n" |
| 109 | "Multiple descendants of the current check-in:" |
| 110 | "\n\n" |
| 111 | ); |
| 112 | print_timeline(&q, 100); |
| 113 | db_finalize(&q); |
| 114 | printf("\n"); |
| 115 | fossil_fatal( |
| 116 | "You must select one branch or leaf.\n" |
| 117 | "Select a branch or leaf with 'update VERSION', where 'VERSION' is a UUID\n" |
| 118 | "or branch name. Alternatively, you may use 'latest' to refer to the most\n" |
| 119 | "recent check-in." |
| 120 | ); |
| 121 | } |
| 122 | tid = db_int(0, "SELECT rid FROM leaves, event" |
| 123 | " WHERE event.objid=leaves.rid" |
| 124 | " ORDER BY event.mtime DESC"); |
| 125 | } |
| 126 |