I often want to send a link to a document on our SVN at a certain revision. I have found out that it is possible to access revision 123 of a_word_document.docx with the link
https://our.svn.server/the_repository/a_word_document.docx?p=123
Is there a way to get a context menu entry in windows explorer, which allows to copy a link of this format that points to the working copy revision?
I often use "TortoiseSVN > Copy URL to clipboard" - but this link always points to the head revision.
Upgrade your TortoiseSVN client's version to 1.11.x
Command for copying URLs to clipboard with revision was added in TortoiseSVN 1.11.0 (see r28385 and New Feature: "Copy versioned URL to clipboard).
Related
I have erroneously added a file to a project in Xcode and I have pushed it to the server.
Now I want to remove it.
Does removing the file from the local project will results in removing it from the remote repository too at the first commit?
Removing the file from the Xcode project isn't going to remove the file from the repository. You have to use the Organizer if you want to remove the file from the repository in Xcode.
Open the Organizer and click the Repositories button at the top of the Organizer. Select the repository's Trunk folder from the repository list on the left side of the Organizer. Select the file you want to delete. Click the Delete button at the bottom of the Organizer to remove the file from the repository.
Subversion is like one of those Roach Motels: Files check in, but they never check out.
Once you add a file to Subversion, it's there forever. You can remove it from the current revision of the repository (via the svn rm command), but you can never remove it completely. Someone will always be able to see it in a log, and someone can access it by checking out the revision of that directory right before you removed the file.
There has been a lot of debate about this feature. Most version control systems have an obliterate command of some sort that allows you to remove a version of a file or completely remove the file from the repository. The problem is that Subversion doesn't revision files -- it revisions the entire repository.
I don't know Xcode, so I can't help you with the exact steps. However, there must be a Repository view in Xcode like there is in Eclipse or a series of subcommands that deal with the repository (much like Eclipse's Team commands). You should be able to delete the file from there, then commit your change.
That will remove the file from the latest version of the code (and future versions). However, it will still be there in the repository, so someone can find it via the history log, and then checkout the version of the repository right before you deleted the file. If this file contains your Swiss bank account number, you're in trouble.
NOTE: There is a way to remove a file completely from Subversion, but you have to shutdown the repository, dump it out, filter out the file, then load the repository dump into a new repository. It is usually not worth the effort.
You can do it from command line using svn rm filename
http://svnbook.red-bean.com/en/1.6/svn.ref.svn.c.delete.html
Deleting a file from Xcode WILL delete it from your remote repo when you commit (tested with svn).
Using Xcode 4.6.3 I deleted a file from my project. Committed, and it was in turn deleted from my remote repository. When you delete from Xcode, you must select "move to trash" when prompted what to do. If you select "delete reference" then that file will remain in your remote repository, just as it remains part of your projects files but just not referenced in the actual Xcode project.
When you commit your files, count the files that have checkmarks on them, and look at the count that Xcode reports in the bottom right corner, Xcode reports one extra file! Thats the deleted file, which means its committing that change.
Once again, before committing, go to terminal and 'cd' to the directory where you had the file that you deleted. Enter this:
svn info ./yourFilesName.txt
You will see a result that says:
Schedule: delete
which means that when you do a commit, the file will be deleted from your remote repo.
When you delete from Xcode, you must select "move to trash",and then commit the ".xcodeproj" file
I see that Fossil UI allows the downloading of files ("artifacts") at the url /raw/directory/filename?name=artifactID. Is there a way to always get the latest version of the file without knowing the artifactID? I have tried ?name=trunk, ?name=current, ?name=, and ?name=tip. The only result I have gotten is to be returned to the homepage of the repository or given a text file with a listing of files in the repository. I also tried /doc/directory/filename, but that just gives me the contents of the file as a webpage, as intended.
For background, I have a script I would like to download without cloning the repository, but I would like a "permalink" to the latest version of the file.
What you are looking for is described here:
http://fossil-scm.hwaci.com/fossil/doc/trunk/www/embeddeddoc.wiki
In short, you would write <baseurl>/doc/tip/<filename>
you can read <filename> above to be the path to your file, exactly as it is shown after "file" in the artifact content page. In other words: through the UI you go to "files" and navigate the the files you want link to. Once you are at the file, the header of the page will be "Artifact Content" and show you the as a full path after "File" (right at the top, after the artifact ID)
In TortoiseSVN, where is the "hooks" directory? Where to place commit-access-control.cfg in order to manage control access? Thanks
To make it clearer:
Where does TortoiseSVN install svn on Windows? I've always done it manually in Unix, Tortoise simply created all by itself and I have no idea of where the local repository is. Thanks
When you issue this command:
svnadmin create /some/local/repo
... you are creating a repository in given path ("/some/local/repo"). The GUI alternative provided by TortoiseSVN is as follows:
Open Windows explorer
Browse to the folder where you want your repository (e.g. "C:\MyData\")
Create an empty folder (e.g. "C:\MyData\ProjectFoo")
Right click in the newly created folder and select "TortoiseSVN -> Create repository here"
Thus there's little chance that TortoiseSVN will choose the repository location for you. (And of course this has nothing to do with the location of working copies or TortoiseSVN itself.)
You can find the "hooks" folder inside your repo (e.g. "C:\MyData\ProjectFoo\hooks").
(You appear to be using a Perl hook script. You'll need a working Perl interpreter to run it.)
TortoiseSVN is an subversion client software. The hooks folder is present in subversion server. Read more here.
The directory should go with each svn respoitory, not with the tortoisesvn program.
How do I add a new project to source control (SVN) using Xcode 4?
Open Organizer. Click on the root of your SVN repository in the tree on the left. Click on Import on the bottom right and choose the directory from finder that you want to add and click Import.
This will add the project to SVN
The XCode 4 documentation recommend using command-line tools or a utility program to set up a Git or Subversion repository.
To set up a Subversion repository using the command line
1/ Open the Terminal utility and use the svnadmin create command to create a Subversion repository.
For example, if you want a repository named Sketch_svn in the existing location /Users/myUserName/Repositories, you would enter the command:
svnadmin create /Users/myUserName/Repositories/Sketch_svn
Tip: The easiest way to get the full path to a folder into Terminal without risking typing errors is to first type the command (cd in this case), enter a space, and then drag the folder from the Finder and drop it at the end of the Terminal command line.
Note that the directory /Users/myUserName/Repositories/ must already exist before you execute this command. You can use the Finder or a mkdir command to create the directory.
2/ In another location—not in the repository you just created—create a folder to hold a temporary copy of the project. In that folder, create three additional folders named branches, tags, and trunk.
3/ Create a new Xcode project in the trunk folder, using Xcode, or put your existing project in the trunk folder, using the command line or the Finder.
4/ Use the svn import function to import your project into the repository you created and place it under Subversion source control.
For example, if your temporary copy is in /Users/myUserName/Projects/Sketch_tmp, you would enter the following command in Terminal:
svn import /Users/myUserName/Projects/Sketch_tmp \
file:///Users/myUserName/Repositories/Sketch_svn -m "Initial import"
Notes
The backslash at the end of the first line indicates that the command is continued on the next line. You can omit the backslash and type the entire command on one line. If you do use the backslash, be sure there are no spaces following it before you press Return.
There are three forward slashes in the string file:///.
If you type the entire command on one line, be sure there is a space before file:///.
You can include any comment you want in the quotation marks, but be sure your comment will be meaningful to anyone using the repository.
5/ In the repositories organizer in Xcode, click the Add (+) button at the bottom of the navigator pane, and choose Checkout Repository to create a working copy.
Use Terminal. At the command line, you can use the svn import command to add the project to your repository.
From the way you worded your question, I'm assuming that your subversion repository already exists. You'll follow the same basic steps outlined in Add Git or Subversion Version Control to an Existing Project in the Xcode 4 Users Guide, except that instead of creating a whole new repository you'll just add a new directory to your existing repository.
It's handy that Xcode has support for version control, but it's not a full-featured GUI version control client. You should still know how to manage your repository using the svn command line program. Alternately, you can get a GUI front end like Versions. Either way, you should have (and have read) the Subversion Book. There's a lot more to using version control than just checking files in and out, and you need to know how it works and how best to use it if it's going to help you.
I am not able to see the commit option after I make changes to my working copy, but I ensured that my settings for svn were correct.
What exactly is the problem with this error message?
Xcode is showing:
Your path is not a working copy
What should I do to resolve this?
The blog post "Xcode, Subversion Error: 155007 (Path is not a working copy directory)" and its comment are pretty much the reference on this kind of error.
Simple Workaround:
Delete your local copy (cd myxcodeproject; rm -rf .)
Delete the “build” folder from the server
svn co https://svnserver/path/trunk/project .
Now you should see .svn folders in every directory of your local project (you don’t see them if you use the “Export” function of the SCM panel from Xcode).
At this point, you should be able to edit and commit your changes directly from Xcode.
Now you need to initialize correctly the project.
The following sections illustrate that part:
How to do it right (general principle)
To place the project under Xcode, you need to first import it.
The SCM->commit entire project… gives error 155007 if you don’t first do this:
Under the SCM menu in Xcode select Repositories, then click the IMPORT icon at the top of that dialog that appears.
Select the project from the list and then click the import button.
Of course you need to first configure at least one repository before doing the steps above.
Right Initialization steps (detailed process)
Create the project in XCODE.
Setup subversion in XCODE and select the subversion repository for this project.
Use Xcode SCM > Repository and click on the IMPORT icon. This will move the local copy to the subversion repository.
Now delete your local copy (or move it to another location just in case).
Finally CHECKOUT the project from subversion (this will create the subversion .svn folders, …).
Reselect the subversion repository for this project.
Commit the entire project.