Fossil SCM

Allow committing as follow-up on a closed leaf, as long as it is done in a new branch. Suggested by Matt Welland on ML.

jan.nijtmans 2014-07-18 21:57 trunk
Commit 2b79c600d545e8c6685a8ae7ac8b951ead644c48
1 file changed +2 -2
+2 -2
--- src/checkin.c
+++ src/checkin.c
@@ -1677,13 +1677,13 @@
16771677
){
16781678
fossil_fatal("would fork. \"update\" first or use --allow-fork.");
16791679
}
16801680
16811681
/*
1682
- ** Do not allow a commit against a closed leaf
1682
+ ** Do not allow a commit against a closed leaf on the same branch.
16831683
*/
1684
- if( db_exists("SELECT 1 FROM tagxref"
1684
+ if( !sCiInfo.zBranch && db_exists("SELECT 1 FROM tagxref"
16851685
" WHERE tagid=%d AND rid=%d AND tagtype>0",
16861686
TAG_CLOSED, vid) ){
16871687
fossil_fatal("cannot commit against a closed leaf");
16881688
}
16891689
16901690
--- src/checkin.c
+++ src/checkin.c
@@ -1677,13 +1677,13 @@
1677 ){
1678 fossil_fatal("would fork. \"update\" first or use --allow-fork.");
1679 }
1680
1681 /*
1682 ** Do not allow a commit against a closed leaf
1683 */
1684 if( db_exists("SELECT 1 FROM tagxref"
1685 " WHERE tagid=%d AND rid=%d AND tagtype>0",
1686 TAG_CLOSED, vid) ){
1687 fossil_fatal("cannot commit against a closed leaf");
1688 }
1689
1690
--- src/checkin.c
+++ src/checkin.c
@@ -1677,13 +1677,13 @@
1677 ){
1678 fossil_fatal("would fork. \"update\" first or use --allow-fork.");
1679 }
1680
1681 /*
1682 ** Do not allow a commit against a closed leaf on the same branch.
1683 */
1684 if( !sCiInfo.zBranch && db_exists("SELECT 1 FROM tagxref"
1685 " WHERE tagid=%d AND rid=%d AND tagtype>0",
1686 TAG_CLOSED, vid) ){
1687 fossil_fatal("cannot commit against a closed leaf");
1688 }
1689
1690

Keyboard Shortcuts

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