8
|
1 package name.blackcap.passman
|
|
2
|
|
3 class MergeSubcommand(): Subcommand() {
|
|
4 override fun run(args: Array<String>) {
|
9
|
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 */
|
8
|
20 error("not yet implemented")
|
|
21 }
|
|
22 }
|