Automatically install local commit hooks for subversion - windows

Are local pre-commit hooks a function of TortoiseSVN only? It seems that the svn command line client does not support them. If the answer is yes, is there any way to script their installation? My situation is that there are a lot of committers, two or three hundred maybe.
We have several release managers who each have multiple VMs with multiple branches checked out on each VM. I'd like to have a script we can lay down and run on each VM instead of manually adding (through the tortoise GUI) one hook per release manager per VM per working copy. Adding it server-side would result in a lot of unnecessary work and slowdown for the server. We are all on windows. Thank you!

Yes, client-side hooks are a TortoiseSVN-only feature (the settings shown here are global to the user's TortoiseSVN client). You can configure them for for specific projects via the tsvn:*hookscript properties.
For distribution, you may want to keep the hook scripts on a centralized file share and reference them via UNC path in those properties. That way, everyone should be pointed to the same hook scripts all the time. You'll need to ensure that your hooks do not depend upon specific paths either for working copies or other tools that your scripts might be dependent upon.
However, you should not become completely dependent upon client-side hook scripts. You can't control which client(s) a user may use and if they don't use TortoiseSVN, that functionality won't exist.

Related

How to provide singularity images where users can add a custom set of software from a catalogue provided by us

We want to improve the reproducibility of the analyses at our institute. To this effect, we contemplate on implementing a system based on Singularity. The idea is that at the beginning of the analysis, the user can choose a machine configuration (later amendments must be possible) that sticks with them until the project is complete. Then, the image is archived with the analysis. Ideally, the user doesn't have to issue system admin commands (install packages etc.) in the process.
She just makes a request like "I need R with tidyverse and Python 3 and this and that in-house packages" and she gets a command that she can use to ssh into a singularity container that has those features. When she makes a new request, she gets the newest version of the programs but once the container has been deployed those versions don't change anymore.
It gets tricky when I think of the fact that multiple users will need different combinations of software. Do I need to provide an image for every combination of Software and software extension packages? If I only think of a scenario where users can choose of an arbitrary combination of {R, Julia, Python, r-tidyverse, r-data.table, r-whatever-genomic-analysis-package-on-bioconductor, python-...}
Is there a feature selection method in the veins of
singularity pull library://alpine:3.7 +r:3.2.1 +python3:3.7 +r-package:1.2.3
such that the user can
ssh cluster01 -- singularity shell project-abc.simg
and start/continue working?
If not, is there an alternative approach to supplying custom machine configurations to users using singularity?
I could find Singularity Compose, but this seems to just run multiple containers as services next to each other. So the images can stay separate. I have to merge them.
Yes, with Singularity, a dedicated image must be provided for each possible combination of packages.
Selecting a set of applications per-user is possible by changing your server configuration to the package managers Nix or GUIX, a fork of nix. The concept here is that each application/library lives within its own directory, whose name is a hash of the app! Therefore, multiple application versions can coexist and each application can link to another version of the same library.
A user can select a set of those directories as a user profile. This is a folder of symlinks into binaries in the proper application folders. From the Nix manual:
So, each user can setup their environment as they like, down to bitwise reproducability.
After the analysis, the profile can be turned into an image. I know its possible with GUIX using guix pack (tar, Docker, Singularity).
For Nix, I'm not sure. There is a project on GitHub, datakurre/nix-build-pack-docker, but it's dormant since 2015. Maybe it's enough to copy the needed subset of /nix/store into a folder, pull a NixOS image, and bind /nix/store of that image to your own folder?

Git/Windows: Possible for Two Users to Share the Same Folder?

In my scenario, I have two people that do work on the same code base. Their only available workspace is a shared dev environment (where the files built are used to host the dev version of the site to boot). As such, they perform their work directly in that location. I've recently introduced source control to the project, and turned that location into a Git repository.
Let me preface by saying: Yes, I would love it if the dev host spot was a deploy-to spot, and these people had their own local copies of the source code. But that isn't feasible right now.
My question: Is it possible for two different Windows users/Git users (they have separate accounts that they can use to interact with GitHub/etc. with) to share the same folder? My hope would be that SourceTree (our weapon of choice) or Git, at least, wouldn't have a problem with this: Just show diffs of what's changed, and use the currently-logged-in user's information when making commits/other actions.
It looks like that while SourceTree has separate installation directories, it still embeds some account information in the .git folder itself. When I try to interact with Git (via a pull for example), it first tries to prompt for new credentials/etc., but shortly thereafter it says "please enter password for {other-user}" without an option to hop usernames.
It looks like we'll just have to do things the right way after all. Painful (for them) but no choice.

Development on two computers

I would like to have a desktop PC and a laptop available for development. I am using XAMPP on the desktop which I use as my main workstation, however I'd like to just change location and be able to continue working on the laptop. It seems that it is possible to move the /htdocs folder to Dropbox so the XAMPP instances on both devices would use the same shared folder. That would be a part-solution, what about the question of databases, how would I go about that? I'm sure there are others who work in a similar fashion, so I'd like some pointers on how to set this up properly. Thanks
Your best bet is to set up version control. Given that you seem to assume you will basically always be networked, you might like to use github or bitbucket to create your "central" repository, and use your favourite DVCS to push changes between the repositories.
Conceptually the simplest, although perhaps not the best, depending on how you like to develop is to push all changes through the "master", and have both of your computers pull from there. Using mercurial or git, you can also push directly between the repositories on both of your computers.
I use bitbucket because it offers free, private repositories (github is free, but the free version only allows public repositories).
This also gives you the advantage of an offsite backup.
Try using a SVN or CVS solution...
You can use a development environment which is virtulized and have a high availability.
There are some virtualization services like (amazon, Microsoft) which you can utilize (They are paid services) .
If viruilization is not possible, you might want to maintain the scripts for the database in a version control tool . So when you switch commit the database changes in the version control tool , rerun the database scrips on the laptop to upgrade the database with latest information.
Also same thing applies for HTTP files.
If the database creation script is out of question you might want to create a database snapshot with raw datafile , which should be checked in into version control tool before switch and checkout on the other machine . Refer following link on which files you want to check-in into version control tool.
http://dev.mysql.com/doc/refman/5.0/en/replication-howto-rawdata.html
You could include a virtual machine in your Dropbox folder. This way you can encapsulate your development environment in a single file and take it with you wherever you want.
I have done that with an Ubuntu VM and never had a problem.

.bashrc in the cloud?

I do alot of development from the terminal at both work and home. What's a good solution for keeping all of my .bashrc, .vimrc, .screenrc, Irssi configs and scripts, etc. in sync across multiple machines?
I was thinking of setting up a hook in my .bash_login to go into a ssh into a central repository and rsync everything, but is there a better way?
One solution I have seen used by a number of my friends is to put all of their configuration files in a source control repository like Github which can use your home direcoory as their working directory.
Then all you need to do is pull from the repository and all of your rc files will be up to date. Committing changes from any of your machines and pushing them allows you to make those changes available everywhere.
In order to deal with variation among versions or paths between machines you can either use multiple branches(or tags depending on your choice of revision control) or just use the building in condition abilities of your config files (at those which support such things).
Put your config files in your Dropbox folder, and symlink to them in your homedir.

Script to execute on CVS check-in, without access to the server?

Is it possible to write a script that executes certain instructions, and is triggered by any check-in to a CVS repository?
The script would scan the list of files in the change-set and do a copy operation on certain files in a certain sub-directory.
I would hopefully be able to execute various console applications, including ones written in .NET.
Problem is, I need this done quickly and I don't have access to the CVS server, due to corporate IT red-tape, etc.
Is there a way to set this up on one of the client workstations instead?
Can it be done without interfering with my working folder?
Can you get commit notifications by email as this blog shows? If so, you could be able to use maildrop (or good old procmail, etc) to run arbitrary commands and scripts on your workstation when the commit notification mails arrive.
I found a .NET library that seems up to the task - SharpCVSLib.
http://csharpopensource.com/sharpcvslib.aspx
(Hopefully it will work on a developer workstation and not need to be hosted on the CVS server.)

Resources