Changeset 1518 in tailor


Ignore:
Timestamp:
05/21/08 02:34:26 (5 years ago)
Author:
lele@…
Hash name:
20080521003426-97f81-edb50a6ab354ba11d9308630b0010e147c9d336d
Message:

Don't raise an error when bzr do not find anything to apply
This happens on tailor restarts, when the patch is already applied but
not yet committed on the target.
Also, added a note about working_tree.update() not returning a
conflict flag, even when the conflict actually happened.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vcpx/repository/bzr.py

    r1511 r1518  
    185185        parent_branch = BzrDir.open(self.repository.repository).open_branch() 
    186186        self._working_tree.lock_write() 
    187         self.log.info('Updating to %r', changeset.revision) 
    188187        try: 
    189188            count = self._working_tree.pull(parent_branch, 
    190189                                            stop_revision=changeset.revision) 
     190            # XXX: this does not seem to return a true value on conflicts! 
    191191            conflicts = self._working_tree.update() 
    192192        finally: 
    193193            self._working_tree.unlock() 
    194         self.log.debug("%s updated to %s", 
    195                        ', '.join([e.name for e in changeset.entries]), 
    196                        changeset.revision) 
    197194        try: 
    198195            pulled_revnos = count.new_revno - count.old_revno 
     
    200197            # Prior to 0.15 pull returned a simple integer instead of a result object 
    201198            pulled_revnos = count 
    202         if (pulled_revnos != 1) or conflicts: 
    203             raise ChangesetApplicationFailure('unknown reason') 
    204         return [] # No conflict handling yet 
     199        self.log.info('Updated to %r, applied %d changesets', changeset.revision, count) 
     200        if conflicts: 
     201            # No conflict handling yet 
     202            raise ChangesetApplicationFailure('Unsupported: conflicts') 
     203        return [] 
    205204 
    206205    def _checkoutUpstreamRevision(self, revision): 
Note: See TracChangeset for help on using the changeset viewer.