/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/git/dir.py

  • Committer: Jelmer Vernooij
  • Date: 2020-03-22 18:52:18 UTC
  • mto: (7490.7.7 work)
  • mto: This revision was merged to the branch mainline in revision 7501.
  • Revision ID: jelmer@jelmer.uk-20200322185218-4q1r1g0gof7ya53j
Fix reference handling.

Show diffs side-by-side

added added

removed removed

Lines of Context:
298
298
        """
299
299
        return UseExistingRepository(self.find_repository())
300
300
 
 
301
    def branch_names(self):
 
302
        from .refs import ref_to_branch_name
 
303
        ret = []
 
304
        for ref in self.get_refs_container().keys():
 
305
            try:
 
306
                branch_name = ref_to_branch_name(ref)
 
307
            except UnicodeDecodeError:
 
308
                trace.warning("Ignoring branch %r with unicode error ref", ref)
 
309
                continue
 
310
            except ValueError:
 
311
                continue
 
312
            ret.append(branch_name)
 
313
        return ret
 
314
 
301
315
    def get_branches(self):
302
316
        from .refs import ref_to_branch_name
303
317
        ret = {}