This makes it compatible with worktrees.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
| llvm/utils/gn/build/write_vcsrevision.py | ||
|---|---|---|
| 52 ↗ | (On Diff #180595) | For the record, on Python3, subprocess.check_output generates bytes and not str. It seems to be ok as an argument to os.path.isdir, but it requires an extra decode() after the strip() |
| llvm/utils/gn/build/write_vcsrevision.py | ||
|---|---|---|
| 35 ↗ | (On Diff #180595) | should this use exists() too to be consistent with line 38? |
| llvm/utils/gn/build/write_vcsrevision.py | ||
|---|---|---|
| 52 ↗ | (On Diff #180595) | great, LGTM then. |
| llvm/utils/gn/build/write_vcsrevision.py | ||
|---|---|---|
| 35 ↗ | (On Diff #180595) | The reason why I switched to exists for .git is that .git can either be a file or a directory (because of worktrees). As far as I know .svn will always be a directory so it seems slightly more correct to use isdir here. |