~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/__init__.py

  • Committer: Jelmer Vernooij
  • Date: 2011-09-12 09:51:52 UTC
  • mfrom: (6129 +trunk)
  • mto: This revision was merged to the branch mainline in revision 6130.
  • Revision ID: jelmer@samba.org-20110912095152-04atttpiqgn2lzjw
merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
2645
2645
            format = bzrdir.format_registry.make_bzrdir(format)
2646
2646
        return format
2647
2647
 
 
2648
    def resolve_format(self, format):
 
2649
        """Resolve an object to a ControlDir format object.
 
2650
 
 
2651
        The initial format object can either already be
 
2652
        a ControlDirFormat, None (for the default format),
 
2653
        or a string with the name of the control dir format.
 
2654
 
 
2655
        :param format: Object to resolve
 
2656
        :return A ControlDirFormat instance
 
2657
        """
 
2658
        if format is None:
 
2659
            format = 'default'
 
2660
        if isinstance(format, basestring):
 
2661
            format = bzrdir.format_registry.make_bzrdir(format)
 
2662
        return format
 
2663
 
2648
2664
    def make_bzrdir(self, relpath, format=None):
2649
2665
        try:
2650
2666
            # might be a relative or absolute path