Package pybaz
[frames] | no frames]

Source Code for Package pybaz

  1  # arch-tag: david@allouche.net - 2003-11-24 15:35:19 050584000 
  2  # Copyright (C) 2003 David Allouche <david@allouche.net> 
  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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
 17   
 18  """High level bindings for the Arch revision control system 
 19   
 20  Archive Namespace Class Hierarchy 
 21  --------------------------------- 
 22   
 23  :group Namespace Classes: ArchiveLocation, Archive, Category, Branch, Version, 
 24      Revision 
 25   
 26  :group Abstract Namespace Classes: NamespaceObject, Setupable, Package, 
 27      CategoryIterable, BranchIterable, VersionIterable, RevisionIterable, 
 28      ArchiveItem, CategoryItem, BranchItem, VersionItem 
 29   
 30  :group Archive-Related Classes: RevisionFile, NameParser 
 31   
 32  The `Archive`, `Category`, `Branch`, `Version` and `Revision` classes 
 33  model the Arch namespace. Namespace objects can be created without the 
 34  corresponding archive structure being available. 
 35   
 36  Since they form a hierarchy of containers with shared methods and 
 37  properties in both directions, but do not have any subclass 
 38  relationship, they are defined using a collection of mixin classes. 
 39   
 40  The `RevisionIterable`, `VersionIterable`, `BranchIterable` and 
 41  `CategoryIterable` classes define the features which are inherited by 
 42  enclosing archive containers. Many methods in that hierarchy are 
 43  defined abstract (they raise UnimplementedError). They are always 
 44  overriden and are required to prevent legitimate PyChecker warnings. 
 45   
 46  The `ArchiveItem`, `CategoryItem`, `BranchItem` and `VersionItem` 
 47  classes provides features which are inherited by enclosed archive 
 48  items. The `NamespaceObject`, `Setupable` and `Package` classes 
 49  provide miscellaneous features and define aspects which do not fit 
 50  within the rest of the hierarchy. 
 51   
 52  :group Source Tree Classes: SourceTree, ForeignTree, ArchSourceTree, 
 53      LibraryTree, WorkingTree 
 54   
 55  :group Changeset and Log Classes: Changeset, Patchlog, LogMessage 
 56   
 57  :group Incremental Ouput: ChangesetCreation, ChangesetApplication, 
 58      Chatter, TreeChange, FileAddition, FileDeletion, FileModification, 
 59      FilePermissionsChange, FileRename, SymlinkModification, 
 60      MergeOutcome, PatchConflict 
 61   
 62  :group Archive Functions: archives, iter_archives, make_archive, 
 63      register_archive, get, get_patch, make_continuation 
 64   
 65  :group Source Tree Functions: init_tree, in_source_tree, tree_root 
 66   
 67  :group User Functions: default_archive, my_id, set_my_id 
 68   
 69  :group Changeset Generation Functions: changeset, delta, iter_delta 
 70   
 71  :group Pika Escaping Functions: name_escape, name_unescape 
 72   
 73  :group Revision Library Functions: register_revision_library, 
 74      unregister_revision_library, iter_revision_libraries, library_archives, 
 75      iter_library_archives 
 76   
 77  :group Incremental Output Functions: classify_chatter, 
 78      classify_changeset_creation, classify_changeset_application 
 79   
 80  :group Obsolete Utility Functions: filter_archive_logs, filter_revisions, 
 81      grep_summary, grep_summary_interactive, last_revision, map_name_id, 
 82      revision_which_created, revisions_merging, suspected_move, temphack 
 83   
 84  :var backend: Backend controller. 
 85   
 86      This object is used to configure the backend system: name of the 
 87      executable, process handling strategy and command-line logging. 
 88   
 89  :type backend: `backends.commandline.CommandLineBackend` 
 90  """ 
 91   
 92  __all__ = [ 
 93      'errors', 
 94      'pathname', 
 95      'compat', 
 96      'backends', 
 97      # Deprecated modules 
 98      'util', 
 99      ] 
100   
101  from _output import * 
102  from _builtin import * 
103  from _escaping import * 
104  from _location import * 
105   
106 -def _import_builtin():
107 # Along with the monkey-patch in mypydoc, this causes Epydoc to 108 # document the public interface as part of the pybaz package 109 # instead of the pybaz._builtin module (where it is actually 110 # defined). This is provides no useful runtime functionality, and 111 # is purely needed for documentation purposes. 112 import _builtin 113 import _output 114 import _escaping 115 all = _builtin.__all__ 116 all += _output.__all__ 117 all += _escaping.__all__ 118 all += _location.__all__ 119 for name in all: 120 getattr(_builtin, name).__module__ = __name__ 121 __all__.extend(all) 122 del _builtin.public
123 124 _import_builtin() 125 # Since this function is only useful for documentation, delete it so 126 # Epydoc will not show it in the private listing. There is really 127 # little point in documenting documentation-related stuff... 128 del _import_builtin 129 130 # Deprecated public stuff from before we used __all__. 131 from errors import ExecProblem 132 __all__.extend(['ExecProblem']) 133 from pathname import PathName, FileName, DirName 134 __all__.extend(['PathName', 'FileName', 'DirName']) 135