/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: 2019-06-03 23:48:08 UTC
  • mfrom: (7316 work)
  • mto: This revision was merged to the branch mainline in revision 7328.
  • Revision ID: jelmer@jelmer.uk-20190603234808-15yk5c7054tj8e2b
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
273
273
        for ref in self.get_refs_container().keys():
274
274
            try:
275
275
                branch_name = ref_to_branch_name(ref)
276
 
            except ValueError:
277
 
                continue
278
276
            except UnicodeDecodeError:
279
277
                trace.warning("Ignoring branch %r with unicode error ref", ref)
280
278
                continue
 
279
            except ValueError:
 
280
                continue
281
281
            ret[branch_name] = self.open_branch(ref=ref)
282
282
        return ret
283
283
 
401
401
            raise brz_errors.NotBranchError(path=transport.base)
402
402
        return external_url.startswith("file:")
403
403
 
 
404
    def is_control_filename(self, filename):
 
405
        return (filename == '.git'
 
406
                or filename.startswith('.git/')
 
407
                or filename.startswith('.git\\'))
 
408
 
404
409
 
405
410
class BareLocalGitControlDirFormat(LocalGitControlDirFormat):
406
411
 
410
415
    def get_format_description(self):
411
416
        return "Local Git Repository (bare)"
412
417
 
 
418
    def is_control_filename(self, filename):
 
419
        return False
 
420
 
413
421
 
414
422
class LocalGitDir(GitDir):
415
423
    """An adapter to the '.git' dir used by git."""
443
451
            self.transport = transport.clone('.git')
444
452
        self._mode_check_done = None
445
453
 
446
 
    def is_control_filename(self, filename):
447
 
        return (filename == '.git'
448
 
                or filename.startswith('.git/')
449
 
                or filename.startswith('.git\\'))
450
 
 
451
454
    def _get_symref(self, ref):
452
455
        ref_chain, unused_sha = self._git.refs.follow(ref)
453
456
        if len(ref_chain) == 1: