Folders and files not showing in CVS Synchronize with Repository view in Eclipse - eclipse

Going to the CVS repository perspective and viewing the files shows them, so they checked in just fine, and doing an update will bring them into the project. It is only the synchronize that is having problems.

I have noticed that, when synchronizing trees that do not contain source files such as *.java files causes the cvs synchronize view to look strange (there is an update to be done but it cannot specify the path). Usually, you would actually want to see what is updated..
So, the solution as per me is to perform a team->update on project root level, or to use another cvs client to make the update. (TortoiseCvs works)

I'm not sure if this is the problem, but do you realize files won't appear in the synchronize view if they are identical to the files in the repository?

Related

Eclipse CVS Commit, ignore certain file types

I have a rather large project made up of lots of...projects, each with their own Debug and Release folders along with a bunch of other files that I don't really want to commit like .rc and .user.
At the moment I right click the top folder, click commit and eclipse asks how i would like to store all these "new files" it has detected, how do i tell it I don't want to commit any of them.
So far i have read that i need a .cvsignore file but that doesn't seem to make a difference. I tried doing a "clean" of the project but there was still plenty of files i don't want.
Does anyone have any advice on how to make this at the very least less painful? I have even tried doing a search on the project for certain . files I don't want and deleting them but some of them re-create themselves....
Note: I usually just commit the files I want by selecting them individually but this time it is about 600+ files...
UPDATE
Sorry for taking so long. Thank you to everyone for their answers, they are all technically correct, none actually worked for me, but i will mark Burhan as the best answer
I have tried the cvs ignore route before and it never seemed to work, unfortunately it still didn't work for me.
The per directory approach does seem to work but its quite a painful process in this case. But khmarbaise is correct this is the documented method, and is actually correct.
The Global method Burhan mentioned seemed ideal but didn't seem to work, Perhaps i have mis-understood where CVSROOT is, i always assumed it was the "CVS" folder located in the top most directory, it includes files like "Tag", "Root" etc. is this wrong?
#thkala, the "Team->Add to .cvsignore" was always greyed out for me and therefore could not be used but again is another valid route when it does work.
However I think i have finally realized why I have so many problems with CVS and eclipse and i would like to post what finally worked for me and what may actually be the missing link for the .cvsignore route.
I always checked the project out this way: CVS Repositoris -> Right click the branch -> check out as -> check out as project in the workspace.
However the reason i was having so many problems with cvs and indexing what i should have done is:
*CVS Repositoris -> Right click the branch -> check out as -> check out as ...New Project Wizard. -> retype branch -> Makefile Project with Existing code * (as a side note does anyone know how to specify the directory for the new project?)
Anyone who didn't do this and doesn't want to re-checkout can remove the project and re-add it using "new project"
At this point "Add to CVS ignore" was no longer greyed out. So you can now use that route if you want.
At this point however i tried something else i hadnt used before Team->synchronize with repo. This Seemed to bring up only the Changes i had made and therefore did not have any of the "new files" which was all the files i didn't want to commit. I was therefore able to simply double check the folders and then do a blanket commit on all those files in the sync view. It is really important to note that I actually had some build generated .h and .c files, so if i had succeeded in ignoring certain files, i would have still checked in these unwanted files (silver lining i suppose).
Perhaps i should rephrase the question to "large commit" to be more helpful to future cvs + eclipse newbies? anyone agree?
You can add a .cvsignore file on a per-directory basis containing the files in the directory that you want cvs to ignore. Note that if you want this to persist, you will have to commit that file too. #khmarbaise pointed to some documentation that talks about what kind of thing you can put in this file.
If you want to ignore certain file types on a global basis, then you should check out the CVSROOT module and make additions to the cvsignore file in that module (note that lack of a "dot" at the start of the name). Don't forget to commit this change for it to take effect.
Both .cvsignore and cvsignore files can contain the same types of information.
You can create a file which is call cvsignore which contains certan file types. I can't remember if it's called ".cvsignore" or "cvsignore". Check the documentation.

Subclipse / Subversive: Any way to filter out files modified locally

Is there any way using Subclipse or Subversive to apply some kind of filter on Package Explorer that will hide all files that weren't modified locally?
It would be sometimes very useful when I just want focus on my local changes (for example to revise them). I know that files that were modified locally are marked in Package Explorer (in Subclipse by "star" symbol) but in big projects with hundred of files it doesn't help that much (it would be much easier and clearer if only modified files would be visible).
Of course packages containing modified files should be visible as well.
Have you tried the Synchronize view? This shows all your changes in a view which makes it easy to work with the items. You can also create and group items by changeset when using this view.
Using Subclipse, I set the Synchronize view so that all SVN projects in my workspace are synchronized. I then pin it and set a schedule to refresh every hour. Local changes refresh immediately, the hourly schedule is for how often to check the repository for incoming changes.
You can out the view in Outgoing mode if you only want to look at your local changes.

[SVN]: Synchronizing folders

I have a folder where I keep checked-out version from Aptana Subversive SVN plugin. I have another folder where the checked-out copy from Eclipse resides. Both, Aptana & Eclipse, are using the same repository. Though the repository is the same, but I am using two different working folders. Sometimes I use Eclipse to work with the same set of files in the repository and sometimes I use Aptana.
I want a tool that can synchronize the two working folders automatically. Is there any free tool?
Actually, SVN is the tool to do just that. If you fight SVN, you will run into trouble, because you might not have both working copies updated to the same the same revision, the merge tool messes up the hidden .svn folders and whatnot.
Why do you think you need to manually synchronize those two working copies? If you want to work on both simultaneously without disrupting other's work because you keep checking in half-baked things, consider working on a branch. Doing so, you make use of SVN, which was designed to keep two working copies in sync. If you're done with whatever you're doing, merge that branch into the trunk (or whatever branch you were working at) and throw it away.
If you feel like all this checking in might make your repository become too big, get a bigger disk to store it on. The very first time you or that tool messes up manual merging, it would have payed off. If you're afraid of bumping SVN's revision count without doing actual work, get a grip.
Araxis Merge has automated merge.

Moving folder in SVN, having a bit of trouble

