/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 git_remote_helper.py

  • Committer: Jelmer Vernooij
  • Date: 2018-03-02 01:59:40 UTC
  • mfrom: (0.200.1791 work)
  • mto: (0.200.1795 work)
  • mto: This revision was merged to the branch mainline in revision 6960.
  • Revision ID: jelmer@jelmer.uk-20180302015940-41gwnoymxc2go3bq
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
114
114
        except NoRepositoryPresent:
115
115
            repo = self.remote_dir.create_repository()
116
116
        object_store = get_object_store(repo)
117
 
        object_store.lock_read()
118
 
        try:
 
117
        with object_store.lock_read():
119
118
            refs = get_refs_container(self.remote_dir, object_store)
120
119
            for ref, git_sha1 in refs.as_dict().iteritems():
121
120
                ref = ref.replace("~", "_")
122
121
                outf.write("%s %s\n" % (git_sha1, ref))
123
122
            outf.write("\n")
124
 
        finally:
125
 
            object_store.unlock()
126
123
 
127
124
    def cmd_option(self, outf, argv):
128
125
        outf.write("unsupported\n")