Hello,
fossil 2.3 has given an error when pushing a private branch:
Error: Database error: UNIQUE constraint failed: private.rid: {INSERT
INTO private VALUES(4)}
Inspecting the source, it seems that in the function content_put_ex in
the file content.c that only a new rid should be marked as private,
since a rid that adds data to a phantom will already have had the
private marking done when the phantom was added.
The attached patch only marks the rid as private when also adding a
phantom.
However while this corrects the private branch push error I do not know
whether it causes other errors, violates invariants, etc.
diff -Naur fossil-2.3-upstream/src/content.c fossil-2.3/src/content.c
--- fossil-2.3-upstream/src/content.c 2017-07-20 23:19:30.000000000 -0400
+++ fossil-2.3/src/content.c 2017-08-08 22:46:11.690063606 -0400
@@ -598,10 +598,10 @@
if( !pBlob ){
db_multi_exec("INSERT OR IGNORE INTO phantom VALUES(%d)", rid);
}
- }
- if( g.markPrivate || isPrivate ){
- db_multi_exec("INSERT INTO private VALUES(%d)", rid);
- markAsUnclustered = 0;
+ if( g.markPrivate || isPrivate ){
+ db_multi_exec("INSERT INTO private VALUES(%d)", rid);
+ markAsUnclustered = 0;
+ }
}
if( nBlob==0 ) blob_reset(&cmpr);
_______________________________________________
fossil-users mailing list
[email protected]
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users