Closed gotoh closed 3 months ago
@gotoh I've published changes that are similar to the PR, and should address the same set of issues.
When you get a chance, can you please try them and let me know how they work for you?
One small fix is required.
diff --git a/flexprompt_modules.lua b/flexprompt_modules.lua
index 0628d74..ab08fb2 100644
--- a/flexprompt_modules.lua
+++ b/flexprompt_modules.lua
@@ -2164,7 +2164,7 @@ local function info_hg(dir) -- luacheck: no unused
do
local pipe = io.popenyield("2>&1 hg summary")
if pipe then
- local working = { add=0, modify=0, delete=0, untracked=0 }
+ local working = { add=0, modify=0, delete=0, conflict=0, untracked=0 }
for line in pipe:lines() do
local m = line:match("^branch:%s+(.*)")
if m then
This is the error message without this fix.
coroutine failed:
...scoop\apps\clink-flex-prompt\0.17\flexprompt_modules.lua:2201: attempt to compare number with nil
Ah, yes of course -- thank you!
And there was a second mistake also. Can you try the latest update?
New one works fine with hg! Checked with hg repository with 'added', 'deleted', 'modified', 'unknown', 'unresolved' state.
BTW, there's a related small issue in info_svn()
.
The files not under version control (marked as '?') are NOT counted as 'untracked'
because '?' mark is exlucded by "svn status -q" and regex.
I wonder that there is any good reason to ignore '?'...
Hm, yeah, a couple of things look wrong with the code that interprets svn status output.
I'll look into that.
@gotoh ok I think the latest update should address the issues.
Umm, it cannot count untracked files because svn status
with -q
option means "don't print unversioned items".
Umm, it cannot count untracked files because
svn status
with-q
option means "don't print unversioned items".
Can you try the latest?
I've added support for running svn status
or svn status -q
based on the :nountracked
flag. That part of the {scm} module had gotten committed in an unfinished state. That affected git/hg/svn in different ways, but all of them were accidentally affected by that.
Need this patch for svn_info()
diff --git a/flexprompt_modules.lua b/flexprompt_modules.lua
index 015535e..c3079cd 100644
--- a/flexprompt_modules.lua
+++ b/flexprompt_modules.lua
@@ -2245,5 +2256,5 @@
local command = "2>nul svn status"
- if not flags.no_untracked then
+ if flags.no_untracked then
command = command .. " -q"
end
local pipe = io.popenyield(command)
Drat. Lol. Backwards Boolean strikes again. 🙄
I close this PR, because all the request are already included.
This PR does:
branch *3 ?1
with hg and svn, not only with git.hg summary
command.