svn command line when using a file repository instead of a server repository - linux

I am using a Windows 7 computer and TortoiseSVN to access a file repository on my network shared folder.
Now I want to access the same repository from a command line within Raspberry PI 3. I dont know how to give the repository link to the svn command line interface.
It seems like svn on my raspy doesn't understand how to interpret:
file:///Q:/Projekte/Heimautomation/Subversion-Sicherung/trunk
I know, that I have to use a linux-based path, so the given path would be something like:
/mount/media/diskstation/Projekte/Heimautomation/Subversion-Sicherung/trunk
But I didn't try this because I need to setup samba at first.
Some hints would be great.
Greetings, Wolfgang.

This command should work in case you can authenticate to the network share from Raspberry Pi. Take the file:// URL as example
svn info "file://COMPUTER/share/MyRepository"
But keep in mind that ...
file:// access is intended for local, single-user access only,
particularly testing and debugging.
That means that you might find easier and more robust to install a Subversion server on your Windows computer and access the repositories via HTTP(S)

the easiest way to accomplish this problem was to setup the subversion server as an HTTP server, so the subversion repository is at http://raspy/repo for example

Related

Setting up Windows Pycharm to use Git on my linux server

So I'm trying to do something probably pretty simple but can't figure it out of course. I have a VM on my network running CentOS and I installed Git using the guide. Now I'm on my Windows PC using Pycharm trying to setup Git but the setup asks for where the git.exe file is and can't seem to navigate to my CentOS VM within pycharm to point it anywhere. I tried \IP Address but that didn't work. Is there somewhere on the Linux vm I need to do to allow the windows Pycharm to reach it? I'm new to this on both sides lol.
If I understand your question correctly, you want to access a Git-Repository in your local Linux network. In that case you need to be able to access these files with your Windows machine in order to push/fetch your changes from/to it. A simple way to do it, could be set up file sharing as explained here link and then clone and handle it as any local Git-Repository (see e.g. link - with local Repos the file path is used instead of the URL).
An even simpler way could be to create a hosted online Git-Repository (e.g. on Github) even if you are a sole contributor, maybe make it a private one, if you don't want to make the contents public.

TortoiseGit - copy via sftp on pull

