~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/bundle/commands.py

(mbp) tolerate empty limbo and pending-deletion directories (bug 427773)
 (Martin Pool)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2006 Canonical Ltd
 
1
# Copyright (C) 2005-2011 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
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
This is an attempt to take the internal delta object, and represent
18
18
it as a single-file text-only changeset.
20
20
and for applying a changeset.
21
21
"""
22
22
 
23
 
import sys
24
23
from cStringIO import StringIO
25
24
 
26
25
from bzrlib.lazy_import import lazy_import
36
35
""")
37
36
 
38
37
from bzrlib.commands import Command
39
 
from bzrlib.option import Option
40
 
from bzrlib.trace import note
41
38
 
42
39
 
43
40
class cmd_bundle_info(Command):
44
 
    """Output interesting stats about a bundle"""
 
41
    __doc__ = """Output interesting stats about a bundle"""
45
42
 
46
43
    hidden = True
47
44
    takes_args = ['location']
54
51
        from bzrlib import osutils
55
52
        term_encoding = osutils.get_terminal_encoding()
56
53
        bundle_info = read_mergeable_from_url(location)
57
 
        if isinstance(bundle_info, merge_directive._BaseMergeDirective):
 
54
        if isinstance(bundle_info, merge_directive.BaseMergeDirective):
58
55
            bundle_file = StringIO(bundle_info.get_raw_bundle())
59
56
            bundle_info = read_bundle(bundle_file)
60
57
        else: