How to retrieve SVN+SSH username in eclipse in linux - linux

I have checked-out one of the project from SVN (using SSH protocol) (been a long time).
I want to retrieve the SVN username that I had used when I checkout this project in ECLIPSE.
What I tried:
Saw the properties of the project - no luck
Saw the .eclipse folder for the settings/config - no luck
Is there any way I can see the username (if possible password) for the SVN project that I used to checkout in eclipse?
Note:
The SVN installed on my machine is Subclipse and I have never committed to this repository but checked-out the project.

Subversion stores the relevant account data in your home directory.
For example on Windows 7 you will find a lot of files regarding Subversion in the directory
C:\Users\%username%\AppData\Roaming\Subversion
On Linux it is ~/.subversion
Look into the auth subdirectory.

In subclipse, I'd use Team->Show History. Then you have the username in the Author column. You just need to find one of your own commits.

Related

How to Commit code into SVN from Linux server?

How we can connect to SVN repository from Linux server. I want to connect to svn repository from linux server for committing code. Any help will be appreciated.
First I assume that the SVN repository is already created since you just want to get code and commit to it.
But basically as the comments describe there is not much to it.
You will need SVN (the command) and a Username and Password.
Again, I assume you have all of these things ready.
First thing you need to do is to check-out the repository so that you have the code on your local server. Once you have to code, then you can start to edit/add and change it and then commit it back.
svn co https://www.remotesvnserver.com/svn/project projectname
"co" stands for "Check Out" witch is the equivalent of "Clone" when we are talking GIT.
Now that you have checked out your SVN project, you can begin to edit and change it as you like (granted you have the permissions)
edit some.file (make changes to a file)
svn commit -m "My change info"
I won't begin to talk about if you add files, delete files or rename files.
You will need to look into SVN documentation for that, but again I assume that you already know these things as you just wanted to connect to a SVN repository.
I would recommend looking into some of the documentation Apache has on SVN.
(Apache Foundation is the project maintainer of SVN)
https://subversion.apache.org
https://subversion.apache.org/quick-start
Full SVN manual
- http://svnbook.red-bean.com/en/1.7/svn-book.html
https://openoffice.apache.org/svn-basics.html
You can find details of various SVN commands here.

Where svn store project code?

I spent all day installing the svn server on my virtual debian 7. So now I have working svn server on svn:// and http:// protocols. With the http:// I haven't got any problems, but with the svn:// first I couldn't create a project folder in my repo through Tortoise browser, there was some error: "User cancelled", after this I did it in the console with some command like this one
svn mkdir -m "project folder" svn://svn.host/repo/project
then a message for root password appeared, next svn user name and pass, and the project folder showed up to the Tortoise browser. I did 3 folders trough Tortoise browser: trunk, branches and tags, and I added my local project to the trunk directory. So now everything seems to work fine just when access my repo through console, ftp or http I can see the trunk branches and tags directories. I tried to find them in the linux tree with no success, it is very strange because the project is there in the Tortoise Browser, but not in the repo. Thanks of any good people which can help me to understand whats going on, and sorry for the level of my English still learning.
The subversion repository is basically a database; you won't see the literal names of files and directories if you inspect it directly. This follows from the purpose of subversion: to store the history of every file and folder, including its state at every past revision, and metadata such as log messages, and actions which change the directory structure, such as renames and deletes.
Laying out the repository the same way as the code being stored would be a very inefficient solution for this aim.

Creating SVN Repo and Checking Out

I'm moving my current server contents to a new one, and am currently in the process of setting up SVN. I'm fairly unfamiliar with SVN, typically using it to the extent of commits and updates.
I have two locations that I use SVN on the old server:
PROD location:
/var/www/html/new_dwutils/
and local:
/home/{user_name}/public_html/new_dwutils/
My interaction svn-wise is normally committing and updating at the /new_dwutils/ level.
Note: Running svn --version says I'm at version 1.6.11 for both servers.
I'm now trying to recreate this structure on the new server. My initial thought was to create the svn repo using something like:
svnadmin create /var/www/html/new_dwutils/
This creates the repo dir, but, when I copy my files into the dir, I am unable to do svn commands like status. However, when I go into a sub-dir of the copied data, I can use the svn commands.
This has me thinking that the repo is /new_dwutils/ and the copied data is considered a project? And the sub-dirs are working copies then?
Going off that thought, I deleted the repo, and made the html dir a repo:
svnadmin create /var/www/html/
I then copied my new_dwutils dir, and sure enough, I was able to do svn commands like I use too. What I've noticed is that when creating the repo, a few things are added that were not on the previous server: conf/, db/, format, hooks/, locks/, and README.txt. I get that these are svn files, but I'm not seeing the .svn file. I know that there was an update for svn that "removed" .svn files, but these files are now in /var/www/html/.
Now I want to setup my local working copy.
I've been doing (location /home/{user_name}/public_html/):
svn checkout file:///var/www/html/
Problem is it copies the html/ file, but nothing in it, and I don't want the html/ file I want the html/new_dwutils/ file.
I feel like I'm doing it wrong from the start, and would greatly appreciate some explanation on how to get on the right track. A step by step would be extremely useful, and if further clarification is need for files or directory paths, I would gladly detail.
Thanks!
The Subversion Manual will answer all of your questions.
If you're making a Subversion repository under /var/www.html, I'm assuming you're using Apache httpd as your server. Look at Chapter 6. If you already have a repo, create a dump file, then use that dump file to recreate the repo. Look at Chapter 5 on moving repositories.
If you don't know anything about Subversion, or are confused by the difference between the repository location directory and a working directory, read the on-line manual. It's one of the best pieces of documentation I've seen.
From description of your question it appears that '/var/www/html/new_dwutils/' is your working copy and not a repo.
Go to '/var/www/html/new_dwutils/' on the old server and type "svn info" this should give you location of the old repo. You should simply be able to 'svn co ' into the new location to checkout a copy of all your files from the old server (everything that is checked in - you will not get anything that is not checked in on the old server).
However, if your repo was local on the old server and you want to move it to your new server too. Then you can simply copy the entire folder to the new server and access it directly using its new location in 'svn co' command.

