git @ Cat's Eye Technologies ellsync / 04a692e
Remove `deepcheck` as it differs not from `--checksum --dry-run`. Chris Pressey 2 years ago
2 changed file(s) with 2 addition(s) and 35 deletion(s). Raw diff Collapse all Expand all
190190 After `sync` is performed, the system `sync` command is run, to ensure all buffers
191191 are flushed to devices before the `ellsync` tool actually exits.
192192
193 Added `deepcheck` command. This exists mostly for investigative purposes; the
194 `--thorough` flag is likely the better choice for practical use.
195
196 Added `--stream-name-only` option to `list` command.
197
198193 `rsync` is now invoked with `--checksum` flag to cause it to thoroughly check if
199194 files differ, even if their datestamps have not changed.
195
196 Added `--stream-name-only` option to `list` command.
200197
201198 ### 0.2
202199
120120 os.rename(existing_subdir_b, new_subdir_b)
121121
122122
123 def deepcheck(router, options):
124 stream_name = options.stream_name
125
126 if ':' in options.stream_name:
127 stream_name, subdir = options.stream_name.split(':')
128 else:
129 stream_name = options.stream_name
130 subdir = None
131
132 stream = router[stream_name]
133 from_dir = stream['from']
134 to_dir = stream['to']
135
136 if subdir:
137 from_dir = os.path.join(from_dir, subdir)
138 to_dir = os.path.join(to_dir, subdir)
139
140 cmd = 'diff -ruq "{}" "{}"'.format(from_dir, to_dir)
141 run_command(cmd)
142
143
144123 # - - - - driver - - - -
145124
146125
201180 )
202181 parser_rename.set_defaults(func=rename)
203182
204 # - - - - deepcheck - - - -
205 parser_deepcheck = subparsers.add_parser(
206 'deepcheck', help='Report files that are not byte-for-byte identical'
207 )
208 parser_deepcheck.add_argument('stream_name', metavar='STREAM', type=str,
209 help='Name of stream to operate under'
210 )
211 parser_deepcheck.set_defaults(func=deepcheck)
212
213183 options = argparser.parse_args(args)
214184 with open(options.router, 'r') as f:
215185 router = json.loads(f.read())