Mercurial > cgi-bin > hgweb.cgi > PassMan
view 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 |
line wrap: on
line source
package name.blackcap.passman class MergeSubcommand(): Subcommand() { override fun run(args: Array<String>) { /* * To merge, plow through both the old and the new databases in the same * order. By id is sorta idiosyncratic by human standards, but why not? * If the entries do not match, write the lowest-numbered one to the * output database and read the next record from where the lowest-numbered * one came. If they do match, rely on modified time (fall back to created * time if null) to sort out the winner. Continue till we hit the end * of one database, then "drain" the other. Preserve time stamps. * * Maybe do something special (warning? confirmation prompt?) on mismatched * creation times, as this means a new record was created w/o knowledge * of an existing one. Choices should be to clobber w/ newest, pick one * manually, or rename one so the other can persist under original name. * */ error("not yet implemented") } }