Closed smipi1 closed 8 years ago
I added the subcmds/flow/init.py script based on subcmds/init.py but using the all_flow_commands variable. This issue is now resolved. I will import this in file as described above in the new flow subcommand.
Apparently you can't have a subcommand with the same name as the directory. I have had to rename subcmd/flow to subcmd/git-flow in order for the system to accept subcmd/flow.py. Otherwise you get the following error when trying to add flow.py:
rlindeman@rlindeman-Precision-WorkStation-390:~/projects/reflow/test$ repo flow
Traceback (most recent call last):
File "/home/rlindeman/projects/reflow/test/.repo/repo/main.py", line 46, in
Correction, can't have - in the name, new directory is subcmd/gitflow.
After attempting to add subcommands to the gitflow folder, I find that the usage printing for these commands fails. And since git flow only provides a few commands, I think we will provide them directly in the flow.py subcommand. Better to start with a simpler approach (single subcommand) then overcomplicate it (with flow subcommands).
I suspected that this would not be straightforward to achieve. I did however hope that you would be able to get it working. It would have at least provided an elegant separation of help commands.
O'h well... Sometimes the straight and simple approach is more than warranted, so go for it!
Perhaps you already knew this, but it would appear that if you use the following line in a python script: from import
It will attempt to open /init.py to obtain . I believe it becomes the responsibility of init.py to retrieve each .py file in the .