Fossil SCM

Fix the "branch new" command so that it works if the parent omits the R-card. Ticket [3bfff6e03bcc5f14]

drh 2011-03-16 02:31 trunk
Commit 448dc5adf75e5ea88b2fcf7eece5f443ddd9c784
1 file changed +3 -1
+3 -1
--- src/branch.c
+++ src/branch.c
@@ -99,11 +99,13 @@
9999
}
100100
blob_append(&branch, "\n", 1);
101101
}
102102
zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rootid);
103103
blob_appendf(&branch, "P %s\n", zUuid);
104
- blob_appendf(&branch, "R %s\n", pParent->zRepoCksum);
104
+ if( pParent->zRepoCksum ){
105
+ blob_appendf(&branch, "R %s\n", pParent->zRepoCksum);
106
+ }
105107
manifest_destroy(pParent);
106108
107109
/* Add the symbolic branch name and the "branch" tag to identify
108110
** this as a new branch */
109111
if( zColor!=0 ){
110112
--- src/branch.c
+++ src/branch.c
@@ -99,11 +99,13 @@
99 }
100 blob_append(&branch, "\n", 1);
101 }
102 zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rootid);
103 blob_appendf(&branch, "P %s\n", zUuid);
104 blob_appendf(&branch, "R %s\n", pParent->zRepoCksum);
 
 
105 manifest_destroy(pParent);
106
107 /* Add the symbolic branch name and the "branch" tag to identify
108 ** this as a new branch */
109 if( zColor!=0 ){
110
--- src/branch.c
+++ src/branch.c
@@ -99,11 +99,13 @@
99 }
100 blob_append(&branch, "\n", 1);
101 }
102 zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rootid);
103 blob_appendf(&branch, "P %s\n", zUuid);
104 if( pParent->zRepoCksum ){
105 blob_appendf(&branch, "R %s\n", pParent->zRepoCksum);
106 }
107 manifest_destroy(pParent);
108
109 /* Add the symbolic branch name and the "branch" tag to identify
110 ** this as a new branch */
111 if( zColor!=0 ){
112

Keyboard Shortcuts

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