Creating SVN project from new and existing SVN files - tortoisesvn

My new Tortoise SVN repository project should be mix of some files on my local disk and some files already part of another existing project in SVN. Regarding those (existing) files, can I simply copy them using repo browser into new project and then do check out to bring them into local working copy ? Or should I check out existing files to working folder of new project, then add new local files to it and after that add all of them to mentioned new repo project ? Or ... ?

Here are some solutions depending on your application:
if you do not want to duplicate the existing files in the repository: you should use svn:externals property (see Subversion doc and TortoiseSVN doc). This allows you retrieving in the working copy of your new project some folders coming from another location in repository (e.g. from another project). The constraint is that you can do that with entire folders, not separate files.
if you don't matter duplicating the files in the repository: in your local working copy (not in the repo browser), you should select the files you want to copy, right click and choose Context Menu ā†’ Copy from the explorer context menu. Then browse to the target folder, right click and choose TortoiseSVN ā†’ Paste. Then commit all in once. This is described here.

Related

how to add clone git to my own created repo in gitlab

How to take the project from one repo (where I've been given developer rights by some other person who is the master) to my own created repo (where I'm the master). I'm able to use both CMD and webstorm IDE for accessing GIT.
The action you want to perform is called 'fork' in the context of source code management (e.g git). Quoting https://docs.gitlab.com/ee/gitlab-basics/fork-project.html:
A fork is a copy of an original repository that you put in another namespace where you can experiment and apply changes that you can later decide whether or not to share, without affecting the original project.
To fork a project in GitLab, you just have to click on the 'fork' button on the project's main page.
You can read detailed steps on https://docs.gitlab.com/ee/user/project/repository/forking_workflow.html#creating-a-fork

Gitlab - Transfer to other namespace not working

I moved a git-repository to another namespace in gitlab through the 'transfer project' option in the Admin Area. I am owner/master of both namespaces.
The first time I did the transfer it took ages for the page to automatically refresh after the move; but I figured I just let it run it's course; when I clicked away to another page and then got back, nothing seemed to have happened: Project was still in the old namespace, project is not visible in the new namespace.
However in the old namespace, it now says: " repository: does not exist" in the Project info and if I go look on disk, the nameofrepository.git & nameofrepository.wiki.git are actually moved into the directory of the new namespace and are not in the old directory anymore.
Is there any way of updating/fixing this information in gitlab easily? I did restart gitlab already, but that didn't seem to help out at all.
We're running gitlab 7.5.1
We had a similar problem in GitLab 7.1.1. The move made the original repo empty but the project did not appear in the destination group. We fixed it as follows (for this purpose let's say the original project x was in group a, and it was being moved to group b):
Browse to the repositories folder on the GitLab server.
Locate the target group b and folder x (which is what we found). This meant GitLab had moved the folder but not created the project correctly.
In GitLab create a new project in group b called temp.
Rename the project folder x in group b to temp.
Check in GitLab that the project contents is now available in group b, project temp.
If all is well, in GitLab rename project temp to whatever you want it to be (probably project x).
If those instructions are a bit convoluted, the main point is getting GitLab to create a project and then overwrite the projects folder with the moved folder. Why the project does not appear I don't know, but presume it's a bug with GitLab.

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

copy directory into same directory with tortoise

I have a copy of a Web site checked out with Tortoise SVN. We are making a Spanish version of the site, and I need to copy the en/ directory, paste it in the same directory, rename it es/ and then commit it back to the repo. How do I do that?
Right-Drag the folder from the right list view in explorer to the same folder in the tree view on the left. When you release the mouse button, the drag context menu is shown where you will see multiple entries added by TortoiseSVN. One of them is SVN copy and rename. Or you could just use SVN copy - TortoiseSVN will detect that the file/folder already exists and ask for a new name.

Move your Working Copy

I tried to find out how to move my working copy. I know SVN move can be used to move files and folders inside your working copy but what about the working copy itself? I want to move it because I created a branch in a folder location that's different from my branch and had updated therefore all my .NET project references. So when I go to merge back to the mainline trunk I get a bunch of tree conflicts.
I'm runing linux.
The actual working copy directory may be moved at will using your client operating system commands (i.e. Windows Explorer if you're using tortoisSVN). The working copy contains all the meta-data needed to remain consistent with the original repository from which you checked out the local working copy.

Resources