/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/tests/test_foreign.py

  • Committer: Jelmer Vernooij
  • Date: 2009-05-14 03:41:56 UTC
  • mto: This revision was merged to the branch mainline in revision 4376.
  • Revision ID: jelmer@samba.org-20090514034156-v4uflz8c789talme
Return BranchPushResult instance from lossy_push() and make dpush print 
"Pushed up to revision X." messages.

Show diffs side-by-side

added added

removed removed

Lines of Context:
110
110
        return isinstance(target, DummyForeignVcsBranch)
111
111
 
112
112
    def lossy_push(self, stop_revision=None):
 
113
        result = branch.BranchPushResult()
 
114
        result.source_branch = self.source
 
115
        result.target_branch = self.target
 
116
        result.old_revno, result.old_revid = self.target.last_revision_info()
113
117
        self.source.lock_read()
114
118
        try:
115
119
            # This just handles simple cases, but that's good enough for tests
152
156
                    revid, revidmap[revid])
153
157
        finally:
154
158
            self.source.unlock()
155
 
        return revidmap
 
159
        result.new_revno, result.new_revid = self.target.last_revision_info()
 
160
        result.revidmap = revidmap
 
161
        return result
156
162
 
157
163
 
158
164
class DummyForeignVcsBranchFormat(branch.BzrBranchFormat6):