comparison src/main/kotlin/name/blackcap/passman/MergeSubcommand.kt @ 9:72619175004e

Fix issues found in testing.
author David Barts <n5jrn@me.com>
date Sat, 01 Oct 2022 09:57:23 -0700
parents 698c4a3d758d
children c69665ff37d0
comparison
equal deleted inserted replaced
8:698c4a3d758d 9:72619175004e
1 package name.blackcap.passman 1 package name.blackcap.passman
2 2
3 class MergeSubcommand(): Subcommand() { 3 class MergeSubcommand(): Subcommand() {
4 override fun run(args: Array<String>) { 4 override fun run(args: Array<String>) {
5 /*
6 * To merge, plow through both the old and the new databases in the same
7 * order. By id is sorta idiosyncratic by human standards, but why not?
8 * If the entries do not match, write the lowest-numbered one to the
9 * output database and read the next record from where the lowest-numbered
10 * one came. If they do match, rely on modified time (fall back to created
11 * time if null) to sort out the winner. Continue till we hit the end
12 * of one database, then "drain" the other. Preserve time stamps.
13 *
14 * Maybe do something special (warning? confirmation prompt?) on mismatched
15 * creation times, as this means a new record was created w/o knowledge
16 * of an existing one. Choices should be to clobber w/ newest, pick one
17 * manually, or rename one so the other can persist under original name.
18 *
19 */
5 error("not yet implemented") 20 error("not yet implemented")
6 } 21 }
7 } 22 }