~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/cmd_version_info.py

  • Committer: Patch Queue Manager
  • Date: 2014-04-09 13:36:25 UTC
  • mfrom: (6592.1.2 1303879-py27-issues)
  • Revision ID: pqm@pqm.ubuntu.com-20140409133625-s24spv3kha2w2860
(vila) Fix python-2.7.6 test failures. (Vincent Ladeuil)

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
"""Commands for generating snapshot information about a bzr tree."""
18
18
 
 
19
from __future__ import absolute_import
 
20
 
19
21
from bzrlib.lazy_import import lazy_import
20
22
 
21
23
lazy_import(globals(), """
105
107
        if format is None:
106
108
            format = version_info_formats.format_registry.get()
107
109
 
108
 
        wt = None
109
110
        try:
110
111
            wt = workingtree.WorkingTree.open_containing(location)[0]
111
112
        except errors.NoWorkingTree:
112
113
            b = branch.Branch.open(location)
 
114
            wt = None
113
115
        else:
114
116
            b = wt.branch
115
117
 
116
 
        if all or template:
 
118
        if all:
117
119
            include_history = True
118
120
            check_clean = True
119
121
            include_file_revisions = True
 
122
        if template:
 
123
            include_history = True
 
124
            include_file_revisions = True
 
125
            if '{clean}' in template:
 
126
                check_clean = True
120
127
 
121
128
        if revision is not None:
122
129
            revision_id = revision[0].as_revision_id(b)