When features are deleted in applyLayerChanges , the mapping record from gpkg_fid to geogig_fid is not deleted. This leads to inconsistences in the DB and strange effects when using applyLayerChanges several times.
In applyLayerChanges a line liked this
cursor.execute('DELETE FROM "%s_fids" WHERE geogig_fid = "%s"' % (layername, geogigfid))
should be added at the end of the block after "for r in removed:"
When features are deleted in applyLayerChanges , the mapping record from gpkg_fid to geogig_fid is not deleted. This leads to inconsistences in the DB and strange effects when using applyLayerChanges several times.
In applyLayerChanges a line liked this cursor.execute('DELETE FROM "%s_fids" WHERE geogig_fid = "%s"' % (layername, geogigfid)) should be added at the end of the block after "for r in removed:"