Martin Vejnár committed 46384cd

Added some documentation and fixed some typos.

  • Participants
  • Parent commits fe8e355

Comments (0)

Files changed (1)

 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <>.
-'''create and manage versioned repository dependencies'''
+'''create and manage versioned repository dependencies
+For each revision there is an associated list of dependencies. Each entry
+fully specifies the state of a dependency; it lists its alias,
+the path to the directory it should be located in, and its revision.
+An alias is used to refer to a particular dependency across all revisions.
+Every alias is associated with a remote location or a command, from or with
+which the dependency can be fetched.
+Dependency lists and alias mapping are both stored in a versioned file
+called '.hgdeps'. The file is divided to sections, each of which begins
+with '[SECTIONNAME]' header.
+Special section 'aliases' contains alias mapping. Each line consists
+of alias name, remote repository type, and its remote location.
+The lines are parsed with shlex. An example:
+    [aliases]
+    spam hg
+    eggs cmd 'svn co$rev $dest'
+Aliases can be managed using 'hg depalias', 'hg depaliases',
+and 'hg deprmalias' commands.
+The rest of the sections represent dependency lists. The name of a section
+should be a hexadecimal nodeid located in the local repository.
+    [c1d2ab11121e30a80d4703969b81d3db8be4ac0d]
+    6976733213056a95ab3395fb4663c10987606814 spam lib/spam
+    73986 eggs lib/contrib/bacon/eggs
+Use 'hg dep' command to move dependencies around the working dir.
+The '.hgdeps' file can be automatically updated using 'hg depci'.
+Use 'hg depup' after 'hg up' to update dependencies according
+to the proper dependency list.
 import os
 import os.path
     Should the lookup fail, REV is assumed to identify a revision.
     If REV is not specified, current revision is used.
-    The long and the short form of a revision identifier are both used
-    to lookup the dependency list. If the lookup fails, the search continues
+    The long form of a revision identifier is used to lookup
+    the dependency list. If the lookup fails, the search continues
     with the parent revision. The search terminates at the first merge.
     If a dependency list is successfully retrieved, the dependencies
         if wlock: wlock.release()
 def depstatus(ui, repo):
-    '''show changes in the dependency list
+    '''show changes to the working dependency list
     Show status of dependencies in the dependency list.
     '''delete dependencies
     The specified dependencies are completely removed from the disk and
-    are not save to '.hg/deps' directory.
+    are not saved to '.hg/deps' directory.
     wlock = lock = None