<feed xmlns='http://www.w3.org/2005/Atom'>
<title>metastore/src, branch format1-3</title>
<subtitle>File metadata backup/comparison/restoration tool</subtitle>
<link rel='alternate' type='text/html' href='https://spragg-ssl.co.uk/projects/cgit.cgi/metastore/'/>
<entry>
<title>Change "compare" output from MSG_QUIET to MSG_NORMAL.</title>
<updated>2022-05-24T09:12:33+00:00</updated>
<author>
<name>Adam Spragg</name>
<email>adam@spra.gg</email>
</author>
<published>2022-05-23T14:59:24+00:00</published>
<link rel='alternate' type='text/html' href='https://spragg-ssl.co.uk/projects/cgit.cgi/metastore/commit/?id=2e368d6bfdfba4efc651b5cfcd37b075deb79e4d'/>
<id>2e368d6bfdfba4efc651b5cfcd37b075deb79e4d</id>
<content type='text'>
Compare output is... just output. We shouldn't need to pass two "-q"
options to shut it up.

Likening the metastore MSG_* levels to syslog() LOG_* levels, MSG_DEBUG
works like LOG_DEBUG, and the WARNING/ERROR/CRITICAL also have similar
roles. That leaves MSG_NORMAL as the equivalent of LOG_INFO, and
MSG_QUIET as the equivalent of LOG_NOTICE.

LOG_NOTICE is documented as for "normal, but significant, condition"
which tracks what MSG_QUIET is for - things that aren't errors, but that
you want to know about even when you've asked for quiet.

Whereas the output of "compare" is just regular output. Finding a
difference isn't a significant condition - it's exactly what you've
asked it to look for.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Compare output is... just output. We shouldn't need to pass two "-q"
options to shut it up.

Likening the metastore MSG_* levels to syslog() LOG_* levels, MSG_DEBUG
works like LOG_DEBUG, and the WARNING/ERROR/CRITICAL also have similar
roles. That leaves MSG_NORMAL as the equivalent of LOG_INFO, and
MSG_QUIET as the equivalent of LOG_NOTICE.

LOG_NOTICE is documented as for "normal, but significant, condition"
which tracks what MSG_QUIET is for - things that aren't errors, but that
you want to know about even when you've asked for quiet.

Whereas the output of "compare" is just regular output. Finding a
difference isn't a significant condition - it's exactly what you've
asked it to look for.
</pre>
</div>
</content>
</entry>
<entry>
<title>Return non-zero exit status if "compare" finds differences</title>
<updated>2022-05-24T09:12:33+00:00</updated>
<author>
<name>Adam Spragg</name>
<email>adam@spra.gg</email>
</author>
<published>2022-05-23T14:29:11+00:00</published>
<link rel='alternate' type='text/html' href='https://spragg-ssl.co.uk/projects/cgit.cgi/metastore/commit/?id=a0902fe51010645f779e4d02cd46f35e488b8bd2'/>
<id>a0902fe51010645f779e4d02cd46f35e488b8bd2</id>
<content type='text'>
This makes `metastore` more useful in scripts, just to check if it found
anything, in the same way as `diff` and `grep`.

Note that POSIX requires that EXIT_SUCCESS is 0, and EXIT_FAILURE is 1,
so I've defined EXIT_DIFFERENCES as 2 which, while different from the
values `diff` and `grep` use (1 for finding something, 2 for errors),
maintains a certain amount of backwards compatibility with previous
versions of metastore.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This makes `metastore` more useful in scripts, just to check if it found
anything, in the same way as `diff` and `grep`.

Note that POSIX requires that EXIT_SUCCESS is 0, and EXIT_FAILURE is 1,
so I've defined EXIT_DIFFERENCES as 2 which, while different from the
values `diff` and `grep` use (1 for finding something, 2 for errors),
maintains a certain amount of backwards compatibility with previous
versions of metastore.
</pre>
</div>
</content>
</entry>
<entry>
<title>Make "--no-mtime" apply to "dump" action</title>
<updated>2022-05-24T09:12:33+00:00</updated>
<author>
<name>Adam Spragg</name>
<email>adam@spra.gg</email>
</author>
<published>2022-05-23T14:00:28+00:00</published>
<link rel='alternate' type='text/html' href='https://spragg-ssl.co.uk/projects/cgit.cgi/metastore/commit/?id=7c0520451b071e77b4c432ed89fc7559b8c58138'/>
<id>7c0520451b071e77b4c432ed89fc7559b8c58138</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add ability to not save mtime in metadata files</title>
<updated>2022-05-24T09:12:33+00:00</updated>
<author>
<name>Adam Spragg</name>
<email>adam@spra.gg</email>
</author>
<published>2022-05-18T15:35:35+00:00</published>
<link rel='alternate' type='text/html' href='https://spragg-ssl.co.uk/projects/cgit.cgi/metastore/commit/?id=7292804c1bafd43389defc0d7b4352ada666d626'/>
<id>7292804c1bafd43389defc0d7b4352ada666d626</id>
<content type='text'>
If you're storing metadata in a version control system with multiple
branches, mtime differences are going to produce a whole bunch of
conflicts that you likely don't care about. This allows you to not
save mtime and avoid those.

Note that we use a sentinel value of -1 for the mentry `mtimensec` field
to indicate this in the data, as all values of `mtime` are theoretically
valid, but `mtimensec` must always be between 0 and 999,999,999 in the
real world.

