GatorQue / git-repo-flow

Enhanced Google repo alternative that utilizes a git-flow methodology.
Apache License 2.0
6 stars 3 forks source link

Add flow subcmd directory and hook it up. #6

Closed smipi1 closed 8 years ago

GatorQue commented 8 years ago

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 .

GatorQue commented 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.

GatorQue commented 8 years ago

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 from subcmds.version import Version File "/home/rlindeman/projects/reflow/git-repo-flow/subcmds/init.py", line 42, in name, py, clsn)) SyntaxError: subcmds/flow.py does not define class Flow

GatorQue commented 8 years ago

Correction, can't have - in the name, new directory is subcmd/gitflow.

GatorQue commented 8 years ago

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).

smipi1 commented 8 years ago

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!