I have installed the latest release of Subversion following these instructions http://www.drbob42.com/examines/examinD3.htm successfully. Then I installed the Delphi IDE integration too.
If I open a Delphi project, right click on the Project Manager in the Delphi IDE and choose "Tortoise SVN" and then "Repository browser" I can see all the files in my project in the local repository.
At that stage I added one instruction line in my application source, saved and then tried to commit. The SVN commit form shows up but it says "No files were changed since the last commit. There is nothing for TortoiseSVN to do here". As I just changed the source of my application I was expecting SVN showing that. Why isn't this happening ?
I chose the option cleanup and the error message says "Cleanup failed to process the following paths..... is not a working directory
Thanks
You need to check out the files from the repository into a working directory, and then modify the files that are in that working directory. (You don't directly modify files in the repo.)
Use "File->Open from Version Control", and complete the dialog. It will check out the files into the folder you specify as "Destination" (which should not be your repository - it should be a separate directory!), and then you modify the files in that working directory and commit (check in) your changes to the repository.
Related
I need to regularly download a complete set of latest code for a particular project from a VSTS account (server workspace), to a folder on a file server for readonly archiving.
Currently I log on to the web portal and click Download as ZIP for the selected project and save this to the file server.
But I'd like a more automated way, preferably something I can schedule to run from the file server itself which won't have Visual Studio installed or cached credentials for the online account.
Any of the following soluions would be ok:
A permanent URL to download the latest code as a zip file
A REST URL
to get all latest files
A command line tool to connect to the VSTS
account and download all latest files for a particular project to a specified local folder, not the default local folder
Nice to have:
Option to download as ZIP or recursive folder of files
Set files modified date as check-in time
Remove source control binding information from the downloaded files
Provide user credentials as part of the command line, not assume to use the default cached credentials on the machine
You could use our tools in Visual Studio, Eclipse, or from the command line to keep a local copy of your source code on your machine.
More details please refer official tutorial: Download (get) files from the Server
Also, if you want to download your code as a zip:
You can click on any ellipsis to find the menu which contains Download as Zip option.
If you want a automated way, suggest you use the build pipeline. You could disable the default get source steps in the build definition. And use your own powershell script to do the get source/pull files to the workspace. How to, please follow: Is it able to ignore/disable the first step Get source in vNext Build?
This will download files in your build agent, if it's not the machine you are working on. You could combine Archive Files & Windows Machine File Copy task and select Scheduled trigger in your build definition.
you might consider using an agent + build definition to download the source code (this could happen either based on a schedule or triggered after every check-in). This could easily include compression to a ZIP file and some copy commands.
An additional benefit would be that the build definition doesn't have to re-download the entire source code repository each time it is run - instead, it can be configured to just download get the changes that occurred.
Powershell
$tfsurl = "https://tfs.alogent.com/tfs"
$collection ="/defaultcollection"
$project = "/MyProject"
$api = "/_api/_versioncontrol/itemContentZipped?repositoryId=&path="
$path = "$/MyProject/Source/Datafolder"
Invoke-WebRequest -UseDefaultCredentials -Uri "$tfsurl$collection$project$api$path" -OutFile ".\DataFolder.zip"
Expand-Archive .\Datafolder.zip
I'm attempting to setup an old project on a new computer using Rider with TFS. I'm already using TFS with the same repository on an old computer with Rider, however, I've noticed that on my new computer, TFS is no longer an option for version control. I have the plugin, I can go to version control under settings and view settings for TFS, but when I attempt to enable version control for the project, TFS is not an option. Similarly, I can't checkout from TFS.
Also, the settings screen for TFS is very different on my new computer's install, giving me only the options to delete and update configurations, but no way to add one (so I can't actually do anything). Any ideas about what's gone wrong here?
Have tested installing riderRS-171.4456.199.exe (Windows), the TFS Integration plugin has been bundled with Rider and enabled VCS-TFVC successfully. Seems you are using TFVC version control(check out), please follow below requirements:
You must have the TF command line tool installed to be able to
use TFVC features. The minimum version supported by the plugin is
14.0.3. To install the tool, download the latest "TEE-CLC-14...zip" file and extract it to a known location. After extracting the files,
you must accept the license agreement. To do so, open a Command
Prompt/Terminal window, navigate to the extracted directory, and run
tf eula. After reading the EULA, enter y enter code hereto accept
it. NOTE: If you forget to do this, the plugin may fail to load
with a RuntimeException.
For the tool to be detected by the plugin, you must set the location of the executable in the Settings/Preferences menu by following these instructions:
Go to RD Settings Version Control -TFVC
In the Path to tf executable text field, navigate to the location of
the tf executable.
Click Test to test that the executable has been found and is working
as expected.
Click Apply then OK to save and exit.
More details please refer this tutorial.
Also try to setup a new created project or select another project when you are using Rider with TFS. To narrow down if the issue is related to that special project.
I'm using Post build event in Visual Studio to copy some .js files from a project to another using xcopy. I'm even using the \r option to overwrite any existing files. That has been achieved! It's copies the desired files to the destination directory, overwriting the existing files, but the problem is, despite changing the 'destination' files, doesn't check them out in TFS.
Is there a solution for checking out the 'destination' files automatically so I can be able to check in the correct version of those files to the server?
Tks
You could use the TF.exe command to checkout the files on the commandline:
c:\pi>tf checkout /type:text page.xsl
https://msdn.microsoft.com/en-us/library/1yft8zkw(v=vs.100).aspx
I am trying to provide a lot of context below for this problem so that experienced people can read the symptoms. I expect more questions will need answering to get to the bottom of it.
The short form of this question is how do I remove the source control history from a project in Delphi? (The local project folder) After removing the .svn and .local directories Delphi still wont svn import. There is nothing in the repository. This seems to be a problem with the Delphi integration. Some local caching of activity that does not seem to be relying on the repository for information.
Longer form: I recently setup the Delphi XE3 included subversion client and server. It is running as a service on Windows. The setup was done with sc as per the svn-book.
I successfully figured it all out by trial and error. With a fair bit of error over the last few days.
In trying to clean up my source code and repositories to get to a clean install I found that I needed to remove repositories from the server and re-create them. I also thought if I removed the .svn directories from the source that it would remove all traces of source control. This did not work. So I tried to additionally remove the .local files, which do have some version history in them.
When I load the project group and switch to the import tab, I still see recent comments showing my initial commit.
In addition when I try to Import a dialog comes up saying one of my big key .pas files is already under version control. Another file, a dproj file it says is not under version control. When I check the repo with
svn ls
some folders got made, but there are no files in the repository.
The config file is setup such that I should need to supply a password. It never asks for one. I just left the default security in place because I dont need to concern myself with it much. Just enough to stop mistakes. It is on a local network. SVN Import didnt require it either.
I can manually add files with svn import. I am using the svn: protocol prefix with svnserve.exe running as a service. Authentication is default. It works without passwords for some reason. It shouldnt do that.
svnserve.conf has the following: (comments omitted for bevity)
[general]
anon-access = none
auth-access = write
password-db = D:\SVNRepos\conf\passwd
realm = Root
force-username-case = none
svn --Version says:
svn, version 1.7.5 (r1336830)
compiled May 11 2012, 02:21:17
At first, SVN is not CVS. While CVS is legacy system with many problems, SVN is a modern centralized version-control system (git fans may disagree, but this is another topic).
Subversion 1.7 is out of date and no longer supported. The current release is Subversion 1.9 and it has many improvements compared with 1.7. SVN 1.8 is still supported as well. Therefore, you should definitely upgrade your client and server to the latest version.
Returning to your problem: you haven't specified any errors that you get in Delphi XE3 IDE. Do you get any?
When you svn add files in Subversion working copy, you schedule them to be committed next time you run svn commit. So there is a chance that you haven't actually committed them to the repository.
If your code was already imported to Subversion repository, then it has to be there. Double-check this with svn ls -r <URL> again. Then you could checkout a working copy using svn checkout <URL>.
BTW, .local files do not relate to Subversion. These seem to be some project files of the IDE, but I'm not sure.
And if you have issues with Subversion server setup on Windows, there are packages that should help you. See the binary packages page.
I just started to work with Xcode and trying to add a Subversion repository on remote windows server. When I enter the location path of Subversion repository, it shows following error message:
Error Message :
“Host is not reachable.”
Please can anyone help? Thanks.
Setting up svn source control is always a pain even without Xcode, and Apple couldn't help on it with its integration to Xcode. It changed from version to version and the latest is similar since version 5, so the same is in Xcode 6.
The only problem with this solution that we always have to combine command line and Xcode GUI steps, but this is the only working solution so we will follow this, but using Xcode when it's possible.
As I made it several times but always run into various problems I decided to make a detailed and clear up to date description.
The server side
Even you could install the svn server on your machine it's not a safe solution even you work alone. You could lost your years of work with a faulted hard disk or any accident. So make it on a separate computer.
You need an svn server installation on it and a login. You could check it, just ssh into your server and use the command in terminal
which svn
If you get a version number you have svn possibly with a living repository directory on that server and you can reach it. The exact location is depending on your installation but in our case the main repository directory is: https://myserver.me.com/Library/Subversion/Repository/
You will create your new repository under this directory like
https://myserver.me.com/Library/Subversion/Repository/MyNewApp
1. Create a NEW repository
Login to your server (in our case myserver.me.com) then open the Terminal utility and use the svnadmin create command to create a Subversion repository.
For example, if you want a repository named MyNewApp in the existing location /Library/Subversion/Repository/, you would enter the command:
svnadmin create /Library/Subversion/Repository/MyNewApp
This will create the main structure of the repository. We log out from server to avoid any problem and don't use it directly from now, just from the client side.
The client side
2. Create the folder structure
Note: Creating a hierarchy for your repository is optional. It's not needed in order to get svn to work properly, but if you're
planning on keeping multiple projects under source control, then it's
a good idea to get organized before you start importing those
projects.
We will prepare the folder structure on the client then we will transfer it to server with an svn command named "import".
1.First create a new temporary folder anywhere on your client - for example on your Desktop -with the project/repository name in Finder in our case MyNewApp:
MyNewApp
Then make 3 other folders in it with the exact name:
trunk
branches
tags
2.Import the folder structure to the svn server
Login to you client with Terminal utility and using "cd" command go into the project folder:
cd MyNewApp
Tip: The easiest way to get the full path to a folder into Terminal
without risking typing errors is to first type the cd command and
enter a space, and then drag the folder from the Finder and drop it at
the end of the Terminal command line.
3.Then use the svn import command from Terminal:
svn import . https://myserver.me.com/Library/Subversion/Repository/MyNewApp -m "Initial import of directories for MyNewApp project."
or
svn import . svn+sshtunnel://yourLoginName#194.149.155.124/Library/Subversion/Repository/MyNewApp -m "Initial import of directories for MyNewApp project."
The second is the most secure usage with ssh keys where 194.149.155.124 is the server's IP address. svn+sshtunnel:// means it use svn and sshtunnel but it could be any other depending on the login mechanism like https:// or svn:// The "." after "import" command is important it means the same folder where you are.
If the import was successful, you should see something like this:
Adding trunk
Adding branches
Adding tags
Committed revision 1.
Note: This means this is the first committed version you loaded to the server to MyNewApp repository and it's under revision control by
svn with a message just referencing what you did, and you could use
what you like. Now that you have imported the directory structure for
your project into the repository, you can now delete the MyNewApp1
directory on your computer that you just created. Doing this will help
to prevent confusion later, when you import the real project.
3.Import the Xcode project into svn
Using terminal navigate to you Xcode project and make sure again that you are in the project folder
cd MyNewApp
then use the following svn command again:
svn import . https://myserver.me.com/Library/Subversion/Repository/MyNewApp/trunk/MyNewApp1 -m "Initial import of MyNewApp1 project."
or with an exact location on your computer /Users/myUserName/Apps_Developing/myNewApp
svn import -m "New Import" /Users/myUserName/Apps_Developing/myNewApp https://myserver.me.com/Library/Subversion/Repository/MyNewApp/trunk/MyNewApp1
If the import was successful, you should see the long list of added files...
Note: This means that you import the MyNewApp1 (you could use any
name) project to the trunk under svn. The trunk extension is important
because of naming convention used by Xcode too. Again you can include
any comment you want in the quotation marks, but be sure your comment
will be meaningful to anyone using the repository.
4.Add repository in Xcode
Now launch Xcode and go to Preferences --> Accounts and add new repository with the "+" on the left lower corner
+ Add Repository...
Enter the repository address
https://myserver.me.com/Library/Subversion/Repository/MyNewApp
Note: Don't use the trunk etc. you need the root of the repository here!
5.Checkout the project to create a working copy
In Xcode go to Source Control --> Check Out...
Enter the repository address of the trunk (or branches or tags if you used them earlier)
https://myserver.me.com/Library/Subversion/Repository/MyNewApp/trunk
then give the name of the working copy folder and its location
Note: trunk is important!!! Just type it after the root, if you miss it there will be trunk etc. folders in your folder! Directory name is
as you like for example MyNewAppWorking...then choose location on
your computer like Apps_Developing in our case.