I'm not 100% sure about the mechanism for selecting this feature. The
legacy behaviour for metastore was to save mtimes in the metadata files,
but ignore them for compare/apply by default, with a `--mtime` option to
use the mtime data.

Keeping the legacy behaviour for backwards compatibility, but adding a
`--no-mtime` option to ignore mtimes when saving felt like a reasonable
way of making this happen, but something about it doesn't feel great.

Maybe I just didn't figure out how to make the documentation clear
enough.  ¯\_(ツ)_/¯
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If you're storing metadata in a version control system with multiple
branches, mtime differences are going to produce a whole bunch of
conflicts that you likely don't care about. This allows you to not
save mtime and avoid those.

Note that we use a sentinel value of -1 for the mentry `mtimensec` field
to indicate this in the data, as all values of `mtime` are theoretically
valid, but `mtimensec` must always be between 0 and 999,999,999 in the
real world.

I'm not 100% sure about the mechanism for selecting this feature. The
legacy behaviour for metastore was to save mtimes in the metadata files,
but ignore them for compare/apply by default, with a `--mtime` option to
use the mtime data.

Keeping the legacy behaviour for backwards compatibility, but adding a
`--no-mtime` option to ignore mtimes when saving felt like a reasonable
way of making this happen, but something about it doesn't feel great.

Maybe I just didn't figure out how to make the documentation clear
enough.  ¯\_(ツ)_/¯
</pre>
</div>
</content>
</entry>
<entry>
<title>Sort entries in Format 1 files by path, ASCIIbetically.</title>
<updated>2022-05-18T16:19:47+00:00</updated>
<author>
<name>Adam Spragg</name>
<email>adam@spra.gg</email>
</author>
<published>2022-05-18T09:42:10+00:00</published>
<link rel='alternate' type='text/html' href='https://spragg-ssl.co.uk/projects/cgit.cgi/metastore/commit/?id=ce62a76e4570b6368384b3995c1ba106389df454'/>
<id>ce62a76e4570b6368384b3995c1ba106389df454</id>
<content type='text'>
This ensures that the files are stable, and not subject to the order in
which the OS returns directory entries. This should prevent unnecessary
changes, and therefore unnecessary merge conflicts.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This ensures that the files are stable, and not subject to the order in
which the OS returns directory entries. This should prevent unnecessary
changes, and therefore unnecessary merge conflicts.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add ability to read Format 1 metadata files</title>
<updated>2022-05-18T16:19:47+00:00</updated>
<author>
<name>Adam Spragg</name>
<email>adam@spra.gg</email>
</author>
<published>2022-05-17T16:31:48+00:00</published>
<link rel='alternate' type='text/html' href='https://spragg-ssl.co.uk/projects/cgit.cgi/metastore/commit/?id=260fc47f01ef64368721ec93de4cbd988357b32b'/>
<id>260fc47f01ef64368721ec93de4cbd988357b32b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add ability to write Format 1 metadata files</title>
<updated>2022-05-18T16:19:47+00:00</updated>
<author>
<name>Adam Spragg</name>
<email>adam@spra.gg</email>
</author>
<published>2022-05-17T11:47:32+00:00</published>
<link rel='alternate' type='text/html' href='https://spragg-ssl.co.uk/projects/cgit.cgi/metastore/commit/?id=b3c08670f56d7c5ee85dffa1a2faa5e03d2df5a1'/>
<id>b3c08670f56d7c5ee85dffa1a2faa5e03d2df5a1</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add -r/--format option to pick the format to save as</title>
<updated>2022-05-18T16:19:40+00:00</updated>
<author>
<name>Adam Spragg</name>
<email>adam@spra.gg</email>
</author>
<published>2022-05-16T13:25:16+00:00</published>
<link rel='alternate' type='text/html' href='https://spragg-ssl.co.uk/projects/cgit.cgi/metastore/commit/?id=96df5969b11b9a64f95c0c28347154b06cfc9d15'/>
<id>96df5969b11b9a64f95c0c28347154b06cfc9d15</id>
<content type='text'>
Only version 0 is supported here.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Only version 0 is supported here.
</pre>
</div>
</content>
</entry>
<entry>
<title>Separate format-specific read/write logic into own functions</title>
<updated>2022-05-18T16:19:40+00:00</updated>
<author>
<name>Adam Spragg</name>
<email>adam@spra.gg</email>
</author>
<published>2022-05-16T11:20:35+00:00</published>
<link rel='alternate' type='text/html' href='https://spragg-ssl.co.uk/projects/cgit.cgi/metastore/commit/?id=ef1a020f5cb2acd8fb8b8ca58b96cb8a6603199b'/>
<id>ef1a020f5cb2acd8fb8b8ca58b96cb8a6603199b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Reuse already calculated end-of-buffer pointer</title>
<updated>2022-05-18T16:19:40+00:00</updated>
<author>
<name>Adam Spragg</name>
<email>adam@spra.gg</email>
</author>
<published>2022-05-16T10:00:02+00:00</published>
<link rel='alternate' type='text/html' href='https://spragg-ssl.co.uk/projects/cgit.cgi/metastore/commit/?id=b2d908e5ee0339f21494bce5c70a75f714c49674'/>
<id>b2d908e5ee0339f21494bce5c70a75f714c49674</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