I have a project on codeplex and I'm trying to reorganise the tree structure so it makes a bit more sense and is easier to work with.
This is my current layout:
TopLevel
|-->src
|--->ProjectA //This is where all the files are held
|-->Core //plus three more folders
|-->MyProject.Core
|--->trunk
|-->src // I want to move all the folders and files in ProjectA into here
So I want to move all folders and files under ProjectA to ProjectA.Core/Trunk/src.
I checkout the whole source tree and right-clicked dragged the folders under ProjectA folder and selected "move versioned files here" into the src folder, that marked the folders in Project for deletion but the new files in src still had the green tick next to them and not the blue plus button.
After I commited the changes I had a look in the repo browser and saw that the folders hadn't been moved and were still in the ProjectA folder.
How can I move folders and the files in those folders to a different folder in subversion? Without loosing version history.
I'm using TortoiseSVN.
EDIT: Turns out it must have been codeplex, I moved my project to google code and everything works fine.
This type of reorganisation is easy to do with the Subversion command line client, which might be a viable option for you. Here's the commands that would do it (from the TopLevel directory):
svn mv src/ProjectA MyProject.Core/trunk/src/
svn ci -m "relocate ProjectA"
You can also combine both commands into one by using URLs as the source and destination, see the svn mv documentation for details.
I haven't found an easy way to do this sort of thing with TortoiseSVN, so when I need to I just use the command line client to do it.
I don't know what I was thinking when I suggested to export and import the files. I think I've been away from TortoiseSVN too long. I recall that tortoise svn actually has a really easy method of moving whole directories. It's not just obvious... but it's not clear why you can't get the result committed correctly to the repository. Presumably you did commit on the parent of all these folders.
Here's the summary:
You must select the folder and files you wish to move, and after doing so right click on the selection and drag it with the right button to the new location. You will get a context menu asking if you wish to relocate the files in the repository. This retains the history. Now your old files are marked for deletion and your new files should be marked as added. (I've found the status icons to be... not always representative of the true status). Commit this as one commit. I like to be picky and use check for modifications on the root of the checked out files, and then select exactly which changes I want to commit before doing so.
In the case of just moving one folder like this, open a window that is a parent to this folder, and another window that will be the new parent of this folder. Right click and drag all in one motion. I can't believe it takes this much text to describe a simple mouse action.
The standard strategy for dealing with nasty moves is, in the worst case, create all the new directories, move only the files from the old directories to the new directories, and then remove all of the old directories. This should get around almost any problem you encounter, and you can take shortcuts (moving entire directories and or trees) where that does work.
This will preserve history on all files. It will not preserve history on directory creations, but usually this is something you can live with, since you do have history for all of the file moves, which include the old and new directory names.

TFS - Branching for experimental development: Solution fails to load

Disclaimer: I'm stuck on TFS and I hate it.
My source control structure looks like this:
/dev
/releases
/branches
/experimental-upgrade
I branched from dev to experimental-upgrade and didn't touch it. I then did some more work in dev and merged to experimental-upgrade. Somehow TFS complained that I had changes in both source and target and I had to resolve them. I chose to "Copy item from source branch" for all 5 items.
I check out the experimental-upgrade to a local folder and try to open the main solution file in there. TFS prompts me:
"Projects have recently been added to this solution. Would you like to get them from source control?
If I say yes it does some stuff but ultimately comes back failing to load a handful of the projects. If I say no I get the same result.
Comparing my sln in both branches tells me that they are equal.
Can anyone let me know what I'm doing wrong? This should be a straightforward branch/merge operation...
TIA.
UPDATE:
I noticed that if I click "yes" on the above dialog, the projects are downloaded to the $/ root of source control... (i.e. out of the dev & branches folders)
If I open up the solution in the branch and remove the dead projects and try to re-add them (by right-clicking sln, add existing project, choose project located in the branch folder, it gives me the error...
Cannot load the project c:\sandbox\my_solution\proj1\proj1.csproj, the file has been removed or deleted. The project path I was trying to add is this: c:\sandbox\my_solution\branches\experimental-upgrade\proj1\proj1.csproj
What in the world is pointing these projects outside of their local root? The solution file is identical to the one in the dev branch, and those projects load just fine. I also looked at the vspscc and vssscc files but didn't find anything.
Ideas?
#Ben
You can actually do a full delete in TFS, but it is highly not recommended unless you know what you are doing. You have to do it from the command line with the command tf destroy
tf destroy [/keephistory] itemspec1 [;versionspec]
[itemspec2...itemspecN] [/stopat:versionspec] [/preview]
[/startcleanup] [/noprompt]
Versionspec:
Date/Time Dmm/dd/yyyy
or any .Net Framework-supported format
or any of the date formats of the local machine
Changeset number Cnnnnnn
Label Llabelname
Latest version T
Workspace Wworkspacename;workspaceowner
Just before you do this make sure you try it out with the /preview. Also everybody has their own methodology for branching. Mine is to branch releases, and do all development in the development or root folder. Also it sounded like branching worked fine for you, just the solution file was screwed up, which may be because of a binding issue and the vssss file.
#Nick: No changes have been made to this just yet. I may have to delete it and re-branch (however you really can't fully delete in TFS)
And I have to disagree... branching is absolutely a good practice for experimental changes. Shelving is just temporary storage that will get backed up if I don't want to check in yet. But this needs to be developed while we develop real features.
Without knowing more about your solution setup I can't be sure. But, if you have any project references that could explain it. Because you have the "experimental-upgrade" subfolder under "branches" your relative paths have changed.
This means when VS used to look for your referenced projects in ..\..\project\whatever it now has to look in ..\..\..\project\whatever. Note the extra ..\
To fix this you have to re-add your project references. I haven't found a better way. You can either remove them and re-add them, or go to the properties window and change the path to them, then reload them. Either way, you'll have to redo your references to them from any projects.
Also, check your working folders to make sure that it didn't download any of your projects into the wrong folders. This can happen sometimes...
A couple of things. Are the folder structures the same? Can you delete and readd the project references successfully?
If you create a solution and then manually add all of the projects, does that work. (That may not be feasable - we have solutions with over a hundred projects).
One other thing (and it may be silly) - after you did the branch, did you commit it? I'm wondering if you branched and didn't check it in, and then merged, and then when you tried to check-in then, TFS was mighty confused.
#Kevin:
This means when VS used to look for your referenced projects in ....\project\whatever it now has to look in ......\project\whatever. Note the extra ..\
You may be on to something here, however it doesn't explain why some projects load and others do not. I haven't found a correlation between them yet.
I think I'll try to re-add the projects and see if that works.
#Cory:
I think that's what I'm going to try... I have about 20 projects and 8 or so aren't loading. The folder structures are identical from root... ie: there aren't any references outside of DEV.