summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
f8fb566)
In a sensible system, these turn out to be mostly signature files made
by old versions of the master key which don't exist any more.
You might want to think about making `upload-hook' delete the
corresponding files at the file server.
.IR sig-file ,
and
.I conf-file
.IR sig-file ,
and
.I conf-file
+respectively. Remove unexpected files from the
+.IR base-dir ,
+since these tend to be signatures made by old master keys which don't
+work any more. Run the
.I upload-hook
to copy things into the right places.
.TP
.I upload-hook
to copy things into the right places.
.TP
Local base directory for the repository files. This probably ought to
end in a
.RB ` / '
Local base directory for the repository files. This probably ought to
end in a
.RB ` / '
+character. Unexpected files in this directory will be removed by the
+.B tripe-keys upload
+command. No default.
.TP
.I repos-file
Filename for local repository tarball. Default is the concatenation of
.TP
.I repos-file
Filename for local repository tarball. Default is the concatenation of
for base in commit:
new = '%s.new' % base
OS.rename(new, base)
for base in commit:
new = '%s.new' % base
OS.rename(new, base)
+
+ ## Remove files in the base-dir which don't correspond to ones we just
+ ## committed
+ allow = {}
+ basedir = conf['base-dir']
+ bdl = len(basedir)
+ for base in commit:
+ if base.startswith(basedir): allow[base[bdl:]] = 1
+ for found in OS.listdir(basedir):
+ if found not in allow: OS.remove(OS.path.join(basedir, found))
finally:
OS.chdir(cwd)
rmtree('tmp')
finally:
OS.chdir(cwd)
rmtree('tmp')