Out of date error message on tortoise - tortoisesvn

I am trying to commit a file that is out of date. I tried cleaning the directory and nothing is working... the most recent file on my local machine is the one i know i want to use.. what is the standard way of overriding the conflict... should i just delete and re-add or is there another way "resource is out of date try updating"
UPDATE BASED ON ADVICE TO UPDATE*** I am getting a "checksum mismatch" error

You need to update your local copy of the file. Right click and click update.
Any changes that have been made since your last update will be merged with your current copy. You can then right click on the file and select resolve conflicts.
If you want to ignore any changes that were made and just use your local copy, the easiest way is to copy your file to another location, update, then overwrite the file with your local copy. However you usually will want to let Tortoise handle merging any changes for you.

Did you try an update? You need to update your local copy to the current version in the repository. Right click, and select 'update'.

I had the exact same issue, it turns out that there are hidden folders containing data that tortoise uses to maintain some record of changes that have been made. If the data in your local folder does not match the data in the server, then you get a whole lot of errors that make very little sense.
To fix this, Right click on your folder and click "SVN Update".
IF you still get an error, open your local folder in explorer, enable viewing of system files and hidden files, and look to see if there is more than 1 hidden .svn folder inside your local directory.
In my case, I had accidentally copied another .svn folder into my local directory. This extra .svn folder was causing the update errors. There should only be 1 .svn folder in your root directory.
Delete the extra .svn folder (usually only the local root folder has the .svn folder) and try updating again.
Tortoise should update your local copy and then you can commit your changes without a problem.

Related

Unable to delete renamed folders

I was renaming several files/folders when VS decided that would be the perfect time to crash. On re-opening, I now have 2 versions of the folders I renamed, one with the old name and one with the new. The new folders were not linked to source control, so I added each of them. Now, when trying to delete the old ones, I get the following error:
This operation cannot be completed. You are attempting to remove or delete a source-controlled item where the item is exclusively locked elsewhere or otherwise unable to be deleted from source control.
I know no one else had those files checked out, and all the files in them have the little green + as if they are new files. I can delete all those files so the folder is empty, but I still cannot delete it. I'm also unable to exclude the folder from project.
If I open a file explorer, I can delete the old folder and then VS will allow me to delete the folder. However, when trying to rename one of the folders back, it gives the error above, even though the folder had been deleted.
My internet searching powers are coming up short and I'm not sure what else to try. Any ideas on how I can fix this?
In case it matters, the affected folders contain .cs, .cshtml, and .js files. The OS is Windows 10.
Generally the files/folders are not really deleted from TFS as they are in source control, unless you permanently destroy them, See Destroy Command.
Files and folders under version control can be easily moved, renamed, and deleted from Source Control Explorer. (Make sure you have these folders mapped in your workspace.)
Just check and try below things:
Note that you cannot delete a folder that has pending changes on any
of its children (including if any of those children are being moved
out of the folder – they’re still children until that changeset is
checked in.)
So, in this case you need to move the children out of the folder
and check those changes in, then delete the folder as a separate
changeset.
Besides in earlier version of TFS and VS have some problems with
deleting empty folders. In this case you can try creating an item
inside the folder you are trying to delete. After that try
deleting again. See this article for details.
You can also try to delete the renamed folder from the command line.
Se Delete Command (Team Foundation Version Control) for details.
Get latest first, then try deleting again.
Remap the workspace or create a new workspace and map to a new
location, then try deleting again.

SVN: How to get files added to svn and not committed

I have added a file (say SomeFile.cs) to a specific folder. I did not commit as I wanted to do commit at once after achieving the functionality. An svn update worked just fine on this until someone changed the folder name and changed the names of files under it.
Now the next day when I did svn checkout, resulted in tree level conflicts, so I copied my newly added files to this "new" location and did as "Resolve using theirs".
The resolve deleted all my local files and replaced with new folder and files. I could not find my local files (which were in my working copy) in my entire computer (includint recycle bin).
Now is there at least an option to retrieve the files which were added ("Add" option) to svn and NOT committed to svn using "Commit"?
Regards
AFAIK, only files committed to svn will be recoverable. But if you merge the conflict with theirs, then it would have overriden the changes locally.
Try to "Update to revision", but as your files were NOT committed it will most likely restore your directory structure in best case scenario.
Generally "Resolve using theirs" option is an equivalent of saying "I screwed up, they are right" -> whatever I have is wrong, and what they have is right -> overwrite my copy.
What you are asking for is pretty much against the workflow of SVN. Things don't get stored in the repository until they are committed, and are thus not "safe". You are supposed to commit often.
If you are trying to work but worried about other people's tree changes getting in your way, consider making a branch.
http://svnbook.red-bean.com/en/1.7/svn.branchmerge.html
However, SVN should never overwrite files in your local working copy that have modifications. If you do an svn update, and someone has added/changed something, you will get a "conflict", which you will have to resolve manually. You resolved these conflicts manually, and accidentally overwrote you work. This is why you should commit often. Anything you commit can be recovered.

