From: Frank Terbeck <ft@bewatermyfriend.org>
To: zsh-workers@sunsite.dk
Subject: PATCH: (4/5) contrib.yo: updates for get-revision, %i and %m
Date: Mon, 6 Apr 2009 19:45:37 +0200 [thread overview]
Message-ID: <1239039938-20782-5-git-send-email-ft@bewatermyfriend.org> (raw)
In-Reply-To: <1239039938-20782-1-git-send-email-ft@bewatermyfriend.org>
---
Doc/Zsh/contrib.yo | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/Doc/Zsh/contrib.yo b/Doc/Zsh/contrib.yo
index 2eb26ab..7412f81 100644
--- a/Doc/Zsh/contrib.yo
+++ b/Doc/Zsh/contrib.yo
@@ -579,6 +579,17 @@ the default is to use the not-that-simple code, which is potentially a lot
slower but might be more accurate in all possible cases. This style is only
used by the tt(bzr) backend.
)
+kindex(get-revision)
+item(tt(get-revision))(
+If set to true, vcs_info goes the extra mile to figure out the revision of
+a repository's work tree (currently for the tt(git) and tt(hg) backends,
+where this kind of information is not always vital). For tt(git), the
+hash value of the currently checked out commit is available via the tt(%i)
+expansion. With tt(hg), the local revision number is available via tt(%i)
+and the corresponding global hash is available via tt(%m).
+If this style is set in the tt(hg) context, the backend supports the
+branchformat style.
+)
kindex(use-prompt-escapes)
item(tt(use-prompt-escapes))(
Determines if we assume that the assembled
@@ -604,6 +615,7 @@ sitem(tt(unstagedstr))((string: "U"))
sitem(tt(command))((empty string))
sitem(tt(use-server))(false)
sitem(tt(use-simple))(false)
+sitem(tt(get-revision))(false)
sitem(tt(use-prompt-escapes))(true)
endsitem()
@@ -615,6 +627,7 @@ sitem(tt(%s))(The vcs in use (git, hg, svn etc.))
sitem(tt(%b))(Information about the current branch.)
sitem(tt(%a))(An identifier, that describes the action. Only makes sense in
actionformats.)
+sitem(tt(%i))(The current revision number or identifier.)
sitem(tt(%c))(The string from the var(stagedstr) style if there are staged
changes in the repository.)
sitem(tt(%u))(The string from the var(unstagedstr) style if there are unstaged
@@ -624,6 +637,10 @@ sitem(tt(%r))(repository name. If tt(%R) is var(/foo/bar/repoXY), tt(%r) is
var(repoXY).)
sitem(tt(%S))(subdirectory within a repository. If tt($PWD) is
var(/foo/bar/reposXY/beer/tasty), tt(%S) is var(beer/tasty).)
+sitem(tt(%m))(A "misc" replacement. It is at the discretion of the backend
+to decide what this replacement expands to. It is currently used only by
+the tt(hg) backend. The hg backend replaces tt(%m) with the global hash
+value of the current revision.)
endsitem()
In tt(branchformat) these replacements are done:
--
1.6.2.1.136.g8e24
next prev parent reply other threads:[~2009-04-06 17:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-06 17:45 PATCH: (0/5) Updates for vcs_info Frank Terbeck
2009-04-06 17:45 ` PATCH: (1/5) vcs_info: add revision and "misc" argument to VCS_INFO_formats() Frank Terbeck
2009-04-06 17:45 ` PATCH: (2/5) Add git's sha1 hash as revision information Frank Terbeck
2009-04-06 17:45 ` PATCH: (3/5) Add information about hg's local revision number and the commit's hash Frank Terbeck
2009-04-06 17:45 ` Frank Terbeck [this message]
2009-04-06 17:45 ` PATCH: (5/5) Make the hg backend work with new versions of mercurial Frank Terbeck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1239039938-20782-5-git-send-email-ft@bewatermyfriend.org \
--to=ft@bewatermyfriend.org \
--cc=zsh-workers@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).