Changeset 1022 in tailor
- Timestamp:
- 11/28/05 22:07:37 (7 years ago)
- Hash name:
- 20051128210737-f2f79-2baf4663424c04e742bf7e2ab94ecf29eaaed69f
- File:
-
- 1 edited
-
vcpx/bzr.py (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
vcpx/bzr.py
r993 r1022 16 16 from target import SyncronizableTargetWorkingDir, TargetInitializationFailure 17 17 from bzrlib.branch import Branch 18 from bzrlib.delta import compare_trees 18 19 19 20 class BzrWorkingDir(UpdatableSourceWorkingDir, SyncronizableTargetWorkingDir): … … 120 121 # entries; and Branch.add complains if a file is already 121 122 # versioned. So go through the list and sort out entries that 122 # is already versioned, since there is no need to add them. 123 # Do not try to catch any errors from Branch.add, since the 124 # they are _real_ errors. 123 # is already versioned, since there is no need to add them. A 124 # file can also already have been marked to be added in this 125 # changeset. Remove those files too. Do not try to catch any 126 # errors from Branch.add, since the they are _real_ errors. 125 127 new_entries = [] 126 128 inv = self._b.get_inventory(self._b.last_revision()) 129 added = [new[0] for new in compare_trees(self._b.revision_tree(self._b.last_revision()), self._b.working_tree()).added] 127 130 for e in entries: 128 if not inv.has_filename(e) :131 if not inv.has_filename(e) and not e in added: 129 132 new_entries.extend([e]) 130 133 else: … … 133 136 if len(new_entries) == 0: 134 137 return 135 self.log.info('Adding %s...', ', '.join( entries))138 self.log.info('Adding %s...', ', '.join(new_entries)) 136 139 self._b.add(new_entries) 137 140 … … 178 181 revision_id = "%s-%s-%s" % (email, compact_date(timestamp), 179 182 hexlify(rand_bytes(8))) 180 self._b. commit(logmessage, committer=author,183 self._b.working_tree().commit(logmessage, committer=author, 181 184 specific_files=entries, rev_id=revision_id, 182 185 verbose=self.repository.projectref().verbose,
Note: See TracChangeset
for help on using the changeset viewer.
