~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: 2016-01-31 13:36:59 UTC
  • mfrom: (6613.1.5 1538480-match-hostname)
  • Revision ID: pqm@pqm.ubuntu.com-20160131133659-ouy92ee2wlv9xz8m
(vila) Use ssl.match_hostname instead of our own. (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)