Fossil

Enhance the stash so that it stores hashes and no long depends on RID value.
Do this is a way that is backwards compatible and transparent to the user.
After running any "stash" command using this version of Fossil or later, the
schema will automatically update and the stash should survive a subsequent
RID renumbering event in the repository without damage.

Change the schema of the vmerge table so that it remembers the hash of
merged artifacts, not the RID. Schema updates are automatic, but once
the update occurs, you are committed to using the newer version of
Fossil moving forward.
check-in: 8977dfb0 user: drh tags: rid-renumbering

Enhance the stash so that it stores hashes and no long depends on RID value.
Do this is a way that is backwards compatible and transparent to the user.
After running any "stash" command using this version of Fossil or later, the
schema will automatically update and the stash should survive a subsequent
RID renumbering event in the repository without damage.
check-in: ed06585f user: drh tags: trunk

/* If the checkout database was opened first, then check to make
** sure that the repository database that was just opened has not
** be replaced by a clone of the same project, with different RID
** values.
*/
if( g.localOpen && !db_fingerprint_ok() ){
fossil_print(
"Oops. It looks like the repository database file located at\n"
" \"%s\"\n", zDbName
);
fossil_print(
"has been swapped with a clone that may have different\n"
"integer keys for the various artifacts. As of 2019-01-11,\n"
................................................................................
" %s open \"%s\" --keep\n"
"Noting that any STASH and UNDO information "
"WILL BE IRREVOCABLY LOST.\n\n",
g.argv[0],
g.argv[0], zDbName
);
fossil_fatal("bad fingerprint");
}
}
/*
** Return true if there have been any changes to the repository
** database since it was opened.
**

/* If the checkout database was opened first, then check to make
** sure that the repository database that was just opened has not
** be replaced by a clone of the same project, with different RID
** values.
*/
if( g.localOpen && !db_fingerprint_ok() ){
/* Uncomment the following when we are ready for automatic recovery: */#if 0 stash_rid_renumbering_event();#else
fossil_print(
"Oops. It looks like the repository database file located at\n"
" \"%s\"\n", zDbName
);
fossil_print(
"has been swapped with a clone that may have different\n"
"integer keys for the various artifacts. As of 2019-01-11,\n"
................................................................................
" %s open \"%s\" --keep\n"
"Noting that any STASH and UNDO information "
"WILL BE IRREVOCABLY LOST.\n\n",
g.argv[0],
g.argv[0], zDbName
);
fossil_fatal("bad fingerprint");
#endif
}
}
/*
** Return true if there have been any changes to the repository
** database since it was opened.
**