Working copy location of xCode SVN repository - xcode

Reference version: xCode 4.5.2
In Organizer-Repositories I see for each repository a "Root" folder and one or more folders related to the root. How I can see the working copy location related to each folder?
By right-clicking the folders I see only the link to the help and no options to see the actual location of the directory on my computer.
The reason why I'm asking this is that I added folders in my repository from different locations in my local filesystem. Now I need to find all the locations, remove them and put my working copy in a single directory tree to avoid mixing SVN working copy files with non-versioned files.
Many thanks for the help.

The xCode-Repositories interface for SVN seems incomplete (as appears from other questions/answers on it).
So I've resolved by removing the repository from xCode interface and re-creating it.
I now use "xcrun svn ..." command line interface for all the operations except the simple checkout/commit commands.

Related

File path shown different between IDE and working directory - using git

I'm git newbie and developing using Xcode.
As I mentioned in title, the file path shown different between IDE and working directory.
The file path that Xcode shows me is:
MyApp/FolderB/Model/DummyModel.swift
However, in the working directory shows me is:
MyApp/FolderA/Model/DummyModel.swift
The remote repository has the same file path as the working directory.
HISTORY
At first, I created FolderA, which included Model folder and DummyModel.swift.
Later, I created FolderB and moved the Model folder hear. And deleted FolderA. I think I modified DummyModel.swift after moved it, but I don't remember clearly.
Why did this problem occur?
What should I study to understand this problem?

Extra directories and files added to git repository

I had always used Git locally on Mac OSX and decided to try out Github and Bitbucket. I had some issues getting it working and tried a few fixes that others suggested who had similar problems. I was able to push to Github and Bitbucket, but I also managed to somehow add extra directories and files to my repository in the process.
I'm using Xampp to develop locally, and I have a folder in there that I created my repository with, so the file structure is something like this
Applications
XAMPP
xamppfiles
htdocs
myproject -this is was originally the repository that I had been using
randomdirectory1
randomdirectory2
randomdirectory3
randomfile1
randomfile2
One thing to note. Not every single directory and file in htdocs was added to my repository. There were only 3 added, and about 7 other folders.
Prior to trying out github my repository just consisted of myproject located in /Applications/XAMPP/xamppfiles/htdocs/myproject. Now, there are a bunch of other directories and files added to it. I know this, because in conjunction with the command line I also used GitX for a visual reference. Now, all of these extra files and directories are showing up.
Maybe I don't fully understand how git repositories works. Prior to this, I had only used add, commit and checkout commands. All I know is that my repository appears to be different in GitX and matches on Bitbucket/Github.
What folder did you initialize the Git repo from? It sounds like you meant to init from the myproject folder, but instead you did it from the Applications folder.
Does GitHub show all those extra directories?
Where is the hidden .git folder?
Is this a private repo just for you, or just for you and a few known others? Are you willing to rewrite history?

How to checkout a subfolder from a local svn copy (and not the svn server)?

For some simple Windows batch script, I want to temporarily create a copy of a certain folder in an local working copy of an svn repository at a certain revision. I do not want to checkout directly from the svn server (because then my script needs to know what the server address is, and potentially I would need to authenticate etc.)
And I can not just copy the subfolder, as the hidden .svn folder is higher up.
I have been trying some variations on (with the repo folder containing the .svn hidden folder):
svn co file:///E:/repo/paper#48 E:/temprepo
But that doesn't work. My Windows 7 command prompt answers with
svn: E180001: Unable to connect to a repository at URL 'file:///E:/repo/paper'
svn: E180001: Unable to open an ra_local session to URL
svn: E180001: Unable to open repository 'file:///E:/repo/paper'
I am doing something wrong, or is what I am trying impossible?
Your question seems bit ambiguous. I can think of two ways of looking at this.
Assuming you just want a copy of a sub-folder in a svn working copy WITHOUT the .svn folders.
You can use svn export to copy a given sub-folder of a working copy like this - svn export E:\repo\paper E:\temprepo.
Quote:
And I can not just copy the subfolder, as the hidden .svn folder is
higher up.
EDIT: This file structure is only available in subversion v 1.7. In a subversion client with version 1.6.x sub-folders in a working copy should be self-contained. Meaning you may duplicate it to another place, and do subversion operations like svn update etc. in it.
As you have rightly mentioned in your question, you have working copy of subversion repository and not the repository it self.
You can check out only for a repository that happens to be your subversion server.
When you check out your repository, a pristine version of the repository contents are located inside the ".svn" folders.
This is how svn shows you the diff when your working copy differs from the original contents without routing it's request to server.
It also keeps meta data of your server address and other information which you can see when you do svn info. This also contains your server address as svn url.
Your working copy and the ".svn" folders fully recognize the repository from which it was checked out.
I hope you have understood why you can not checkout from your own working copy.

