Commits

Ronny Pfannschmidt committed 3365f22

add metadata to the tarball and docstring to the archive function

  • Participants
  • Parent commits 0063316

Comments (0)

Files changed (1)

File bmst/main.py

 
 
 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)