How to exclude a folder and not its children from SVN Update in Tortoise SVN

I am working on a shared project which is put in SVN. The directory structure of the project is as follows:
ParentDir
- Child_Dir_1
+ GrandChild_Dir_1
+ GrandChild_Dir_2
- Child_Dir_2
Child_Dir_1 contains configuration files (Eclipse's .LAUNCH files), and people put all sorts of file in this folder.
So each time I update my source code (by right clicking on ParentDir and picking Update), I got a lot of configurations that I don't really need, and I have to delete them manually.
I still need to have the children of Child_Dir_1 (which are GrandChild_Dir_1 and GrandChild_Dir_2) to be updated.
I have tried to go to set the "ignore" property of the of Child_Dir_1 to exclude *.LAUNCH files, but each time I update the source code, the ones that I manually deleted are restored to Child_Dir_1.
Since you are using TortoiseSVN:
Go into Child_Dir_1, select GrandChild_Dir_1 and GrandChild_Dir_2 and right click, TortoiseSVN -> Update.
That will update only those two folders.
Ignore is so that you can "ignore" ( from commit, status etc.) untracked files, files that are not checked in.
It could be that manojlds' answer is the solution for you, but I have doubts. The problem here is that those files are really part of the project. They are kind of unavoidable, and must be in sync with the rest of working copy.
Option 1 (best): Remove all configuration files form repository, or better yet have in repository only configuration template files (with, say, $ as first character in file names). Each user could copy those template files to true configuration files and change them accordingly. Configuration files should not ever be committed. Only template files should, but updating template files will not mess with current configuration files of any user.
Option 2 (second best): Ignore those configuration files. Use your own files for your own configuration, with names that don't clash with existing. You may even add your files to SVN, but you may just as well not add them. Does not matter, as long as you don't need your configuration on another machine.
Option 3: Use ignore-on-commit group. Use those configuration files that already exist. Change them to your likings, but don't ever commit them. To ensure that you don't commit them by accident flag them as non-committable (go to commit window, select all non-committable files, right click > Move to changelist > ignore-on-commit). The problem with this is your files are not protected from other users' updates, but may actually be a good thing.
Option 4: Chop the folder out (a horrible hack). Remove Child_Dir_1 from working copy (Right click on it > Update to revision > set Working depth to Exclude). Save the folder elsewhere first, because it will disappear. After that create it again, inside it checkout all subfolders (GrandChild_Dir_1 and GrandChild_Dir_2), and copy your configuration files. Now you have complete control over folder's contents, but update and commit become more complicated.
Edit: There is option 5 in theory, but I doubt it can be implemented successfully. You can try: Use NTFS hard links. Copy the whole tree with all files as hard links to existing files, except .svn folders and their contents. Original directory is used for SVN operations update, commit, add and delete, and new directory is used for editing files. From new directory delete all the files you don't need, and insert all the files you do need that are not the part of SVN. The problem here is minor extra work when deleting files from and adding them to SVN.

rename file problem under subversion

I have a problem when I rename the checked out working file from Tortorise under subversion. After rename the local file, my local file got lost. I want to know how I can get my local copy back, either from Tortorise or other?
have you tried "svn add path/to/your/local/file"?
If the file name was changed on the server then you just need to update to get the latest version, the old name problably will remain but just delete it.
If you haven´t committed the changes on your WC then just do a revert to undo all changes done on your side and then update the folder.

TortiseSVN - commit Item failed error

I use tortise svn in VS2010. When I go to commit my changes at the end of the day, I get the following error.
Commit item 'folder / filename' has copy flag but an invalid revision.
What does that mean and how do I resolve it? I Googled for it but really only saw a transcript of a rather esoteric discussion for a Java-related issue.
EDIT - 10/25/2010
Nothing? Really?
I agree with Pekka's comment. Right click on the project folder -> TortoiseSVN -> Check for modifications. Take note of the files you changed.
Create a new folder - and checkout the repository to the new folder. Move the files that changed back into the new folder, replacing any existing ones. Try your commit again.
You may try doing this with Windows Explorer instead of Visual Studio.
have you renamed that folder[say, folder1]?
If not then, "export" the content of that folder to somewhere else[say, folder2].
go back to parent of folder1 and delete then update folder1.
replace all the files[*not folder*s] in folder1 with the equivalent files from folder1
now commit folder1 independently after stealing any lock if exists.
What happens if you try to get the latest revision (update before committing, but after you back up your code ;)?
It sounds like there is potentially something that is in conflict in a bad way - you may need to back up your files, update or check out a new working copy, and then replace checked out files with your old ones.
check out a clean copy. put in the changes you previously made. commit.
do that, and try to forget your problems. it should work.

Resources