~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/bundle/commands.py

  • Committer: John Arbash Meinel
  • Date: 2009-06-12 18:05:15 UTC
  • mto: (4371.4.5 vila-better-heads)
  • mto: This revision was merged to the branch mainline in revision 4449.
  • Revision ID: john@arbash-meinel.com-20090612180515-t0cwbjsnve094oik
Add a failing test for handling nodes that are in the same linear chain.

It fails because the ancestry skipping causes us to miss the fact that the two nodes
are actually directly related. We could check at the beginning, as the 
code used to do, but I think that will be incomplete for the more-than-two
heads cases.

Show diffs side-by-side

added added

removed removed

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