zsh-workers
 help / color / mirror / code / Atom feed
* [PATCH 1/3] vcs_info: Set $rrn in all backends.
@ 2020-03-26  1:32 Daniel Shahaf
  2020-03-26  1:32 ` [PATCH 2/3] vcs_info: Deduplicate calling the set-branch-format hook Daniel Shahaf
  2020-03-26  1:32 ` [PATCH 3/3] vcs_info svn: Detect the "working copy format is too new" error Daniel Shahaf
  0 siblings, 2 replies; 3+ messages in thread
From: Daniel Shahaf @ 2020-03-26  1:32 UTC (permalink / raw)
  To: zsh-workers

---
Untested.

 Functions/VCS_Info/Backends/VCS_INFO_get_data_fossil | 1 +
 Functions/VCS_Info/Backends/VCS_INFO_get_data_p4     | 1 +
 Functions/VCS_Info/VCS_INFO_bydir_detect             | 2 ++
 3 files changed, 4 insertions(+)

diff --git a/Functions/VCS_Info/Backends/VCS_INFO_get_data_fossil b/Functions/VCS_Info/Backends/VCS_INFO_get_data_fossil
index fd0f8389e..e84b3abc0 100644
--- a/Functions/VCS_Info/Backends/VCS_INFO_get_data_fossil
+++ b/Functions/VCS_Info/Backends/VCS_INFO_get_data_fossil
@@ -20,5 +20,6 @@ if [ -n "$merging" ]; then
    action="merging"
 fi
 
+rrn=${fsinfo[local_root]:t}
 VCS_INFO_formats "$action" "${fsbranch}" "${fsinfo[local_root]}" '' "$changed" "${fshash}" "${fsinfo[repository]}"
 return 0
diff --git a/Functions/VCS_Info/Backends/VCS_INFO_get_data_p4 b/Functions/VCS_Info/Backends/VCS_INFO_get_data_p4
index 329884982..815924c26 100644
--- a/Functions/VCS_Info/Backends/VCS_INFO_get_data_p4
+++ b/Functions/VCS_Info/Backends/VCS_INFO_get_data_p4
@@ -17,6 +17,7 @@ local p4branch change
 # here down is synced as the revision.
 # I suppose the following might be slow on a tortuous client view.
 change="${${$(${vcs_comm[cmd]} changes -m 1 ...\#have)##Change }%% *}"
+rrn=${p4base:t}
 zstyle -s ":vcs_info:${vcs}:${usercontext}:${rrn}" branchformat p4branch || p4branch="%b:%r"
 hook_com=( branch "${p4info[Client_name]}" revision "${change}" )
 if VCS_INFO_hook 'set-branch-format' "${p4branch}"; then
diff --git a/Functions/VCS_Info/VCS_INFO_bydir_detect b/Functions/VCS_Info/VCS_INFO_bydir_detect
index 29b261413..89b4d6503 100644
--- a/Functions/VCS_Info/VCS_INFO_bydir_detect
+++ b/Functions/VCS_Info/VCS_INFO_bydir_detect
@@ -36,4 +36,6 @@ done
 
 [[ ${basedir} == "/" ]] && return 1
 vcs_comm[basedir]=${basedir}
+# TODO: Would the following be correct? ---
+# rrn=${vcs_comm[basedir]:t}
 return 0

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-03-26  1:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-26  1:32 [PATCH 1/3] vcs_info: Set $rrn in all backends Daniel Shahaf
2020-03-26  1:32 ` [PATCH 2/3] vcs_info: Deduplicate calling the set-branch-format hook Daniel Shahaf
2020-03-26  1:32 ` [PATCH 3/3] vcs_info svn: Detect the "working copy format is too new" error Daniel Shahaf

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).