Disambiguate on release#153
Merged
JoeLametta merged 11 commits intoJun 5, 2017
Merged
Conversation
Member
Author
|
@lschapker Can you try this code out and see if it works for your use case? |
Some of these might not occur in the wild, but we theoretically support them at least, and making sure they work might catch other issues we didn't think of yet.
os.path.split() only even splits into two components, which means that path templates that have more than two parts (e.g., `%A/%d - %y/%X`) will not get split properly for the purpose of added disambiguation parts to them. os.path.join() will still work fine to splice the split template back together as it takes an arbitrary number of arguments.
Instead of iterating over all the path parts and added disambiguation to each, it now only adds the disambiguation to the first match.
Member
Author
|
(Rebased unto latest master to 1) resolve a conflict in a file, and 2) to run |
Collaborator
LGTM. 👍 Thanks, |
Collaborator
|
Merged, thanks. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Right now the disambiguation algorithm will just disambiguate on the first part of the template string, regardless of what actually is in the template. This leads to unexpected results like #127.
This PR fixes #127 but also otherwise make the disambiguation a bit more robust. See the details in the added tests and commit messages.