7d5a771844
Replace the usage of AccountDiffPreference with a different class in extension API package. Data is saved optimized in Git backend: default values are discarded during save operation and restored during read operation; so that this optimization step is transparent for the callers. For example when only one setting, theme in this case, differs from the default value, only this value is written into diff section in preferences.config file: +[diff] + theme = eclipse To support live migration, the upgrade is done in two steps: * part1 (this change): o Always write to both git and db o Introduce new configuration option to indicate whether to read from git or db, initially set to read from db o First binary update: some servers are reading/writing just the db; some servers are additionally writing to git o After first update: all servers are reading from the db, writing to both o Batch copy data from db to git (only related to non open source Gerrit version) o Update all servers to read from git. During the update, some will still be reading from the db; that's ok, because everybody is writing to git * part2 (next change): o Bump database version, migrate the data from db to git, delete the table (and the flag) from the code and update the servers. Change-Id: I30a6d82f4a8d0c33ae9bb26d7f93c66bd0cb8bee
63 lines
1.4 KiB
Python
63 lines
1.4 KiB
Python
SRC = 'src/main/java/com/google/gerrit/prettify/'
|
|
|
|
gwt_module(
|
|
name = 'client',
|
|
srcs = glob([
|
|
SRC + 'client/**/*.java',
|
|
SRC + 'common/**/*.java',
|
|
]),
|
|
gwt_xml = SRC + 'PrettyFormatter.gwt.xml',
|
|
resources = glob([
|
|
'src/main/java/com/google/gerrit/prettify/client/*.properties',
|
|
]),
|
|
deps = [
|
|
':google-code-prettify',
|
|
'//gerrit-gwtexpui:SafeHtml',
|
|
],
|
|
exported_deps = [
|
|
'//gerrit-extension-api:client',
|
|
'//gerrit-patch-jgit:client',
|
|
'//gerrit-reviewdb:client',
|
|
'//lib:gwtjsonrpc',
|
|
'//lib:gwtjsonrpc_src',
|
|
'//lib/jgit:Edit',
|
|
],
|
|
provided_deps = ['//lib/gwt:user'],
|
|
visibility = ['PUBLIC'],
|
|
)
|
|
|
|
java_library(
|
|
name = 'google-code-prettify',
|
|
resources = glob([
|
|
'src/main/resources/com/google/gerrit/prettify/client/**/*',
|
|
]),
|
|
deps = [
|
|
'//lib:LICENSE-Apache2.0',
|
|
],
|
|
)
|
|
|
|
java_library(
|
|
name = 'server',
|
|
srcs = glob([SRC + 'common/**/*.java']),
|
|
deps = [
|
|
'//gerrit-patch-jgit:server',
|
|
'//gerrit-reviewdb:server',
|
|
'//lib:guava',
|
|
'//lib:gwtjsonrpc',
|
|
'//lib/jgit:jgit',
|
|
],
|
|
visibility = ['PUBLIC'],
|
|
)
|
|
|
|
export_file(
|
|
name = 'prettify.min.js',
|
|
src = 'src/main/resources/com/google/gerrit/prettify/client/prettify.js',
|
|
visibility = ['//Documentation:'],
|
|
)
|
|
|
|
export_file(
|
|
name = 'prettify.min.css',
|
|
src = 'src/main/resources/com/google/gerrit/prettify/client/prettify.css',
|
|
visibility = ['//Documentation:'],
|
|
)
|