-
Notifications
You must be signed in to change notification settings - Fork 176
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
A suggestion for autocreation of modman file #68
Comments
If you think it would be useful perhaps we could collaborate? |
|
interesting, the [Y] [n] point is obviously straightforward. Your first point assumes that you would running modman automodman from a Mage site. Presently a Modman checkout requires that a modman file already exists, do you foresee that you would use svn checkout instead? Personally I was assuming that users would be running modman automodman in a folder tree outside of a Mage site before their first commit - though I think that this alternative workflow would avoid conflicts and therefore be very nice. |
thinking about it, it could be run in two modes,
|
I'm thinking of creating a UML activity diagram to show my proposed flow, which I'll post that back here incase anyone wants to comment. |
w00t :D |
I'm going to start work on coding this and will and will do a pull request when I'm finished |
erm... --force always seems to be true for a checkout as its being set on line 870 |
Logic Structure as comments prior to coding it
|
On line 349 in function
This seems to suggest that only one half of the path is needed - though I can't find this documented on the wiki |
Think I'll create both sides anyway as I think this is what most people will expect to see |
I'm changing the [Y][n] default to [N][y] - I've found that when traversing down a tree, say: |
testing if the pathname exists in another modman file doesn't test if a parent directory exists in another modman - I'll think about that over the weekend |
I've worked it out - automodman now tests if parent exists and tells you
|
As you can see above anyone wanting to try out this code its now on pull request #69 |
Nice. Maybe you add a "simple" mode, where it just adds every file it finds. I am doing |
I have another take on this as a ruby script here. |
@bobbyburden there are indeed many ways to remove the proverbial four legged feline mammal from its epidermis 😉 @joh-klein could be useful - I also considered the filename* glob pattern as way of achieving the adding of every file, and I'll probably get round to adding it to my fork the next time it's useful to me... ie
which would create
|
@waynetheisinger First of all, I am very impressed with your thoroughness. I think this is a good feature and it looks like you've implemented it really well and it doesn't break anything or fundamentally change anything. So, the only reason I haven't merged it is I haven't had time to test it out and look at it more closely, then I forgot about it.. So, sorry for that, I didn't mean to ignore your work. I will add one thing in general is I like to stay away from building in too many features and options. For example, if a user wants to checkout/clone a repo that doesn't have a modman file, then they can already easily do this by:
So I don't see the need in this case to complicate the checkout/clone command. |
@colinmollenhour you're probably right about not needing to change the checkout/clone command Also my fork has gone a little stale so if you are interested in doing a merge then I'll get mine up to date with your trunk and remove the checkout/clone code There is also a small bug that I want to fix - it gives a false positive in the error checking for pre-existing paths in other modules, if comments in the other module, match the path that automodman is testing against - I think it should only throw the error for actual modman paths not those that are commented out.... I'll fix that too and then do another pull request |
Yes, I am willing to merge this feature after said changes. Thanks! |
@colinmollenhour I've made those changes and sent through another pull request... Thanks |
just for the sake of completeness, here is a link to the tool already capable of generating modman files: |
Hi Colin,
This is a suggestion, not an issue. How about an autocreate for the modman file? This would be very useful for when people retroactively create a modman file for their module rather than writing one when developing, maybe because it is a third-party module rather than their own.
How it would work
-bash$ modman automodman
include 'folder/path', [y] [n]
include folder/path/filename [y] [n]
What do you think?
The text was updated successfully, but these errors were encountered: