/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/plugins/stats/cmds.py

  • Committer: Gustav Hartvigsson
  • Date: 2021-01-09 21:36:27 UTC
  • Revision ID: gustav.hartvigsson@gmail.com-20210109213627-h1xwcutzy9m7a99b
Added 'Case Preserving Working Tree Use Cases' from Canonical Wiki

* Addod a page from the Canonical Bazaar wiki
  with information on the scmeatics of case
  perserving filesystems an a case insensitive
  filesystem works.
  
  * Needs re-work, but this will do as it is the
    same inforamoton as what was on the linked
    page in the currint documentation.

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
16
16
"""A Simple bzr plugin to generate statistics about the history."""
17
17
 
18
 
from __future__ import absolute_import
 
18
import operator
19
19
 
20
20
from ... import (
21
21
    branch,
59
59
            info[2][username] = info[2].setdefault(username, 0) + 1
60
60
    res = [(len(revs), revs, emails, fnames)
61
61
           for revs, emails, fnames in committer_to_info.values()]
62
 
    res.sort(reverse=True)
 
62
 
 
63
    def key_fn(item):
 
64
        return item[0], list(item[2].keys())
 
65
    res.sort(reverse=True, key=key_fn)
63
66
    return res
64
67
 
65
68
 
279
282
 
280
283
    encoding_type = 'replace'
281
284
 
 
285
    hidden = True
 
286
 
282
287
    def run(self, location='.'):
283
288
        try:
284
289
            wt = workingtree.WorkingTree.open_containing(location)[0]
308
313
    with ui.ui_factory.nested_progress_bar() as pb:
309
314
        with repository.lock_read():
310
315
            i = 0
311
 
            for delta in repository.get_deltas_for_revisions(revs):
 
316
            for delta in repository.get_revision_deltas(revs):
312
317
                pb.update("classifying commits", i, len(revs))
313
318
                for c in classify_delta(delta):
314
319
                    if c not in ret:
357
362
                    if ps is not None and r != NULL_REVISION]
358
363
        revs = repository.get_revisions(ancestry)
359
364
        with ui.ui_factory.nested_progress_bar() as pb:
360
 
            iterator = zip(revs, repository.get_deltas_for_revisions(revs))
 
365
            iterator = zip(revs, repository.get_revision_deltas(revs))
361
366
            for i, (rev, delta) in enumerate(iterator):
362
367
                pb.update("analysing revisions", i, len(revs))
363
368
                # Don't count merges