~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/bzrdir.py

  • Committer: Andrew Bennetts
  • Date: 2010-01-12 02:48:41 UTC
  • mfrom: (4948 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4965.
  • Revision ID: andrew.bennetts@canonical.com-20100112024841-vbudg5ayivfzcwok
Merge lp:bzr, resolving NEWS conflict.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005, 2006, 2007, 2008, 2009 Canonical Ltd
 
1
# Copyright (C) 2005-2010 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
3108
3108
 
3109
3109
    def __init__(self):
3110
3110
        BzrDirMetaFormat1.__init__(self)
 
3111
        # XXX: It's a bit ugly that the network name is here, because we'd
 
3112
        # like to believe that format objects are stateless or at least
 
3113
        # immutable,  However, we do at least avoid mutating the name after
 
3114
        # it's returned.  See <https://bugs.edge.launchpad.net/bzr/+bug/504102>
3111
3115
        self._network_name = None
3112
3116
 
3113
3117
    def __repr__(self):
3256
3260
        args.append(self._serialize_NoneString(repo_format_name))
3257
3261
        args.append(self._serialize_NoneTrueFalse(make_working_trees))
3258
3262
        args.append(self._serialize_NoneTrueFalse(shared_repo))
3259
 
        if self._network_name is None:
3260
 
            self._network_name = \
 
3263
        request_network_name = self._network_name or \
3261
3264
            BzrDirFormat.get_default_format().network_name()
3262
3265
        try:
3263
3266
            response = client.call('BzrDirFormat.initialize_ex_1.16',
3264
 
                self.network_name(), path, *args)
 
3267
                request_network_name, path, *args)
3265
3268
        except errors.UnknownSmartMethod:
3266
3269
            client._medium._remember_remote_is_before((1,16))
3267
3270
            local_dir_format = BzrDirMetaFormat1()
3517
3520
                experimental_pairs.append((key, help))
3518
3521
            else:
3519
3522
                output += wrapped(key, help, info)
3520
 
        output += "\nSee ``bzr help formats`` for more about storage formats."
 
3523
        output += "\nSee :doc:`formats-help` for more about storage formats."
3521
3524
        other_output = ""
3522
3525
        if len(experimental_pairs) > 0:
3523
3526
            other_output += "Experimental formats are shown below.\n\n"
3536
3539
            other_output += \
3537
3540
                "\nNo deprecated formats are available.\n\n"
3538
3541
        other_output += \
3539
 
            "\nSee ``bzr help formats`` for more about storage formats."
 
3542
                "\nSee :doc:`formats-help` for more about storage formats."
3540
3543
 
3541
3544
        if topic == 'other-formats':
3542
3545
            return other_output