-
Notifications
You must be signed in to change notification settings - Fork 2
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
Mepo style for local name of repos #159
Comments
@amdasilva How necessary is the verbose method? Passing quoted strings to subprocess to retain the space seems to be quite exciting. Some people say to use |
@mathomp4 can I ask you to elaborate a bit? Presumably where we use split it is not on spaces, as we currently don't use spaces. The spaces in this case should all be in the middle of a string and normal operations should not be stripping them. I suppose the os utilities that construct paths might have a bias against embedded spaces as using them on the command line requires an escape? I do agree that this seems to be lower priority than the other cases. |
@amdasilva Can we leave the "raw" repo indicator as |
@tclune @amdasilva Actually, we don't need to change anything at all. I have some code that doesn't care how the |
@tclune The issue is that def clone(self, version, recurse):
cmd = 'git clone '
if recurse:
cmd += '--recurse-submodules '
cmd += '--branch {} --quiet {} {}'.format(version, self.__remote, self.__local)
shellcmd.run(cmd.split()) We run split on a command string rather than constructing from lists (which gets very tedious and hard to read). I am going to look at rewriting all the places in the code we run shell commands but it is a LOT since mepo is essentially just running shell commands. Since we run split, we kill spaces. I've looked at quoting with shlex, but it's not doing what I want. I'll keep looking at it, but I am not a real Python guru. I'm trying and I'll keep trying, but spaces in paths look to be fun. |
Note also: I know you want a |
The current default, hard coded in components.yaml, is to have remote repo noted with a @ prefix, e.g.,
ecbuild:
local: ./@cmake/@ecbuild
remote: ../ecbuild.git
tag: geos/v1.0.6
Some of us would much rather have @ as a suffix so that the @ never gets typed because of tab completions. The suggestion is to change the syntax of the components.yaml file to something like:
ecbuild:
local: ./%cmake/%ecbuild
remote: ../ecbuild.git
tag: geos/v1.0.6
where %denotes an external repo. The following command line option is added to mepo:
-s, --style naked|prefix/suffix|verbose
allowing the local name to have user selectable styles:
naked: ./cmake/ecbuild
prefix: ./@cmake/@ecbuild
suffix: ./cmake@/ecbuild@
verbose: ./cmake (repo)/ecbuild (repo)
For convenience, this choice could be encoded in $HOME/.mepoconfig along with other mepo specific aliases.
The text was updated successfully, but these errors were encountered: