Commits

ZyX_I  committed 73394b3

doc: Rearranged repo functions

  • Participants
  • Parent commits 19aa131

Comments (0)

Files changed (2)

File doc/aurum.txt

     except |aurum-rf-repo|, |aurum-rf-checkdir| and |aurum-rf-checkremote| 
     accept repository object as its first argument, so it is not mentioned in 
     function descriptions. Here is the list:
+  getcs :: hex -> cs                                          *aurum-rf-getcs*
+    Returns |aurum-changeset| object which has given hash. See also 
+    |aurum-cs.hex|.
+  getwork :: () -> cs                                       *aurum-rf-getwork*
+    Get changeset object for the working directory revision.
+  getchangesets :: () -> [ cs ]                       *aurum-rf-getchangesets*
+    Pull all changesets contained in repository into |aurum-repo.changesets| 
+    dictionary. If this function is not called, then |aurum-repo.changesets| 
+    dictionary contains only changesets that were used at least ones. Returns 
+    list of pulled changesets. This list should be sorted in topological order 
+    (thus meaning that every changeset appears before every its parent) or 
+    |aurum-repo.requires_sort| should be set to true.
+  revrange :: hex, hex -> [ cs ]                           *aurum-rf-revrange*
+    Get revision range (inclusive).
+  updatechangesets :: () -> _                      *aurum-rf-updatechangesets*
+    Updates data stored in repository. Is called automatically if 
+    |aurum-repo.cslist| is not empty when you get the repository object unless 
+    this object is obtained from cash used by |aurum#repository()|.
+  getrevhex :: csdescr -> hex                             *aurum-rf-getrevhex*
+    Given some changeset description (it may be tag, bookmark, branch name, 
+    revision number, ... - whatever VCS supports) get changeset hash.
+    Note that functions mentioned above may support not only revision hashes 
+         in place of {hex} arguments, but also whatever “getrevhex” supports, 
+         but this is not guaranteed. For example, status() accepts revision 
+         number in both mercurial drivers, but though zero is a valid 
+         revision, it is used to indicate absence of an argument and thus you 
+         have to write "0" (String) where you want to write just 0 (Number).
+  gettiphex :: () -> hex                                  *aurum-rf-gettiphex*
+    Get changeset hash of the last revision in a repository.
+  getworkhex :: () -> hex                                *aurum-rf-getworkhex*
+    Get changeset hash of the working directory revision.
+  setcsprop :: cs, propname -> _                          *aurum-rf-setcsprop*
+    Function that adds requested property to given changeset. Is used by 
+    default |aurum-rf-getcsprop| if changeset dictionary does not contain 
+    property with given name.
+  getcsprop :: cs | hex, propname -> propvalue            *aurum-rf-getcsprop*
+    Returns requested changeset property. Can accept either |aurum-changeset| 
+    object or changeset hash. “propname” can be a name of any property 
+    described in |aurum-changeset| section, but it should be normally used for 
+    pulling properties that are not obtained by |aurum-rf-getcs| by default: 
+    “files”, “changes”, “renames”, “copies”, “allfiles”, “chidlren”.
+                                                             *aurum-rf-status*
+  status :: [hex[, hex[, [ file ][, requiresclean]]]] -> {status : [ file ]}
+    Returns dictionary where values are lists of files and keys are 
+    "modified", "added" (new tracked files), "removed" (made untracked, not 
+    necessary deleted from filesystem), "deleted" (just deleted from 
+    filesystem without making files untracked), "unknown" (new untracked 
+    files), "ignored" and "clean" (unmodified).
+    Specifying 0 instead of any optional argument acts like not specifying 
+    this argument.
+    Note: “clean” may be empty unless {requiresclean} argument is present and 
+          true.
+  dirty :: file -> Bool                                       *aurum-rf-dirty*
+    Check whether file is “dirty” (meaning that it has changes that can be 
+    committed).
                                                              *aurum-rf-commit*
   commit :: message[, [ file ][, user[, date[, closebranch]]]] -> _
     Commit changes made to specified files (default depends on VCS, normally 
     removes))”. “closebranch” and “force” arguments have Bool type, “user” and 
     “date” are strings. Neither “user” nor “date” argument should have any 
     normalized form, they just should be accepted by VCS.
+  branch :: branch, force -> _                               *aurum-rf-branch*
+    Create new branch.
+  label :: type, label, hex, force, local -> _                *aurum-rf-label*
+    Label specific revision (if rev is 0 then remove label).
+    Note: if this function accepts label with type {type}, 
+          |aurum-rf-getrepoprop| must be able to list labels of this type in 
+          property "{type}slist".
   update :: hex, force                                       *aurum-rf-update*
     Update working directory to changeset {hex}.
   move :: force, fdir, file -> _                               *aurum-rf-move*
           “filename” key may contain either an absolute filename or pair 
           (revision, filename (relative to repository root)). Second is to be 
           transformed into |aurum://file| path.
