Skip to content
Snippets Groups Projects
Commit 970394b6 authored by Andrej Shadura's avatar Andrej Shadura
Browse files

hgk: fix tag list parser (issue4101)

As tags may have embedded spaces, and "hg tags" command doesn't escape them,
the output of the command doesn't make a well-formed list, so we can't just
iterate over it. Instead, apply a simple regexp to transform it to a list
which we actually use. Line boundary matching should be enabled.
parent 35bfe540
No related branches found
No related tags found
No related merge requests found
......@@ -457,5 +457,5 @@
}
}
foreach {tag rev} $tags {
foreach {- tag rev id} [regexp -inline -all -line {^(.+\S)\s+(\d+):(\S+)} $tags] {
# we use foreach as Tcl8.4 doesn't support lassign
......@@ -461,8 +461,6 @@
# we use foreach as Tcl8.4 doesn't support lassign
foreach {- id} [split $rev :] {
lappend tagids($tag) $id
lappend idtags($id) $tag
}
lappend tagids($tag) $id
lappend idtags($id) $tag
}
set status [catch {exec $env(HG) --config ui.report_untrusted=false heads} heads]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment