We use TFS2010 source control, gated check-in and build services. To save time, we use incremental build (Clean Workspace = None).
Recently, a developer did the following in his Visual Studio 2010:
Rename MyClass.cs to Base.cs
Add new MyClass.cs
He tried to checkin this. However, the gated checkin build failed in the "Get Workspace" step with:
BuildError: The auto merge option is not supported for the conflict on item .
After that, the build agent's workspace appeared to remain in some inconsistent state. Other people's checkins produced all kinds of weird build errors on other files that were included in that shelveset.
To work around, we eventually deleted the workspace manually, and that solved the issue (we could've also temporarily set Clean Workspace = All).
So:
Is this - shelveset with rename+add SC operations corrupts workspaces - a known issue?
We developed this problem with the .sql files for our database project. It had been working fine, then out of the blue we started seeing this error (the C# files caused no issues).
I set "Clean Workspace = All" as alluded to by Betty in the OP's comments and ran a test check-in. That seemed to fix things. I reset "Clean Workspace = Output," as I'd had before, and things seem to be working fine now.
Related
I've looked at the answers to similar questions here, and none fit the bill, or manage to solve the issue.
Using Eclipse Neon.3 (4.6.3) with EGit 4.7.0, and no other versioning system like SVN or CVS, calling Team > Synchronize on some of my Java projects, which have been synced with a Bitbucket repo many times over, and which show absolutely no changes whatsoever in the compare editor, including any whitespace differences, Eclipse still lists several .java source files as Outgoing changes under the "Java Workspace" model.
So for instance, calling Team > Synchronize on a project in my workspace, that is tracked in my local Git repo and remotely in a Cloud hosted Bitbucket, returns the following message:
There are no more Incoming/Outgoing changes for Git Commits. However Java Workspace has changes in Incoming/Outgoing mode.
Change to Java Workspace
Show All Models
A Google search for "However Java Workspace has changes" only yields a single result:
The sole hit is a reported bug in Subversive (one of the two main SVN integrations for Eclipse). However, while the described issue sounds like a rather accurate match of the issue I'm having, it claims that doing another Team > Synchronize, or restarting Eclipse would resolve the phantom Outgoing changes. Not so in my case, not with EGit.
Like I said, the remote and local files are exactly the same, incl. their whitespace/line endings.
Fetch/Pull from origin says there are no changes, everything is up to date.
Calling Replace With > HEAD Revision also doesn't help, Eclipse keeps insisting, that my workspace has Outgoing changes. Outgoing where?
This is obviously no big issue, merely an irritating nuissance. Still would be nice to get to the bottom of it.
...Did you try doing the Eclipse dance?
Edit: I find after some time Eclipse will behave strangely (example: dumping views I have enabled, losing track of files, or behaviour similar to what you are experiencing). When this happens I usually select and delete the project from my workspace, close Eclipse, reopen it and reopen the project.
I don't know why this happens or why this works as a fix.
OK, I admit that I must have screwed up when I started using EGit. I started using Eclipse Galileo as a welcome alternative to Notepad edit and command-line compilation. Somewhat later I discovered that Git was integrated into Eclipse, and happily started using it.
I do not remember all the details, but it seems that I made an initial mistake that has been carried on from one computer to another and one Eclipse upgrade to another.
I have consistently tried to specify that source files are in project subdirectory src and their products are in project subdirectory bin. Git wants to archive anything in bin, as well as project metadata at the same directory level.
In the past I have been so mono-focused on the project that I just sprinkled gitignore files everywhere and clicked on "Ignore" when preparing a commit. But now that the project has been brought to a dead halt due to problems in Eclipse Kepler I have resolved to try to disentangle the mess while upgrading to Eclipse Luna.
As I see it, there are three alternatives: (1) Figure out a way to separate the various directories, (2) Brute force copy-and-paste the 300 some-odd source files into a new, clean directory structure (complicated by the fact that there are currently four open Git branches and several uncommitted changes) or (3) copy the current mess and continue to deal with extraneous "changed" files.
Alternative number one is of course the most desired.
Any suggestions?
(Later)
Please be patient with me. I am a newby in this venue. But quite experienced in other venues, where I learned to search for similar questions before posting.
I did try to search for similar problems, to no avail. I also noticed that, while composing my question, there appeared a list of other questions that might be related. None seemed applicable, so I ignored it. When I came back to see if there were any answers, there was the list again and this time I found Eclipse + EGit: clone project into workspace. Perhaps it was there at the top of the list when I finished composing. I'll know to look next time.
I tried the first recommendation, cloning via EGit from the current location to a new one. It seemed to work okay, but there are a couple of things missing: Only the specified branch is available (not MASTER) and the extensive history for the last three years is reduced to one entry dated at the time of cloning.
Fortunately, the other three branches (including MASTER) are not currently divergent. If necessary, I can manually create them again - if there is some way to recover or display the complete history in the clone.
I was not surprised to see that the several unstaged changes in the source were not present. I can deal with those manually, but I wonder if it would help if I staged them before my next attempt to clone?
(Staging those changes may or may not be possible. I became very frustrated with problems using Eclipse Kepler and gave up trying to do anything more to resolve the problems several months ago. I did not document the problems, and by now have forgotten what they were. I have a vague memory of trying to commit current changes and running into fatal errors.)
Now I think I have a more focused question - or rather several questions:
(1) When upgrading Eclipse to a new version, is EGit cloning the easiest way to continue an existing project on the same disk? Should I just copy the original directory? Should I first clone to GitHub and then clone back to the disk from there?
(2) Should I attempt to stage the uncommitted changes before cloning?
(3) Why is Git history reduced to one entry? Would it help if I let MASTER be the default branch and then what? Check out the current (rather lengthy) branch? Or something else?
(4) What should I do about .project, .settings and other configuration files? Is it okay to copy them into the new directory structure in the desired places? Or should I make note of all settings and reconstruct them in Eclipse Luna?
I'm using Eclipse (Spring tool suite to be exact) for a Maven project and the TFS plug-in v14. I'd like to ignore some files which are tracked by TFS, as they'll change between development machines. However, despite adding all files to be ignored to .tfignore, they are still detected as pending changes.
For instance, the following files are present on the project root:
.classpath
.project
.springBeans
.tfignore
pom.xml
The tfignore file:
\.project
\target
\src\main\resources\profiles\DEV
\.tfignore
\.classpath
\.settings
\.springBeans
I've also tried adding \.*, .springBeans. I've tried checking in the tgignore file before any changes as well, all to no avail.
Excluding changes only works temporarily as when switching branches, all changes must be shelved or undone.
When performing the same operation through the Eclipse context menu for TFS (Team > Ignore) the error "Exclusions could not be added for some items
Error adding exclusion for C:\Users\user\Documents\workspace-sts-3.6.3.SR1\VTS\.springBeans parentPath must not be null" is shown
For the \src\main\resources\profiles\DEVpath, I'm able to cloak the folder server side, but am not able to do so with files in the root of the project (this would cloak the entire project). The option to cloak individual files is not listed through TFS.
Is it not possible to ignore files locally from source control once they're added? I would expect this to be possible.
After researching a bit, I've found that tracked files cannot be ignored by Team Explorer Everywhere TFS Eclipse plug-in. The source will need to be cloaked to ignore local changes from being detected under pending changes.
As for files in the root of the project which change based on a developer's environment, these should be removed from source control all together. Initial setup of the environment should produce these derived files (setting this flag in Eclipse also has no effect on tracked files). Once placing these in .tfignore, the plug-in ignores these as expected.
Is there a way to tell TFS that one or more files has been moved/renamed by another application (in our case, WebMethods 9) running in Eclipse? We have to move/rename the files using WebMethods and not TFS, because WebMethods does a whole lot of automatic reference updating. However, we haven't found a way to tell TFS "hey, trust me - I moved/renamed/deleted it outside of TFS". Instead, it refuses to commit any changes back to the repository until the old file reappears.
We're working around this at the moment by creating dummy files with the old name and then deleting them again via TFS, but you have to agree that kinda sucks. I'd be happy to treat a move/rename as a deletion of the old filename and creation of the new filename; I just don't want to have to fight TFS over it.
Eclipse: 3.6.1.M20100909-0800
TFS plugin: 11.0.0.201306181529
It depends on whether you use server workspaces or local workspaces.
In a server workspace, TFS requires that you inform the server for every change - to check out a file, rename, delete, etc. This allows TFS to avoid scanning your disk for changes, which is beneficial for large repositories. If you want to force a disk scan with Team Explorer Everywhere, because you may have made some changes outside of Eclipse, you can go to the Actions menu and select Detect Local Changes.
In a local workspace, TFS will examine your disk for changes every time you look at the pending change status. So all you have to do is run tf status or click refresh in the Pending Changes View to see changes made to files outside of Eclipse.
If your workflow involves files changed outside your IDE frequently, I would strongly recommend using local workspaces, however this requires TEE 11.0 and TFS 2012 or better.
We have a new ASP.NET project on VS 2008 environment, and a new TFS server was setup for it, but originally the bin folder of the project also got checked-in.
The team has about 10 active developers at a time and it a big issue now as some of the common libraries remains checked-out by someone or other.
As per the best practice, I now wish to fix this issue and remove the bin folder out of the version control AND I need to ensure that from now on, when a developer checks-in his project, the bin folder again does not gets checked-in. How do I ensure the both things with the correct approach? It would be great if I can do something as an TFS Admin so that from the next day all developers automatically get some settings pulled into their boxes so that they stop checking-in the bin folder once I have removed it from TFS control.
I am a beginner in TFS, as earlier I used SVN primarily, so please point me to the proper steps, documentation. Thanks!
Delete the bin folder in solution explorer, this will add a delete to the pending checkins.
A build should re-create the bin folder, but not add the folder to the project (and thus there'll be no prompting for it to be added to version control).
This won't prevent someone adding it (or anything it contains) back into version control outside of VS (eg. from the command line, or adding the bin folder back into a project). I don't think there is anything you can do to stop arbitrary files being added except training (if your developers cannot handle this, how do they handle all the other "don't do that"s associated with development?)
Updated, since this was written TFS (including VSTS and Visual Studio1) allow files and folders to be ignored via a .tfignore file.
1 Often Visual Studio does not pick up changes to the .tfignore file, needing a restart.