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

  • Committer: Eric Anderson
  • Date: 2008-11-25 01:45:22 UTC
  • mto: (0.200.116 trunk)
  • mto: This revision was merged to the branch mainline in revision 6960.
  • Revision ID: eric@pixelwareinc.com-20081125014522-leeq8vts9nv3awjm
When reading branch use active branch instead of first branch.

This allows us to interact with whatever is set as the current active 
branch instead of being limited to only the first branch (master). 
Useful for creating a branch from somewhere other than master.

Limited in its usefulness as I believe git only allows switching 
branches in a non-bare repositories and most trees being branched from 
are bare repositories. Also requiring the source repository to switch
its active branch is pretty intrusive. But something is better than
nothing.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
"""A grouping of Exceptions for bzr-git"""
18
18
 
19
19
from bzrlib import errors as bzr_errors
20
 
from dulwich import errors as git_errors
21
20
 
22
21
 
23
22
class BzrGitError(bzr_errors.BzrError):
33
32
        self.command = command
34
33
        self.returncode = returncode
35
34
        self.stderr = stderr
36
 
 
37
 
 
38
 
class NoSuchRef(BzrGitError):
39
 
    """Raised when a ref can not be found.""" 
40
 
 
41
 
    _fmt = "The ref %(ref)s was not found."
42
 
    
43
 
    def __init__(self, ref):
44
 
        self.ref = ref
45
 
 
46
 
class LightWeightCheckoutsNotSupported(BzrGitError):
47
 
    _fmt = "bzr-git does not support creating lightweight checkouts at the moment."