/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to tools/riodemo.py

  • Committer: Jelmer Vernooij
  • Date: 2020-05-06 02:13:25 UTC
  • mfrom: (7490.7.21 work)
  • mto: This revision was merged to the branch mainline in revision 7501.
  • Revision ID: jelmer@jelmer.uk-20200506021325-awbmmqu1zyorz7sj
Merge 3.1 branch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 
3
3
 
4
4
# \subsection{Example usage}
5
 
6
 
# \textbf{XXX:} Move these to object serialization code. 
 
5
#
 
6
# \textbf{XXX:} Move these to object serialization code.
7
7
 
8
8
def write_revision(writer, revision):
9
9
    s = Stanza(revision=revision.revision_id,
10
 
               committer=revision.committer, 
 
10
               committer=revision.committer,
11
11
               timezone=long(revision.timezone),
12
12
               timestamp=long(revision.timestamp),
13
13
               inventory_sha1=revision.inventory_sha1,
18
18
        s.add(prop_name, prop_value)
19
19
    writer.write_stanza(s)
20
20
 
 
21
 
21
22
def write_inventory(writer, inventory):
22
23
    s = Stanza(inventory_version=7)
23
24
    writer.write_stanza(s)
32
33
            attr_val = getattr(ie, attr, None)
33
34
            if attr == 'executable' and attr_val == 0:
34
35
                continue
35
 
            if attr == 'parent_id' and attr_val == 'TREE_ROOT':
 
36
            if attr == 'parent_id' and attr_val == b'TREE_ROOT':
36
37
                continue
37
38
            if attr_val is not None:
38
39
                s.add(attr, attr_val)