~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to __init__.py

  • Committer: John Arbash Meinel
  • Date: 2005-07-02 06:35:00 UTC
  • mto: (0.5.85) (1185.82.1 bzr-w-changeset)
  • mto: This revision was merged to the branch mainline in revision 1738.
  • Revision ID: john@arbash-meinel.com-20050702063459-031705c159631d21
A couple more fixups, it seems actually capable now of writing out a changeset, and reading it back.

Show diffs side-by-side

added added

removed removed

Lines of Context:
92
92
    def run(self, filename=None):
93
93
        import sys, read_changeset
94
94
        from bzrlib.xml import pack_xml
 
95
        from bzrlib.branch import find_branch
 
96
 
 
97
        b = find_branch('.')
 
98
 
95
99
        if filename is None or filename == '-':
96
100
            f = sys.stdin
97
101
        else:
98
102
            f = open(filename, 'U')
99
103
 
100
 
        cset_info = read_changeset.read_changeset(f)
 
104
        cset_info, cset_tree = read_changeset.read_changeset(f, b)
101
105
        print cset_info
102
 
        cset = cset_info.get_changeset()
103
 
        print cset.entries
104
 
        for rev_info in cset_info.revisions:
105
 
            rev = rev_info.as_revision()
 
106
        print cset_tree
 
107
        for rev in cset_info.real_revisions:
106
108
            pack_xml(rev, sys.stdout)
107
109
 
108
110
class cmd_apply_changeset(bzrlib.commands.Command):