~ubuntu-branches/ubuntu/trusty/bzr-xmloutput/trusty

« back to all changes in this revision

Viewing changes to infoxml.py

  • Committer: Package Import Robot
  • Author(s): Jelmer Vernooij
  • Date: 2012-02-21 11:30:46 UTC
  • Revision ID: package-import@ubuntu.com-20120221113046-n854cxkvrn6upq61
Tags: 0.8.8+bzr160-2
* Add patches to improve compatibility with newer versions of bzr:
 + 01_no_inventory: Don't rely on inventories being available
 + 02_elementtree: Use correct location of elementtree. Closes: #660728
 + 03_info_controldir: Fix support for 'bzr xmlinfo' in empty control
   directories.
 + 04_no_revision_history: Avoid using deprecated `Branch.revision_history`
   call.

Show diffs side-by-side

added added

removed removed

Lines of Context:
102
102
        verbose = 1
103
103
    if verbose is True:
104
104
        verbose = 2
105
 
    layout = info.describe_layout(repository, branch, working)
 
105
    layout = info.describe_layout(repository, branch, working, control)
106
106
    formats = info.describe_format(control, repository,
107
107
                                   branch, working).split(' or ')
108
108
    outfile.write('<layout>%s</layout>' % layout)
216
216
    """Show missing revisions in working tree."""
217
217
    branch = working.branch
218
218
    basis = working.basis_tree()
219
 
    work_inv = working.inventory
220
219
    branch_revno, branch_last_revision = branch.last_revision_info()
221
220
    try:
222
221
        tree_last_id = working.get_parent_ids()[0]
233
232
def _show_working_stats_xml(working, outfile):
234
233
    """Show statistics about a working tree."""
235
234
    basis = working.basis_tree()
236
 
    work_inv = working.inventory
237
235
    delta = working.changes_from(basis, want_unchanged=True)
238
236
 
239
237
    outfile.write('<working_tree_stats>')
254
252
    outfile.write('<ignored>%d</ignored>' % ignore_cnt)
255
253
 
256
254
    dir_cnt = 0
257
 
    for file_id in work_inv:
258
 
        if (work_inv.get_file_kind(file_id) == 'directory' and
259
 
            not work_inv.is_root(file_id)):
 
255
    for path, entry in working.iter_entries_by_dir():
 
256
        if entry.kind == 'directory' and entry.parent_id is not None:
260
257
            dir_cnt += 1
261
258
    outfile.write('<versioned_subdirectories>%d</versioned_subdirectories>' %
262
259
                 (dir_cnt))