Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Graphs for directories don't work in Windows due to path representation #190

Closed
devdanzin opened this issue Jul 8, 2023 · 0 comments · Fixed by #191
Closed

Graphs for directories don't work in Windows due to path representation #190

devdanzin opened this issue Jul 8, 2023 · 0 comments · Fixed by #191

Comments

@devdanzin
Copy link
Collaborator

Running wily graph src/wily/ raw.loc in Windows results in an empty graph. It turns out that it's due to failing to match paths with different path separators. Specifically, the line below fails to find a value that is present in the revision:

val = rev.get(config, state.default_archiver, operator, str(path), key)

To Reproduce

  1. checkout wily's repo in Windows
  2. wily build
  3. wily graph src/wily/ raw.loc
  4. See empty graph open in browser.

Expected behavior
A graph with many lines (for each tracked file in that directory) should open in the browser.

Desktop

  • OS: Windows
  • Version: 1.24.2

Fix
If we convert path to pathlib.Path(path) right after the following line, the graph is generated correctly:

for path in paths:

Once I test that this fix doesn't create issues in Linux, I'll submit a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant