/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/tsort.py

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2018-07-04 12:50:55 UTC
  • mfrom: (7027.2.8 git-fixes)
  • Revision ID: breezy.the.bot@gmail.com-20180704125055-8nni25pn2439p48v
Fix eol handling in knits on Python 3, port fastimport plugin to Python 3.

Merged from https://code.launchpad.net/~jelmer/brz/fastimport-fixes/+merge/348924

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
# along with this program; if not, write to the Free Software
15
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
 
 
18
17
"""Topological sorting routines."""
19
18
 
20
 
 
21
 
from bzrlib import (
 
19
from __future__ import absolute_import
 
20
 
 
21
 
 
22
from . import (
22
23
    errors,
23
24
    graph as _mod_graph,
24
25
    revision as _mod_revision,
177
178
        revision number sequences in the output. See the output description of
178
179
        the MergeSorter docstring for details.
179
180
    :result: See the MergeSorter docstring for details.
180
 
    node identifiers can be any hashable object, and are typically strings.
 
181
 
 
182
    Node identifiers can be any hashable object, and are typically strings.
181
183
    """
182
184
    return MergeSorter(graph, branch_tip, mainline_revisions,
183
185
        generate_revno).sorted()
361
363
        # we need to do a check late in the process to detect end-of-merges
362
364
        # which requires the parents to be accessible: its easier for now
363
365
        # to just keep the original graph around.
364
 
        self._original_graph = dict(self._graph.items())
 
366
        self._original_graph = self._graph.copy()
365
367
        # we need to know the revision numbers of revisions to determine
366
368
        # the revision numbers of their descendants
367
369
        # this is a graph from node to [revno_tuple, first_child]