-
-
Notifications
You must be signed in to change notification settings - Fork 383
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
Paths != Tree Keys When Paths Are Windows Paths #5
Comments
Thanks for the patch. Rather than fixing the paths later on, I think we should be making sure that we just generate paths with forward slashes in them everywhere. i.e. rather than using os.path.join, please use "/".join |
So am I correct in assuming dulwich needs to be able to accept platform specific paths everywhere and just convert them to "/" paths? |
No, it should accept / paths everywhere only. The problem here though is that it is not generating / paths by itself, but path-dependent paths. |
This is fixed in trunk now |
I suppose the difference is very small between that and using "/".join(..), but if you want you can import posixpath explicitly, to always use that whatever the platform. |
# This is the 1st commit message: Support linked working directories Support for linked working directories: - Add `commondir()` (equivalent to `GIT_COMMON_DIR`) - Read the `commondir` file, to set it. See `git-worktree(1)` and `gitrepository-layout(5)`. # The commit message #2 will be skipped: # Fix DiskRefsContainer.refpath() # The commit message #3 will be skipped: # Add a testsuite # The commit message #4 will be skipped: # Add @skipIf for WorkingTreeTestCase # The commit message #5 will be skipped: # worktree is optional and default to path # The commit message #6 will be skipped: # add a TODO # The commit message #7 will be skipped: # Save one syscall # # See https://github.com/jelmer/dulwich/pull/454/files/0927deb7cd2ad24294b89e319ea060ed488acbba#r82424872 # The commit message #8 will be skipped: # Read commondir with get_named_file()
Hi,
I am using dulwich with hg-git on windows and have run into a problem committing:
I don't really know python, but was able to get the debugger to run hg-git and let me stop when the error occurred. I noticed that if I replaced the "" with "/" in the path in "trees[path]" it worked:
It worked, but I suspect there will be other problems like this elsewhere? I don't mind trying to find and fix them myself, but would just like to talk with someone about this first. Any thoughts? Thanks!
The text was updated successfully, but these errors were encountered: