mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-27 15:28:30 +01:00
exp show: add --rev flag (#7152)
fix: #7152 1. Add `--rev` flag to `dvc exp show`. 2. Add -1 support for `--num` flag`. 3. Extract revision found logic to `utils`. 4. Brancher use this revision found logic. 5. Update command unit test 6. Add a util unit test. Co-authored-by: Peter Rowlands (변기호) <[email protected]>
This commit is contained in:
committed by
Gao
co-authored by
Peter Rowlands
parent
87abeaddc2
commit
b673ac24d0
@@ -351,8 +351,9 @@ def test_show_multiple_commits(tmp_dir, scm, dvc, exp_stage):
|
||||
tmp_dir.scm_gen("file", "file", "commit")
|
||||
next_rev = scm.get_rev()
|
||||
|
||||
dvc.experiments.show(num=-1)
|
||||
with pytest.raises(InvalidArgumentError):
|
||||
dvc.experiments.show(num=-1)
|
||||
dvc.experiments.show(num=-2)
|
||||
|
||||
expected = {"workspace", init_rev, next_rev}
|
||||
results = dvc.experiments.show(num=2)
|
||||
|
||||
Reference in New Issue
Block a user