Ronny Pfannschmidt committed 3365f22

add metadata to the tarball and docstring to the archive function

Comments (0)

Files changed (1)

 def archive(bmst, key, target):
+    """
+    create the archive `target` from the iems of the metadata stored at `key`
+    """
     from mercurial import archival
     kind = archival.guesskind(target)
     if kind is None:
     meta = bmst.load_meta(key=key)
     print('archiving to', target)
     archiver = archiver(target, meta['timestamp'])
+    write('.bmst', json.dumps(meta, indent=2, sort_keys=1))
     for name, key in meta['items'].items():
         data = bmst.load_blob(key=key)
         write(name, data)
Tip: Use camelCasing e.g. ProjME to search for