~loggerhead-team/loggerhead/trunk-rich

« back to all changes in this revision

Viewing changes to loggerhead/wholehistory.py

  • Committer: Martin Albisetti
  • Date: 2008-12-22 19:33:12 UTC
  • Revision ID: argentina@gmail.com-20081222193312-b5ql8ksk75rqgxbb
Updated NEWS

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# Cache the whole history data needed by loggerhead about a branch.
 
2
#
 
3
# This program is free software; you can redistribute it and/or modify
 
4
# it under the terms of the GNU General Public License as published by
 
5
# the Free Software Foundation; either version 2 of the License, or
 
6
# (at your option) any later version.
 
7
#
 
8
# This program is distributed in the hope that it will be useful,
 
9
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
10
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
11
# GNU General Public License for more details.
 
12
#
 
13
# You should have received a copy of the GNU General Public License
 
14
# along with this program; if not, write to the Free Software
 
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
16
#
2
17
 
3
18
import logging
4
19
import time
26
41
 
27
42
    last_revid = branch.last_revision()
28
43
 
29
 
    log = logging.getLogger('loggerhead.%s' % (branch.nick,))
 
44
    log = logging.getLogger('loggerhead.%s' %
 
45
                            branch.get_config().get_nickname())
30
46
 
31
47
    graph = branch.repository.get_graph()
32
48
    parent_map = dict(((key, value) for key, value in
57
73
        for parent in _revision_graph[revid]:
58
74
            _where_merged.setdefault(parent, set()).add(revid)
59
75
 
60
 
    log.info('built revision graph cache: %r secs' % (time.time() - z,))
 
76
    log.info('built revision graph cache: %r secs' % (time.time() - z))
61
77
 
62
78
    return (_revision_graph, _full_history, _revision_info,
63
79
            _revno_revid, _merge_sort, _where_merged)