Hi,
In a project with multiple collaborators using various computers, I'm having trouble with version control of a user-written ado command - let's call this command userwrittenado - available in ssc. In the master run do file of the project, all required ado commands from ssc are installed through this loop:
For the collaborators with version 1.0 of userwrittenado, the project works fine. However, collaborators with version 2.0 of userwrittenado run into errors later on. Since anyone who didn't have the older version installed get the newer version from ssc in the loop above, this is bound to be trouble.
The userwrittenado is neatly written and it supports its old syntax. I intended to use this, but can't figure out how to store the version that is displayed after which into a macro. Here is a pseudo-code of what I would ideally want to do:
Is it possible to fix the above pseudo-code so that I can store what is displayed by which into a macro?
I understand I could just hammer into my project the old version of the ado. But would prefer to do this more neatly.
More generally, any advice on how to manage versions of userwritten ados for replicability is very much appreciated!
Thank you for your time,
Diana
In a project with multiple collaborators using various computers, I'm having trouble with version control of a user-written ado command - let's call this command userwrittenado - available in ssc. In the master run do file of the project, all required ado commands from ssc are installed through this loop:
Code:
* Loop over all the commands to test if they are already installed, if not, then install foreach command in userwrittenado otherado1 otherado2 otherado3 { cap which `command' if _rc == 111 ssc install `command' }
For the collaborators with version 1.0 of userwrittenado, the project works fine. However, collaborators with version 2.0 of userwrittenado run into errors later on. Since anyone who didn't have the older version installed get the newer version from ssc in the loop above, this is bound to be trouble.
The userwrittenado is neatly written and it supports its old syntax. I intended to use this, but can't figure out how to store the version that is displayed after which into a macro. Here is a pseudo-code of what I would ideally want to do:
Code:
which userwrittenado * HELP: how can I retrieve what is displayed by which??? local displayed_by_which if `displayed_by_which' == "*! userwrittenado 1.0 1jan2001" { * old command, can just use old syntax userwrittenado, manyoptions } else if `displayed_by_which' == "*! userwrittenado 2.0 1jan2002" { * new command, must adapt the syntax by adding old as an option userwrittenado, manyoptions old }
I understand I could just hammer into my project the old version of the ado. But would prefer to do this more neatly.
More generally, any advice on how to manage versions of userwritten ados for replicability is very much appreciated!
Thank you for your time,
Diana
Comment