Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | "ls" alias to "list" subcommand of "fossil branch" command. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
302213ed1244867b3a3e64bc93c31ffb |
| User & Date: | bharder 2011-03-16 04:12:51.782 |
Context
|
2011-03-16
| ||
| 11:19 | Only record the first 16 bits of the IP address as part of the login cookie. This allows users with shifting IP addresses to stay logged in. Hopefully, this will address ticket [305143bd876f6]. ... (check-in: 84e755e213 user: drh tags: trunk, release) | |
| 04:12 | "ls" alias to "list" subcommand of "fossil branch" command. ... (check-in: 302213ed12 user: bharder tags: trunk) | |
| 02:38 | Make sure the accesslog table exists before attempting to use it. Ticket [7b55fd2958d8d] ... (check-in: c7de5f7b6e user: drh tags: trunk) | |
Changes
Changes to src/branch.c.
| ︙ | ︙ | |||
180 181 182 183 184 185 186 | ** of the repository identified by the -R or --repository option. ** ** %fossil branch new BRANCH-NAME BASIS ?-bgcolor COLOR? ** ** Create a new branch BRANCH-NAME off of check-in BASIS. ** You can optionally give the branch a default color. ** | | > | | | 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 |
** of the repository identified by the -R or --repository option.
**
** %fossil branch new BRANCH-NAME BASIS ?-bgcolor COLOR?
**
** Create a new branch BRANCH-NAME off of check-in BASIS.
** You can optionally give the branch a default color.
**
** %fossil branch list *or*
** %fossil branch ls
**
** List all branches
**
*/
void branch_cmd(void){
int n;
const char *zCmd = "list";
db_find_and_open_repository(0, 0);
if( g.argc<2 ){
usage("new|list|ls ...");
}
if( g.argc>=3 ) zCmd = g.argv[2];
n = strlen(zCmd);
if( strncmp(zCmd,"new",n)==0 ){
branch_new();
}else if( (strncmp(zCmd,"list",n)==0)||(strncmp(zCmd, "ls", n)==0) ){
Stmt q;
int vid;
char *zCurrent = 0;
if( g.localOpen ){
vid = db_lget_int("checkout", 0);
zCurrent = db_text(0, "SELECT value FROM tagxref"
|
| ︙ | ︙ | |||
222 223 224 225 226 227 228 |
const char *zBr = db_column_text(&q, 0);
int isCur = zCurrent!=0 && fossil_strcmp(zCurrent,zBr)==0;
printf("%s%s\n", (isCur ? "* " : " "), zBr);
}
db_finalize(&q);
}else{
fossil_panic("branch subcommand should be one of: "
| | | 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 |
const char *zBr = db_column_text(&q, 0);
int isCur = zCurrent!=0 && fossil_strcmp(zCurrent,zBr)==0;
printf("%s%s\n", (isCur ? "* " : " "), zBr);
}
db_finalize(&q);
}else{
fossil_panic("branch subcommand should be one of: "
"new list ls");
}
}
/*
** WEBPAGE: brlist
**
** Show a timeline of all branches
|
| ︙ | ︙ |