Building Qt once added to subversion?

I need to make some changes to Qt 4.7.1, so I need to add it to my subversion server to track my changes. However, once it's added, the configure script fails. I'm guessing it's choking on the .svn files.
I'm using Windows. Is there any way to add Qt to subversion, delete all the .svn folders, configure and build it, recreate the .svn folders, and then submit my changes?
Or is there any other work around? The error I get is 'Couldn't update default mkspec'
Here is what I would have done:
Install Qt in some folder.
Make sure that auto-props and global-ignores are set up properly.
Rename the whole folder.
Create an empty repository.
Create an empty folder having the same name as the original one.
Import the empty folder into the repository.
Remove the folder.
Check out the folder.
Copy the contents of the backup to the working copy.
Carefully add everything you want to be source controlled, probably using the -N or --depth options.
Put everything else into appropriate svn:ignore properties.
Commit.
Compare the working copy and the backup.
If there are any differences, wipe both the working directory and the repository, then repeat from the step 2, correcting the mistakes.
It may seem a bit of overkill, but importing such a large project into an SVN repository isn't a trivial task.
The problem is if .svn folders exist in /mkspecs/default and /mkspecs-win32-msvc2008 then configure fails to run with the error 'Couldn't update default mkspec'
If I move the .svn folders, configure, then replace them, I can then build.

How do I keep Resharper Files out of SVN?

I am using VS2008 and Resharper. Resharper creates a directory _Resharper.ProjectName. These files provide no value for source control that I am aware of and cause issues when committing changes. How can I get SVN to ignore them? I am using TortoiseSVN as my interface for SVN.
EDIT: You guys are fast.
Here's a link to show the ignoring process in TortoiseSVN
Add the file names (or even the pattern _Resharper.*) to the svn:ignore property for its parent directory.
Gonna post an answer to my own question here as I read the manual after I typed this up. In TortoiseSVN, goto settings. Add
*ReSharper*
to the "Global ignore pattern". Adding items to the global ignore pattern means that these files will be ignored for any project you work on for the client with TortoiseSVN installed, so it might not be appropriate to use the global ignore in all cases.
You can also add specific files and directories to the ignore list for individual projects if you select this from the TortoiseSVN menu BEFORE they have been added to your repository. The "BEFORE" part is what tripped me up originally. Since this is a single developer project, I've been checking in binaries, etc. b/c it has no consequence for other developers, and the Resharper files got in there.
Store Resharper caches in system temp folder.
Check First setting page in r#.
Environment -> General -> System -> Store caches ..
Short answer: the "svn:ignore" property
Long answer:
# cd /your/working/copy
# export EDITOR=vi
# svn propedit svn:ignore .
(add "_Resharper.ProjectName" on its own line and write the file out)
Edit: erg... doh, just realized you said tortoise... this is how you do it with the command-line version of SVN
svn has an "ignore" property you can attach to a filename pattern or a directory. Files and directories that are ignored won't be reported in "svn st" commands and won't go into the repo.
Example: you have C source code in .c and .h files, but the compiler creates a bunch of .o files that you don't want subversion to bother telling you about. You can use Subversion's properties feature to tell it to ignore these.
For a few files in one checked-out working directory, for example myproject/mysource/
bash> svn propedit svn:ignore mysource
In the text editor that pops up (in linux, probably vi or whatever your EDITOR env var is set to), add one filename pattern per line. Do not put a trailing space after the pattern (this confuses svn).
*.o
*.bak
That's all. You may want to do a commit right away, since sometimes svn gets fussy about users making too many different kinds of changes to files between commits. (my rule is: if in doubt, commit. It's cheap)
For a type of file appearing in many places in a sprawling directory tree, edit the subversion config file kept inside the repository. This requires the repository administrator's action, unless you have direct access to the repository (not through svn: or http: or file:, but can 'cd' to the repository location and 'ls' its files). The svn books should have the details; i don't recall offhand right now.
Since i don't use Tortoise, i don't know how directly the description above translates - but that's why we have editable answers (joy!)
This blog post provides a example on how to do what you want on via command line svn.
http://sdesmedt.wordpress.com/2006/12/10/how-to-make-subversion-ignore-files-and-folders/
These change will be reflected in TortoiseSVN.
I believe there is a way to do it via tortoise however i don't have a windows vm accessible atm, sorry :(
SVN only controls what you put into it when creating your repository. Don't just import your entire project folder but import a "clean" folder BEFORE doing a build. After the build you get all the object files or your _Resharper folder etc. but they are not version controlled.
I forgot: the svn:ignore command is another possibility to tell SVN to exclude certain files. You can add this as a property to the version controlled folders, e.g. with TortoiseSVN.

Resources