/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 breezy/tests/per_branch/test_push.py

  • Committer: Jelmer Vernooij
  • Date: 2019-08-11 13:33:45 UTC
  • mfrom: (7379 work)
  • mto: This revision was merged to the branch mainline in revision 7389.
  • Revision ID: jelmer@jelmer.uk-20190811133345-dp9j3c569vxj4l9y
merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
141
141
        source.add(['a'])
142
142
        source.commit('a')
143
143
 
144
 
        source.branch.lock_read()
145
 
        try:
146
 
            target.lock_write()
147
 
            try:
148
 
                source.branch.push(
149
 
                    target, stop_revision=source.last_revision())
150
 
            finally:
151
 
                target.unlock()
152
 
        finally:
153
 
            source.branch.unlock()
 
144
        with source.branch.lock_read(), target.lock_write():
 
145
            source.branch.push(
 
146
                target, stop_revision=source.last_revision())
154
147
 
155
148
    def test_push_within_repository(self):
156
149
        """Push from one branch to another inside the same repository."""