Fossil SCM

Add some explanatory text to the update command to make it easier for new users to learn fossil.

bcsmith 2010-10-22 01:04 trunk
Commit 858940c68e5793ae9272c93d7db732a2c2f977a7
1 file changed +12 -1
+12 -1
--- src/update.c
+++ src/update.c
@@ -102,13 +102,24 @@
102102
"%s "
103103
" AND event.objid IN leaves"
104104
" ORDER BY event.mtime DESC",
105105
timeline_query_for_tty()
106106
);
107
+ printf(
108
+ "\n"
109
+ "Multiple descendants of the current check-in:"
110
+ "\n\n"
111
+ );
107112
print_timeline(&q, 100);
108113
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
+ );
110121
}
111122
tid = db_int(0, "SELECT rid FROM leaves, event"
112123
" WHERE event.objid=leaves.rid"
113124
" ORDER BY event.mtime DESC");
114125
}
115126
--- 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

Keyboard Shortcuts

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