~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/bzrdir.py

  • Committer: Jelmer Vernooij
  • Date: 2009-03-28 14:24:46 UTC
  • mfrom: (4211 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4212.
  • Revision ID: jelmer@samba.org-20090328142446-vqi0ksswdurga631
Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
#
13
13
# You should have received a copy of the GNU General Public License
14
14
# along with this program; if not, write to the Free Software
15
 
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
17
"""BzrDir logic. The BzrDir is the basic control directory used by bzr.
18
18
 
838
838
        BzrDir._check_supported(format, _unsupported)
839
839
        return format.open(transport, _found=True)
840
840
 
841
 
    def open_branch(self, unsupported=False):
 
841
    def open_branch(self, unsupported=False, ignore_fallbacks=False):
842
842
        """Open the branch object at this BzrDir if one is present.
843
843
 
844
844
        If unsupported is True, then no longer supported branch formats can
1019
1019
        result_format = self._format.__class__()
1020
1020
        try:
1021
1021
            try:
1022
 
                branch = self.open_branch()
 
1022
                branch = self.open_branch(ignore_fallbacks=True)
1023
1023
                source_repository = branch.repository
1024
1024
                result_format._branch_format = branch._format
1025
1025
            except errors.NotBranchError:
1358
1358
            format = BzrDirFormat.get_default_format()
1359
1359
        return not isinstance(self._format, format.__class__)
1360
1360
 
1361
 
    def open_branch(self, unsupported=False):
 
1361
    def open_branch(self, unsupported=False, ignore_fallbacks=False):
1362
1362
        """See BzrDir.open_branch."""
1363
1363
        from bzrlib.branch import BzrBranchFormat4
1364
1364
        format = BzrBranchFormat4()
1609
1609
            pass
1610
1610
        return False
1611
1611
 
1612
 
    def open_branch(self, unsupported=False):
 
1612
    def open_branch(self, unsupported=False, ignore_fallbacks=False):
1613
1613
        """See BzrDir.open_branch."""
1614
1614
        format = self.find_branch_format()
1615
1615
        self._check_supported(format, unsupported)
1616
 
        return format.open(self, _found=True)
 
1616
        return format.open(self, _found=True, ignore_fallbacks=ignore_fallbacks)
1617
1617
 
1618
1618
    def open_repository(self, unsupported=False):
1619
1619
        """See BzrDir.open_repository."""
2470
2470
        self.snapshot_ie(previous_entries, ie, w, rev_id)
2471
2471
        del ie.text_id
2472
2472
 
2473
 
    @symbol_versioning.deprecated_method(symbol_versioning.one_one)
2474
 
    def get_parents(self, revision_ids):
2475
 
        for revision_id in revision_ids:
2476
 
            yield self.revisions[revision_id].parent_ids
2477
 
 
2478
2473
    def get_parent_map(self, revision_ids):
2479
2474
        """See graph._StackedParentsProvider.get_parent_map"""
2480
2475
        return dict((revision_id, self.revisions[revision_id])