Подтвердить что ты не робот

Как вы можете получить текущее состояние (история хороших/плохих ревизий) деления пополам от меркуриального

При выполнении hg bisect в eclipse мне нравится, что я вижу все недостатки и товары, которые я отмечал в прошлом.
Есть ли способ получить эту информацию в командной строке?

4b9b3361

Ответ 1

Для этого существует предикат обрезания:

"bisected(string)"  
 Changesets marked in the specified bisect state (good, bad, skip).

источник

В будущем, Mercurial 2.0 представит улучшенную версию (старая продолжает работать):

"bisect(string)"
  Changesets marked in the specified bisect status:

  - "good", "bad", "skip": csets explicitly marked as good/bad/skip
  - "goods", "bads"      : csets topologicaly good/bad
  - "range"              : csets taking part in the bisection
  - "pruned"             : csets that are goods, bads or skipped
  - "untested"           : csets whose fate is yet unknown
  - "ignored"            : csets ignored due to DAG topology

Ответ 2

Как было предложено в комментарии от @adambox, это должно работать:

hg log -r "bisect(good) or bisect(bad)" --template "{rev}:{node|short} {bisect}\n"

Ответ 3

В Mercurial 3.8.2 (и, возможно, ранее) вы можете использовать это:

hg log --template bisect

Ответ 4

Здесь bash script (я называл его bisectstate), который работает теперь, когда предикат bisected() доступен.

(я использовал colorex для того, чтобы он был с цветами, но вы можете это сделать, если у вас его нет.)

#!/bin/bash -f
style() {
    echo "{rev}$1 {author|person} {date|shortdate} {desc|firstline}\n"
}

(hg log -r 'not . and bisect(good)' --template "`style -good:`" ; 
 hg log -r '. and bisect(range) and not (bisect(good) or bisect(bad) or bisect(skip))' --template "`style -cur:`" ; 
 hg log -r "not . and bisect(bad)" --template "`style -bad:`" ; 
 hg log -r 'not . and bisect(skip)' --template "`style -skip:`" ; 
 hg log -r '. and bisect(good)' --template "`style -cur=good:`" ;
 hg log -r '. and bisect(bad)' --template "`style -cur=bad:`" ;
 hg log -r '. and bisect(skip)' --template "`style -cur=skip:`" ; 
# Include the intermediate, unmarked changes in the bisect range.
 hg log -r "bisect(range) and not (. or bisect(good) or bisect(bad) or bisect(skip))" --template "`style`"
) \
| sort | colorex -r bad: -b good: -g 'cur[=:]'

Результат выглядит следующим образом:

sample bisectstate output