Allowing multiple folder as argument. #24
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "mdk/potodo:mdk-multi-folders"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
It's still WIP but I worked on #21, tried to refactor for readability instead of just stashing code on top of code to make it work.
Had to rework the presentation too, to be able to display multiple hierarchies, got this:
That's still not perfect, and I've not tried the pot merge yet.
45cfc43cbctoeb8dfe6320WIP: Allowing multiple folder as argument.to Allowing multiple folder as argument.I added a small test to ensure "--pot" still works.
It's not ideal yet: because all unmatched pot are copied from the pot/ directory to the tmp directory, unselected pot file are still displayed in the result:
@maciek I spot a strange naming in
pot/andfolder/inside thefixturesdirectory, is it on purpose? Seefile3.potvsfile3.ponot being in the same directory:Looks like it is on purpose, according to your tests. So my
potodo --pot tests/fixtures/pots -p tests/fixtures/repository/folder/is in fact very weird, as it tries to mergepots/withfolder/and successfully matchfile3, haha.We would need a syntax or something to tell "This pot directory match this root, BUT I don't want my project studied from the root, I want just this directory".
Like:
maybe?
We have to think about allowing, in the future, taking po files instead of directories, so:
Or
--pot-rootplus--po-root(giving one implying giving the other).Ah, good point. Alternatively we could be finding a common root in -p
arguments and matching the common root against --pot, but filtering the pot
root based on specified paths.
@maciek wrote in #24 (comment):
I fear that too fragile. I mean it works for our specific use case of python-docs-fr, and for all flat repository that don't have any folder at all, but for the others it can break:
If we have a repo with
fr/LC_MESSAGES/a/foo/,fr/LC_MESSAGES/a/bar/,fr/LC_MESSAGES/a/baz/they could runpotodo --pot pot/ -p fr/LC_MESSAGES/a/foo/ -p fr/LC_MESSAGES/a/bar/. The deduced common ancestor would befr/LC_MESSAGES/a/, while the root isfr/LC_MESSAGES/:(What about merging as-is and meditating on this on another thread? I don't think the error we're discussing can break existing use of potodo (with a single
-p) it manifest when multiples-pare used.Agreed 👍 there're no regression in this regard, we can treat the behaviours discussed as missing features.
I found one regression though, connected with the JSON output.
Other than that I like the console output improvements! Also confirming excluding works well with the new behaviour.
Thank you!
@ -95,1 +96,4 @@)def test_run_witout_dash_dash_pot(run_potodo, repo_dir):nit: spelling error witout -> without
Fixed the json output!