| 1 | # Copyright (C) 2005-2010 Canonical Ltd |
| 2 | # Copyright (C) 2018-2025 Breezy Developers |
| 3 | # |
| 4 | # This program is free software; you can redistribute it and/or modify |
| 5 | # it under the terms of the GNU General Public License as published by |
| 6 | # the Free Software Foundation; either version 2 of the License, or |
| 7 | # (at your option) any later version. |
| 8 | # |
| 9 | # This program is distributed in the hope that it will be useful, |
| 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | # GNU General Public License for more details. |
| 13 | # |
| 14 | # You should have received a copy of the GNU General Public License |
| 15 | # along with this program; if not, write to the Free Software |
| 16 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 17 | |
| 18 | """Graph algorithms for version control systems. |
| 19 | |
| 20 | This package contains graph-related algorithms that are useful for |
| 21 | version control systems, including: |
| 22 | |
| 23 | - Topological sorting (tsort) |
| 24 | - Graph operations (graph) |
| 25 | """ |
| 26 | |
| 27 | __all__ = [ |
| 28 | "BaseVersionedFile", |
| 29 | "DictParentsProvider", |
| 30 | "FrozenHeadsCache", |
| 31 | "Graph", |
| 32 | "KnownGraph", |
| 33 | "MultiMemoryVersionedFile", |
| 34 | "MultiVersionedFile", |
| 35 | "invert_parent_map", |
| 36 | "topo_sort", |
| 37 | ] |
| 38 | |
| 39 | __version__ = (0, 3, 2) |
| 40 | |
| 41 | # Re-export commonly used functions and classes |
| 42 | from .graph import ( |
| 43 | DictParentsProvider, |
| 44 | FrozenHeadsCache, |
| 45 | Graph, |
| 46 | invert_parent_map, |
| 47 | ) |
| 48 | from .known_graph import KnownGraph |
| 49 | from .tsort import topo_sort |