-                                                             *aurum-rf-status*
-  status :: [hex[, hex[, [ file ][, requiresclean]]]] -> {status : [ file ]}
-    Returns dictionary where values are lists of files and keys are 
-    "modified", "added" (new tracked files), "removed" (made untracked, not 
-    necessary deleted from filesystem), "deleted" (just deleted from 
-    filesystem without making files untracked), "unknown" (new untracked 
-    files), "ignored" and "clean" (unmodified).
-    Specifying 0 instead of any optional argument acts like not specifying 
-    this argument.
-    Note: “clean” may be empty unless {requiresclean} argument is present and 
-          true.
-  dirty :: file -> Bool                                       *aurum-rf-dirty*
-    Check whether file is “dirty” (meaning that it has changes that can be 
-    committed).
   annotate :: repo, hex, file -> [ rev ]                   *aurum-rf-annotate*
     Returns a list of 3-tuples: ({hex}, {file}, {line-number}), one 3-tuple 
     for each line of the file as it was at given changeset. {hex} must be 
                    can be created/revision can be named.
     url            Remote repository URL. For mercurial it is either 
                    paths.default-push or paths.default whichever is defined.
-  getchangesets :: () -> [ cs ]                       *aurum-rf-getchangesets*
-    Pull all changesets contained in repository into |aurum-repo.changesets| 
-    dictionary. If this function is not called, then |aurum-repo.changesets| 
-    dictionary contains only changesets that were used at least ones. Returns 
-    list of pulled changesets. This list should be sorted in topological order 
-    (thus meaning that every changeset appears before every its parent) or 
-    |aurum-repo.requires_sort| should be set to true.
-  revrange :: hex, hex -> [ cs ]                           *aurum-rf-revrange*
-    Get revision range (inclusive).
-  getcs :: hex -> cs                                          *aurum-rf-getcs*
-    Returns |aurum-changeset| object which has given hash. See also 
-    |aurum-cs.hex|.
-  getcsprop :: cs | hex, propname -> propvalue            *aurum-rf-getcsprop*
-    Returns requested changeset property. Can accept either |aurum-changeset| 
-    object or changeset hash. “propname” can be a name of any property 
-    described in |aurum-changeset| section, but it should be normally used for 
-    pulling properties that are not obtained by |aurum-rf-getcs| by default: 
-    “files”, “changes”, “renames”, “copies”, “allfiles”, “chidlren”.
-  setcsprop :: cs, propname -> _                          *aurum-rf-setcsprop*
-    Function that adds requested property to given changeset. Is used by 
-    default |aurum-rf-getcsprop| if changeset dictionary does not contain 
-    property with given name.
-  getrevhex :: csdescr -> hex                             *aurum-rf-getrevhex*
-    Given some changeset description (it may be tag, bookmark, branch name, 
-    revision number, ... - whatever VCS supports) get changeset hash.
-    Note that functions mentioned above may support not only revision hashes 
-         in place of {hex} arguments, but also whatever “getrevhex” supports, 
-         but this is not guaranteed. For example, status() accepts revision 
-         number in both mercurial drivers, but though zero is a valid 
-         revision, it is used to indicate absence of an argument and thus you 
-         have to write "0" (String) where you want to write just 0 (Number).
-  gettiphex :: () -> hex                                  *aurum-rf-gettiphex*
-    Get changeset hash of the last revision in a repository.
-  getworkhex :: () -> hex                                *aurum-rf-getworkhex*
-    Get changeset hash of the working directory revision.
-  getwork :: () -> cs                                       *aurum-rf-getwork*
-    Get changeset object for the working directory revision.
-  updatechangesets :: () -> _                      *aurum-rf-updatechangesets*
-    Updates data stored in repository. Is called automatically if 
-    |aurum-repo.cslist| is not empty when you get the repository object unless 
-    this object is obtained from cash used by |aurum#repository()|.
   reltorepo :: path -> path                               *aurum-rf-reltorepo*
     Turn absolute or relative to current directory path into relative to 
     repository root one.
-  branch :: branch, force -> _                               *aurum-rf-branch*
-    Create new branch.
-  label :: type, label, hex, force, local -> _                *aurum-rf-label*
-    Label specific revision (if rev is 0 then remove label).
-    Note: if this function accepts label with type {type}, 
-          |aurum-rf-getrepoprop| must be able to list labels of this type in 
-          property "{type}slist".
 The following functions do not accept repo argument:
   repo :: path -> repo                                         *aurum-rf-repo*
     Creates new repository object using repository located at given path.

File plugin/aurum/repo.vim

 endfunction
 "▶2 changesets
 let s:iterfuncs.changesets=s:iterfuncs.revrange
+"▶1 getrevhex
+function s:deffuncs.getrevhex(repo, rev)
+    return a:rev.''
+endfunction
 "▶1 dirty :: repo, file → Bool
 function s:deffuncs.dirty(repo, file)
     let status=a:repo.functions.status(a:repo, 0, 0, [a:file])
 function s:deffuncs.checkremote(...)
     return 0
 endfunction
-"▶1 getrevhex
-function s:deffuncs.getrevhex(repo, rev)
-    return a:rev.''
-endfunction
 "▶1 getdriver :: path, type → Maybe driver
 function s:F.getdriver(path, ptype)
     for driver in values(s:drivers)