/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 bzrlib/branchbuilder.py

  • Committer: John Arbash Meinel
  • Date: 2008-07-22 17:15:45 UTC
  • mto: (3514.4.6 merge_lca_multi)
  • mto: This revision was merged to the branch mainline in revision 3590.
  • Revision ID: john@arbash-meinel.com-20080722171545-51t59bf7uij8aftx
Add an action for modifying an existing file

Show diffs side-by-side

added added

removed removed

Lines of Context:
67
67
            to_add_paths = []
68
68
            to_add_file_ids = []
69
69
            to_add_kinds = []
70
 
            to_add_contents = {}
 
70
            new_contents = {}
71
71
            # to_remove = []
72
72
            # to_rename = []
73
73
            for action, info in actions:
77
77
                    to_add_file_ids.append(file_id)
78
78
                    to_add_kinds.append(kind)
79
79
                    if content is not None:
80
 
                        to_add_contents[file_id] = content
 
80
                        new_contents[file_id] = content
 
81
                elif action == 'modify':
 
82
                    file_id, content = info
 
83
                    new_contents[file_id] = content
81
84
            tree.add(to_add_paths, to_add_file_ids, to_add_kinds)
82
 
            for file_id, content in to_add_contents.iteritems():
 
85
            for file_id, content in new_contents.iteritems():
83
86
                tree.put_file_bytes_non_atomic(file_id, content)
84
87
 
85
88
            return tree.commit('commit %s' % (revision_id,), rev_id=revision_id)