mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-10 07:18:27 +01:00
params/metrics diff: address test failures for missing branch key
This commit is contained in:
committed by
Ruslan Kuprieiev
parent
0b192af6f4
commit
435407185f
@@ -17,7 +17,8 @@ def diff(repo, *args, a_rev=None, b_rev=None, **kwargs):
|
||||
workspace_rev = (a_rev == "workspace") or (b_rev == "workspace")
|
||||
if workspace_rev and "workspace" not in metrics:
|
||||
active_branch = repo.scm.active_branch()
|
||||
metrics["workspace"] = metrics[active_branch]
|
||||
if active_branch in metrics:
|
||||
metrics["workspace"] = metrics[active_branch]
|
||||
|
||||
old = metrics.get(a_rev, {}).get("data", {})
|
||||
new = metrics.get(b_rev, {}).get("data", {})
|
||||
|
||||
@@ -17,7 +17,8 @@ def diff(repo, *args, a_rev=None, b_rev=None, **kwargs):
|
||||
workspace_rev = (a_rev == "workspace") or (b_rev == "workspace")
|
||||
if workspace_rev and "workspace" not in params:
|
||||
active_branch = repo.scm.active_branch()
|
||||
params["workspace"] = params[active_branch]
|
||||
if active_branch in params:
|
||||
params["workspace"] = params[active_branch]
|
||||
|
||||
old = params.get(a_rev, {}).get("data", {})
|
||||
new = params.get(b_rev, {}).get("data", {})
|
||||
|
||||
Reference in New Issue
Block a user