How to sync git on ubuntu with existing github projects?

I used mac github client to push my codes to my github account. On my Ubuntu linux computer I wan't to connect to github using the terminal so that it will automatically sync will all my projects on github. How would I do it? All the online help I have bumped in to so far only show how to clone an exiting git repository not how to connect to my github account and sync it.
git, the revision control system, doesn't know anything about Github, a website that keeps track of and hosts your git repositories for you. The concept of a Github account is totally alien to git, so you'll never be able to, say, browse all of the projects you own on Github with a git command. git only works on the level of individual repositories.
Github also provides a graphical client that handles both the git level stuff and the Github level stuff -- it understands what a Github account is, and will log in for you and display all of the repos associated with the account. It's also a fully featured git client that does a lot of work on the level of individual repos for you. However, this graphical client is currently only available for Windows and OS X, and is not available for Linux.
My own workflow on Linux is to use the github.com website plus the command-line git tool. To bridge the gap between Github and git, you need to git clone individual repos. Aside from that, you can do Github administrative tasks on the website, and you can work with individual repos with git on the command line.
If you don't like this work flow, you need to look at graphical git clients for Linux. I'm not sure if any exist that will do both git-level stuff and also interface with Github specifically and understand the idea of a Github account.
You could also theoretically try to run the Windows client in wine on Linux, but I would not recommend this approach except as a last resort.
First I don't know a program that automatically sync all my github repositories.
First you have to install git (if it has not been done already) tutorial
Than you should generate a rsa:key to be able to 'push' your repositories to github.
You can generate a rsa_key by following this tutorial notes ssh-add id_rsa should be ssh-add id_rsa.pub ....also you can name id_rsa as anything you want: like bran_rsa_key
You should post or add your rsa_key to git hub at this address. If you go to that link you will see that you already have some key for your Mac but nothing for your Ubuntu.
After installation you could install ungit if you're not that familliar with git

Setup read-only vendor SVN repository as mirror/external within my own repository

Currently I am working on opencart site and I would like to integrate opencarts source into my own SVN (https://github.com/opencart/opencart).
The goal is to be able to make my own customizations to core OpenCart files and then, when a new version of open cart is released, integrate there changes into my local version.
I was thinking of source structure as follows:
/trunk/opencart - my custom version of open cart
/vendor/opencart - the current opencart trunk.
The intended workflow would be to pull the latest open cart from their servers, then perform a local merge into my trunk. Currently, I have been struggling to set this up correctly as I am very new to SVN and TortoiseSVN.
My current setup, is Windows7 running TortoiseSVN 1.8.0, Build 24401 - 64 Bit. On my local server I have Ubuntu 13.04 64bit with svn, version 1.7.5 (r1336830).
I managed to setup repository that I can check into and out of, and created an external reference in vendor folder using externals. But I’m struggling to generate the main trunk from this external data. When I try to branch from vendor/opencart to trunk/opencart, it attempts to generated that branch on https://github.com/opencart/opencart rather than my local server. (This rightly fails as the repository is read only).
If I try to perform a merge in SVN on the empty trunk/opencart folder with vendor/opencart I also get problems as there is lack of ancestry in the trunk folder. I've read multiple sources - some say to use my approach, some say I should be using svnsync.
What is the best/simplest approach? Ideally, I would like SVN to pull the latest source, rather than dumping the source into a separate folder.
Re-read about svn:externals in Subversion
Get Subversion URL for this Git repository (SVN can't directly communicate with Git) - it's "Subversion checkout URL" in sidebar, open it in Repo-browser and select needed subtree for you - it can be some branch or trunk, remember full URL to needed subtree (it can be, f.e., https://github.com/opencart/opencart/trunk/upload)
Define, where in your repository you want to mount external repo (let it be /vendor/opencart URL)
Checkout parent of mount-point (or parent of parent for our case, if parent still doesn't exist) into new unrelated to work, Working Copy
Create in WC root new folder (usual, ordinary, standard) vendor
For folder vendor add new svn-propery svn:externals in TSVN's wizard
Commit changes
Check results
PS: you can see (checkout, inspect) at this URL https://subversion.assembla.com/svn/subversion-troubleshoot-b/trunk as sample of simplest use-case for externals (subdirectory lib in trunk is svn:external to another repository subtree)
PPS: At staring point you trunk can be empty, you merge /vendor/opencart in order to get initial vanilla state of code in trunk for your own changes on top of it

Resources