annotate docs/notes.rst @ 275:c72f5b2dbc6f

treesum: Simplify the path computations and make the visible output more consistent. Current format of digest lines: - No `=' if there was a severe error so that digest and/or size could not be computed. - Empty fields for digest and/or size of they were not computed on purpose: * for symbolic links * for special files
author Franz Glasner <fzglas.hg@dom66.de>
date Thu, 20 Feb 2025 15:30:51 +0100
parents c02a57df2a29
children 4a8026cbcecf
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
212
7cf9df49d0ba Some notes about FLAGS
Franz Glasner <fzglas.hg@dom66.de>
parents: 209
diff changeset
1 .. -*- coding: utf-8; indent-tabs-mode: nil; -*-
194
938488f87b62 Begin a file with some notes on treesum.py and its digest file format
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
2
938488f87b62 Begin a file with some notes on treesum.py and its digest file format
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
3
938488f87b62 Begin a file with some notes on treesum.py and its digest file format
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
4 In a aggregated directory checksum at the end of a block:
938488f87b62 Begin a file with some notes on treesum.py and its digest file format
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
5 A path equals
938488f87b62 Begin a file with some notes on treesum.py and its digest file format
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
6
938488f87b62 Begin a file with some notes on treesum.py and its digest file format
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
7 ``./@/``
938488f87b62 Begin a file with some notes on treesum.py and its digest file format
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
8
938488f87b62 Begin a file with some notes on treesum.py and its digest file format
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
9 Symlink to directory
938488f87b62 Begin a file with some notes on treesum.py and its digest file format
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
10
938488f87b62 Begin a file with some notes on treesum.py and its digest file format
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
11 ``./@``
938488f87b62 Begin a file with some notes on treesum.py and its digest file format
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
12
270
42f4ca423ab3 treesum: REFACTOR: Major refactoring of computing digests:
Franz Glasner <fzglas.hg@dom66.de>
parents: 222
diff changeset
13 Symlink to other filesystem object.
42f4ca423ab3 treesum: REFACTOR: Major refactoring of computing digests:
Franz Glasner <fzglas.hg@dom66.de>
parents: 222
diff changeset
14 Also used if the link is broken and the target type cannot determined.
194
938488f87b62 Begin a file with some notes on treesum.py and its digest file format
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
15
938488f87b62 Begin a file with some notes on treesum.py and its digest file format
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
16 Other paths that *end* with:
938488f87b62 Begin a file with some notes on treesum.py and its digest file format
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
17
938488f87b62 Begin a file with some notes on treesum.py and its digest file format
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
18 ``/./@/``
938488f87b62 Begin a file with some notes on treesum.py and its digest file format
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
19
938488f87b62 Begin a file with some notes on treesum.py and its digest file format
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
20 Symlink to a directory
938488f87b62 Begin a file with some notes on treesum.py and its digest file format
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
21
273
c02a57df2a29 treesum: - WalkDirEntry tests with a FIFO special file - WalkDirEntry.is_reg
Franz Glasner <fzglas.hg@dom66.de>
parents: 270
diff changeset
22 ``/./@``
194
938488f87b62 Begin a file with some notes on treesum.py and its digest file format
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
23
270
42f4ca423ab3 treesum: REFACTOR: Major refactoring of computing digests:
Franz Glasner <fzglas.hg@dom66.de>
parents: 222
diff changeset
24 Symlink to other filesystem object.
42f4ca423ab3 treesum: REFACTOR: Major refactoring of computing digests:
Franz Glasner <fzglas.hg@dom66.de>
parents: 222
diff changeset
25 Also used if the link is broken and the target type cannot determined.
198
c1e875ba4bdc Put the effective filesystem encoding into the treesum digest file using FSENCODING = <encoding>
Franz Glasner <fzglas.hg@dom66.de>
parents: 194
diff changeset
26
273
c02a57df2a29 treesum: - WalkDirEntry tests with a FIFO special file - WalkDirEntry.is_reg
Franz Glasner <fzglas.hg@dom66.de>
parents: 270
diff changeset
27 ``/./|``, ``/./@|``
c02a57df2a29 treesum: - WalkDirEntry tests with a FIFO special file - WalkDirEntry.is_reg
Franz Glasner <fzglas.hg@dom66.de>
parents: 270
diff changeset
28
c02a57df2a29 treesum: - WalkDirEntry tests with a FIFO special file - WalkDirEntry.is_reg
Franz Glasner <fzglas.hg@dom66.de>
parents: 270
diff changeset
29 FIFO and symlink to FIFO
c02a57df2a29 treesum: - WalkDirEntry tests with a FIFO special file - WalkDirEntry.is_reg
Franz Glasner <fzglas.hg@dom66.de>
parents: 270
diff changeset
30
c02a57df2a29 treesum: - WalkDirEntry tests with a FIFO special file - WalkDirEntry.is_reg
Franz Glasner <fzglas.hg@dom66.de>
parents: 270
diff changeset
31 ``/./=``, ``/./@=``
c02a57df2a29 treesum: - WalkDirEntry tests with a FIFO special file - WalkDirEntry.is_reg
Franz Glasner <fzglas.hg@dom66.de>
parents: 270
diff changeset
32
c02a57df2a29 treesum: - WalkDirEntry tests with a FIFO special file - WalkDirEntry.is_reg
Franz Glasner <fzglas.hg@dom66.de>
parents: 270
diff changeset
33 Socket and symlink to socket
c02a57df2a29 treesum: - WalkDirEntry tests with a FIFO special file - WalkDirEntry.is_reg
Franz Glasner <fzglas.hg@dom66.de>
parents: 270
diff changeset
34
c02a57df2a29 treesum: - WalkDirEntry tests with a FIFO special file - WalkDirEntry.is_reg
Franz Glasner <fzglas.hg@dom66.de>
parents: 270
diff changeset
35 ``/./>``, ``/./@>``
c02a57df2a29 treesum: - WalkDirEntry tests with a FIFO special file - WalkDirEntry.is_reg
Franz Glasner <fzglas.hg@dom66.de>
parents: 270
diff changeset
36
c02a57df2a29 treesum: - WalkDirEntry tests with a FIFO special file - WalkDirEntry.is_reg
Franz Glasner <fzglas.hg@dom66.de>
parents: 270
diff changeset
37 Door (Solaris) and symlink to door
c02a57df2a29 treesum: - WalkDirEntry tests with a FIFO special file - WalkDirEntry.is_reg
Franz Glasner <fzglas.hg@dom66.de>
parents: 270
diff changeset
38
c02a57df2a29 treesum: - WalkDirEntry tests with a FIFO special file - WalkDirEntry.is_reg
Franz Glasner <fzglas.hg@dom66.de>
parents: 270
diff changeset
39 ``/./%``, ``/./@%``
c02a57df2a29 treesum: - WalkDirEntry tests with a FIFO special file - WalkDirEntry.is_reg
Franz Glasner <fzglas.hg@dom66.de>
parents: 270
diff changeset
40
c02a57df2a29 treesum: - WalkDirEntry tests with a FIFO special file - WalkDirEntry.is_reg
Franz Glasner <fzglas.hg@dom66.de>
parents: 270
diff changeset
41 Whiteout and symlink to whiteout (used by union filesystems) (BSD)
c02a57df2a29 treesum: - WalkDirEntry tests with a FIFO special file - WalkDirEntry.is_reg
Franz Glasner <fzglas.hg@dom66.de>
parents: 270
diff changeset
42
c02a57df2a29 treesum: - WalkDirEntry tests with a FIFO special file - WalkDirEntry.is_reg
Franz Glasner <fzglas.hg@dom66.de>
parents: 270
diff changeset
43 Nonstandard path endings are:
c02a57df2a29 treesum: - WalkDirEntry tests with a FIFO special file - WalkDirEntry.is_reg
Franz Glasner <fzglas.hg@dom66.de>
parents: 270
diff changeset
44
c02a57df2a29 treesum: - WalkDirEntry tests with a FIFO special file - WalkDirEntry.is_reg
Franz Glasner <fzglas.hg@dom66.de>
parents: 270
diff changeset
45 ``/./:``, ``/./@:``
c02a57df2a29 treesum: - WalkDirEntry tests with a FIFO special file - WalkDirEntry.is_reg
Franz Glasner <fzglas.hg@dom66.de>
parents: 270
diff changeset
46
c02a57df2a29 treesum: - WalkDirEntry tests with a FIFO special file - WalkDirEntry.is_reg
Franz Glasner <fzglas.hg@dom66.de>
parents: 270
diff changeset
47 Character special and symlink to character special
c02a57df2a29 treesum: - WalkDirEntry tests with a FIFO special file - WalkDirEntry.is_reg
Franz Glasner <fzglas.hg@dom66.de>
parents: 270
diff changeset
48
c02a57df2a29 treesum: - WalkDirEntry tests with a FIFO special file - WalkDirEntry.is_reg
Franz Glasner <fzglas.hg@dom66.de>
parents: 270
diff changeset
49 ``/./;``, ``/./@;``
c02a57df2a29 treesum: - WalkDirEntry tests with a FIFO special file - WalkDirEntry.is_reg
Franz Glasner <fzglas.hg@dom66.de>
parents: 270
diff changeset
50
c02a57df2a29 treesum: - WalkDirEntry tests with a FIFO special file - WalkDirEntry.is_reg
Franz Glasner <fzglas.hg@dom66.de>
parents: 270
diff changeset
51 Block special and symlink to block special
c02a57df2a29 treesum: - WalkDirEntry tests with a FIFO special file - WalkDirEntry.is_reg
Franz Glasner <fzglas.hg@dom66.de>
parents: 270
diff changeset
52
275
c72f5b2dbc6f treesum: Simplify the path computations and make the visible output more consistent.
Franz Glasner <fzglas.hg@dom66.de>
parents: 273
diff changeset
53 ``/./)``, ``/./@+``
273
c02a57df2a29 treesum: - WalkDirEntry tests with a FIFO special file - WalkDirEntry.is_reg
Franz Glasner <fzglas.hg@dom66.de>
parents: 270
diff changeset
54
c02a57df2a29 treesum: - WalkDirEntry tests with a FIFO special file - WalkDirEntry.is_reg
Franz Glasner <fzglas.hg@dom66.de>
parents: 270
diff changeset
55 Event port (Solaris, Illumos) and symlink to event port
c02a57df2a29 treesum: - WalkDirEntry tests with a FIFO special file - WalkDirEntry.is_reg
Franz Glasner <fzglas.hg@dom66.de>
parents: 270
diff changeset
56
c02a57df2a29 treesum: - WalkDirEntry tests with a FIFO special file - WalkDirEntry.is_reg
Franz Glasner <fzglas.hg@dom66.de>
parents: 270
diff changeset
57
c02a57df2a29 treesum: - WalkDirEntry tests with a FIFO special file - WalkDirEntry.is_reg
Franz Glasner <fzglas.hg@dom66.de>
parents: 270
diff changeset
58 .. note:: :command:`ls` can also use ``*`` for regular files that are
c02a57df2a29 treesum: - WalkDirEntry tests with a FIFO special file - WalkDirEntry.is_reg
Franz Glasner <fzglas.hg@dom66.de>
parents: 270
diff changeset
59 executable.
c02a57df2a29 treesum: - WalkDirEntry tests with a FIFO special file - WalkDirEntry.is_reg
Franz Glasner <fzglas.hg@dom66.de>
parents: 270
diff changeset
60
198
c1e875ba4bdc Put the effective filesystem encoding into the treesum digest file using FSENCODING = <encoding>
Franz Glasner <fzglas.hg@dom66.de>
parents: 194
diff changeset
61
c1e875ba4bdc Put the effective filesystem encoding into the treesum digest file using FSENCODING = <encoding>
Franz Glasner <fzglas.hg@dom66.de>
parents: 194
diff changeset
62 Fields:
c1e875ba4bdc Put the effective filesystem encoding into the treesum digest file using FSENCODING = <encoding>
Franz Glasner <fzglas.hg@dom66.de>
parents: 194
diff changeset
63
c1e875ba4bdc Put the effective filesystem encoding into the treesum digest file using FSENCODING = <encoding>
Franz Glasner <fzglas.hg@dom66.de>
parents: 194
diff changeset
64 ``FSENCODING``
c1e875ba4bdc Put the effective filesystem encoding into the treesum digest file using FSENCODING = <encoding>
Franz Glasner <fzglas.hg@dom66.de>
parents: 194
diff changeset
65
c1e875ba4bdc Put the effective filesystem encoding into the treesum digest file using FSENCODING = <encoding>
Franz Glasner <fzglas.hg@dom66.de>
parents: 194
diff changeset
66 The result of :func:`os.getfilesystemencoding` that is in effect when
219
19eaba51c632 Refactored the printing of FLAGS: print flags always and explicitely print symlink behaviour and encoding configuration
Franz Glasner <fzglas.hg@dom66.de>
parents: 212
diff changeset
67 generating treesum digests (process environment)
204
07f1d79e6674 Fully implemented UTF-8 mode for treeview.
Franz Glasner <fzglas.hg@dom66.de>
parents: 198
diff changeset
68
07f1d79e6674 Fully implemented UTF-8 mode for treeview.
Franz Glasner <fzglas.hg@dom66.de>
parents: 198
diff changeset
69 ``ERROR``
07f1d79e6674 Fully implemented UTF-8 mode for treeview.
Franz Glasner <fzglas.hg@dom66.de>
parents: 198
diff changeset
70
07f1d79e6674 Fully implemented UTF-8 mode for treeview.
Franz Glasner <fzglas.hg@dom66.de>
parents: 198
diff changeset
71 Errors are reported:
07f1d79e6674 Fully implemented UTF-8 mode for treeview.
Franz Glasner <fzglas.hg@dom66.de>
parents: 198
diff changeset
72
07f1d79e6674 Fully implemented UTF-8 mode for treeview.
Franz Glasner <fzglas.hg@dom66.de>
parents: 198
diff changeset
73 - For directories if the one of filenames has a filename problem
209
efbf99bd0910 VFAT-Encoding-Problem notiert
Franz Glasner <fzglas.hg@dom66.de>
parents: 204
diff changeset
74
212
7cf9df49d0ba Some notes about FLAGS
Franz Glasner <fzglas.hg@dom66.de>
parents: 209
diff changeset
75 ``FLAGS``
7cf9df49d0ba Some notes about FLAGS
Franz Glasner <fzglas.hg@dom66.de>
parents: 209
diff changeset
76
219
19eaba51c632 Refactored the printing of FLAGS: print flags always and explicitely print symlink behaviour and encoding configuration
Franz Glasner <fzglas.hg@dom66.de>
parents: 212
diff changeset
77 Some flags are always printed.
212
7cf9df49d0ba Some notes about FLAGS
Franz Glasner <fzglas.hg@dom66.de>
parents: 209
diff changeset
78
219
19eaba51c632 Refactored the printing of FLAGS: print flags always and explicitely print symlink behaviour and encoding configuration
Franz Glasner <fzglas.hg@dom66.de>
parents: 212
diff changeset
79 - no file modes and no file mtime is taken into account for digesting
212
7cf9df49d0ba Some notes about FLAGS
Franz Glasner <fzglas.hg@dom66.de>
parents: 209
diff changeset
80 - no file size is printed
7cf9df49d0ba Some notes about FLAGS
Franz Glasner <fzglas.hg@dom66.de>
parents: 209
diff changeset
81
7cf9df49d0ba Some notes about FLAGS
Franz Glasner <fzglas.hg@dom66.de>
parents: 209
diff changeset
82 Contains:
7cf9df49d0ba Some notes about FLAGS
Franz Glasner <fzglas.hg@dom66.de>
parents: 209
diff changeset
83
7cf9df49d0ba Some notes about FLAGS
Franz Glasner <fzglas.hg@dom66.de>
parents: 209
diff changeset
84 - ``with-metadata-fullmode``: if a file mode is used completely as
7cf9df49d0ba Some notes about FLAGS
Franz Glasner <fzglas.hg@dom66.de>
parents: 209
diff changeset
85 given by the OS for digest computation
7cf9df49d0ba Some notes about FLAGS
Franz Glasner <fzglas.hg@dom66.de>
parents: 209
diff changeset
86 - ``with-metadata-mode``: if just the "portable" file modes are used
7cf9df49d0ba Some notes about FLAGS
Franz Glasner <fzglas.hg@dom66.de>
parents: 209
diff changeset
87 for digest computation
7cf9df49d0ba Some notes about FLAGS
Franz Glasner <fzglas.hg@dom66.de>
parents: 209
diff changeset
88 - ``with-metadata-mtime``: if the mtime as ISO-String and truncated to
7cf9df49d0ba Some notes about FLAGS
Franz Glasner <fzglas.hg@dom66.de>
parents: 209
diff changeset
89 seconds is used in digest computation
219
19eaba51c632 Refactored the printing of FLAGS: print flags always and explicitely print symlink behaviour and encoding configuration
Franz Glasner <fzglas.hg@dom66.de>
parents: 212
diff changeset
90 - ``print-size``: if the filesize is to to be printed also -- does not
19eaba51c632 Refactored the printing of FLAGS: print flags always and explicitely print symlink behaviour and encoding configuration
Franz Glasner <fzglas.hg@dom66.de>
parents: 212
diff changeset
91 change digests
19eaba51c632 Refactored the printing of FLAGS: print flags always and explicitely print symlink behaviour and encoding configuration
Franz Glasner <fzglas.hg@dom66.de>
parents: 212
diff changeset
92 - ``fs-encoding``: the filenames are given in FS encoding
19eaba51c632 Refactored the printing of FLAGS: print flags always and explicitely print symlink behaviour and encoding configuration
Franz Glasner <fzglas.hg@dom66.de>
parents: 212
diff changeset
93 - ``utf8-encoding``: the filenames are given in UTF-8 encoding
19eaba51c632 Refactored the printing of FLAGS: print flags always and explicitely print symlink behaviour and encoding configuration
Franz Glasner <fzglas.hg@dom66.de>
parents: 212
diff changeset
94 - ``follow-symlinks-XXX`` and ``no-follow-symlinkx-XXX``: if symlinks are followed on the command
212
7cf9df49d0ba Some notes about FLAGS
Franz Glasner <fzglas.hg@dom66.de>
parents: 209
diff changeset
95 line, while directory walking or for files
7cf9df49d0ba Some notes about FLAGS
Franz Glasner <fzglas.hg@dom66.de>
parents: 209
diff changeset
96 - ``size-only``: if no digest is to be computed and only a file's size
7cf9df49d0ba Some notes about FLAGS
Franz Glasner <fzglas.hg@dom66.de>
parents: 209
diff changeset
97 is printed and the accumulated file sizes for a directory tree
209
efbf99bd0910 VFAT-Encoding-Problem notiert
Franz Glasner <fzglas.hg@dom66.de>
parents: 204
diff changeset
98
222
d7be68a8937d Note that ROOT and COMMENT are always printed in UTF-8 encoding
Franz Glasner <fzglas.hg@dom66.de>
parents: 219
diff changeset
99 ``ROOT``
d7be68a8937d Note that ROOT and COMMENT are always printed in UTF-8 encoding
Franz Glasner <fzglas.hg@dom66.de>
parents: 219
diff changeset
100
d7be68a8937d Note that ROOT and COMMENT are always printed in UTF-8 encoding
Franz Glasner <fzglas.hg@dom66.de>
parents: 219
diff changeset
101 Always printed in UTF-8 encoding
d7be68a8937d Note that ROOT and COMMENT are always printed in UTF-8 encoding
Franz Glasner <fzglas.hg@dom66.de>
parents: 219
diff changeset
102
d7be68a8937d Note that ROOT and COMMENT are always printed in UTF-8 encoding
Franz Glasner <fzglas.hg@dom66.de>
parents: 219
diff changeset
103 ``COMMENT``
d7be68a8937d Note that ROOT and COMMENT are always printed in UTF-8 encoding
Franz Glasner <fzglas.hg@dom66.de>
parents: 219
diff changeset
104
d7be68a8937d Note that ROOT and COMMENT are always printed in UTF-8 encoding
Franz Glasner <fzglas.hg@dom66.de>
parents: 219
diff changeset
105 Always printed in UTF-8 encoding
d7be68a8937d Note that ROOT and COMMENT are always printed in UTF-8 encoding
Franz Glasner <fzglas.hg@dom66.de>
parents: 219
diff changeset
106
209
efbf99bd0910 VFAT-Encoding-Problem notiert
Franz Glasner <fzglas.hg@dom66.de>
parents: 204
diff changeset
107
efbf99bd0910 VFAT-Encoding-Problem notiert
Franz Glasner <fzglas.hg@dom66.de>
parents: 204
diff changeset
108 Offene Fragen
efbf99bd0910 VFAT-Encoding-Problem notiert
Franz Glasner <fzglas.hg@dom66.de>
parents: 204
diff changeset
109 =============
efbf99bd0910 VFAT-Encoding-Problem notiert
Franz Glasner <fzglas.hg@dom66.de>
parents: 204
diff changeset
110
efbf99bd0910 VFAT-Encoding-Problem notiert
Franz Glasner <fzglas.hg@dom66.de>
parents: 204
diff changeset
111 VFAT und Encoding
efbf99bd0910 VFAT-Encoding-Problem notiert
Franz Glasner <fzglas.hg@dom66.de>
parents: 204
diff changeset
112 -----------------
efbf99bd0910 VFAT-Encoding-Problem notiert
Franz Glasner <fzglas.hg@dom66.de>
parents: 204
diff changeset
113
efbf99bd0910 VFAT-Encoding-Problem notiert
Franz Glasner <fzglas.hg@dom66.de>
parents: 204
diff changeset
114 Verfolgung von Encoding-Einstellungen über Mount-Punkte hinweg -- gerade
efbf99bd0910 VFAT-Encoding-Problem notiert
Franz Glasner <fzglas.hg@dom66.de>
parents: 204
diff changeset
115 für externe Medien mit VFAT/MSDOS-FS.
efbf99bd0910 VFAT-Encoding-Problem notiert
Franz Glasner <fzglas.hg@dom66.de>
parents: 204
diff changeset
116
efbf99bd0910 VFAT-Encoding-Problem notiert
Franz Glasner <fzglas.hg@dom66.de>
parents: 204
diff changeset
117 Erst einmal zurückgestellt