annotate src/main/kotlin/name/blackcap/passman/MergeSubcommand.kt @ 10:cbe4c797c9a6

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