Intro:
I have 2 folders which are on the same GIT repository, one is on a very slow Samba network drive, and one locally. using GIT on samba is extremely slow, but the Samba is my server, which is actually vmplayer running ubuntu server on a windows machine.
My question is:
is it possible to automatically copy files from the local directory, after a pull has been done, to the other samba folder. I do this in Sublime text editor (via addon), but it copies only when I save a file. I want that functionality also on GIT. (i'm mainly using TortoiseGit)
thanks.
Yes, there are git hooks. Have a look at
git help hooks
you can define what's automatically to be done after a pull. However, your system sounds insane and you should think about not doing that with the slow share. Also, I don't understand why an Ubuntu on a VMWare player would be really slow, unless you royally messed up configuration (not to mention I really don't understand why you wouldn't just let your windows do the shares, instead of letting a linux VM do that -- and I don't really like windows at all).

HG Workbench working directory over ssh?

I manage a team of developers who are editing files on a headless development server via SFTP. We use Mercurial (HG) to version the files. It's my job to make sure the team is doing the correct things, so I need to be able to do hg status and hg diff and so forth. Up to now I've been doing this over SSH on the command line, but I would like to be able to use HG Workbench, or something like it, over SSH. Something to send the needed commands over SSH, parse the response, and display the results. I believe this is how Workbench works anyways, but only on the local machine, and I don't see any option to do it remotely.
Is there any workaround way to do this, or another program that can do what I'm trying to do with Workbench?
You have a couple of options:
Clone the mercurial repository to your local machine and then run tortoise hg on your local machine. When you do a push of any modifications they will be synced onto the remote machine - it is a distributed VCS after all.
On the remote machine type hg serve and it will run up a web server. You can then connect to the web server with a browser and perform the operations that you need via the web interface.
What I have ended up doing is using the PHPStorm IDE to do this for me. It is able to sync the working directory with the remote server, including the .hg files, and I can then see the differences in an easy way, as well as do commits right from the IDE.

Using Git with a Samba shared folder

I am new to Git, and trying to determine how to best implement it.
I have the following four machines:
Linux server running GitLabs which stores my main repository.
Linux production server running Apache, etc. I am not currently concerned about this part.
Linux development server running Apache, etc. It also runs Samba and maps /var/www to Windows. It is located in my home and is on a LAN.
Windows 7 PC running a PHP IDE (happens to be PhpED). It is located in my home and is on the same LAN as the Linux development server. It directly edits the files in the Samba
folder on the Linux development server, as well as uses this folder for debugging, and does not have code directly on it. The IDE has some basic Git functionality via TortoiseGit, however, I don't yet know how strong it is.
I am currently not concerned about sharing files, but only version control.
I've read that Git is all about being local. Giving my configuration, does that mean Git is run on the Windows PC even though my working directory is not located on it? Or is it handled just using Linux between /var/www/ and the GitLab repository? How do you envision I implement Git under this configuration?
Thank you
Git works on files. With the way you describe it, you will be running git on your windows pc - the fact the files are actually being accessed via the network rather than directly is something git probably won't even be aware of. As long as that is the only machine accessing that share, it should be fine.
But it's not really how you should use git. It has it's own mechanism for pushing/pulling changes between machines; so unless you are running an interesting driveless setup, you should probably consider storing the working directory on the machine that it is being edited on. Especially if there is a chance the files could be accessed from the linux machine as well (mixing version control accesses to the same working directory between multiple machines is always a bad idea, let alone between multiple OSes.

How to properly create an SVN repository that is accessible via http? (inside public_html)?

Here's the situation:
subversion is already installed in the server and I have access to one of the shared accounts in the server (not the root), and this shared hosting account has SSH access.
I want to create a repository where I can commit the PHP files i'm working on, and when I commit it should be viewable in a browser that is why I was thinking of creating the repository folders inside public_html is this a correct way to do this? How about the security of the server? If not what is the correct and proper way to do this?
I would also need help in creating the repository via SSH with Putty. Is there a step-by-step guide online for this?
Server information is as follows:
cat /proc/version - output this:
Linux version 2.6.9-89.0.3.ELsmp (mockbuild#x86-005.build.bos.redhat.com) (gcc version 3.4.6 20060404 (Red Hat 3.4.6-11))
svn --version - output this:
svn, version 1.1.4 (r13838)
compiled Aug 10 2009, 23:17:10
ra_dav : Module for accessing a repository via WebDAV (DeltaV) protocol.
handles 'http' schema
handles 'https' schema
ra_local : Module for accessing a repository on local disk.
handles 'file' schema
ra_svn : Module for accessing a repository using the svn network protocol.
handles 'svn' schema
The correct way to do this is to use a web bridge to SVN, such as websvn or viewsvn (there are several). You can set these up to expose any repository as a website.
As to creating a new repository, see the SVN "Red-Bean" reference at http://svnbook.red-bean.com/
I want to create a repository where I can commit the PHP files i'm working on, and when I commit it should be viewable in a browser.
I'm not sure I understand your question. Do you mean that the repository should execute your PHP, i.e. that your Subversion repository should also be your PHP server? I strongly recommend against it.
A source control repository and an application server are completely different things. They serve different roles; should be accessed by different people (developers vs. end-users); should have different monitoring and SLA policies; different hardware, and whatnot. You also probably don't want every committed change to be automatically deployed to your production environment.
The Red Bean book also has a number of sections on integrating SVN with apache, etc. But before you start working on a solution, you need to define what you're trying to do more thoroughly. What is your usage model?
For example, will you commit to SVN repository via svn+ssh, or via svnserve, etc?
Do you want to see full revisions, history, changesets from the web interface? Or just the head?

Resources