My edited files not appear in TFS's Pending Changes window - version-control

I am using VS2010's TFS and have this problem: after 'Get latest version', and try to edit the file, it does not appear in Pending Changes window. I have to use the option 'Check out to Edit' for every files I want to change. It makes me missing some files when working with a big project. Any one have idea to fix this?

Go to File -> Source Control -> Go Online and it will fix this problem.

I didn't see File -> Source Control -> Go Online option. I fixed it by clicking on item and selecting option to check out for edit. That worked.

Did you already opened the project that you are working on through the Source control window? If you do that and your solution is not yet bound to TFS it will be asked now. So bind your solution and projects and then your changes will be visible and you do not need to do check out to edit. You can also see if this is already done by checking if there are vssscc files next to your solution files.

Had the same issue after a connection problem - this caused VS/TFS to think I had nothing checked out. The solution was just to refresh the status via File, Source Control, Advanced, Refresh Status.

Restart Visual Studio and all could be well!

Go to Solution Explorer > Right click on solution > Click "Go Online"

Right-click on the specified file, then select check-in. whit this action file goes to the pending changes

For me, in the context menu of the solution I had an option to 'Add this solution to source control...'.
If you also have this option you should go and add it again. You can keep same location and Ignore All warnings.
For me only after doing this it started seeing the file changes again.
My solution was also online and apparently nothing else was wrong...

Our TFS had errors so after I got it back it only saw new userControls added not edited ones, this is how I fixed it:
RightClick -> Add Files To Source Control -> Keep Local Version (or server)
It had lost it's connection to the folder

I had the same issue with Visual Studio 2022. Go to the File > Source Control > Go online was solved my issue.

Had the same problem in VS2012, none of the answers above worked.
Fixed by opening "Go to All Changes" and including all missing files from there.
If I exclude any of these again, they do not appear under "Excluded changes", and have to be manually included from "Go to All Changes".

For VS 2017, if you have the red checkmarks next to your files,
open Team Explorer box/window -> Pending Changes,
select your files in Included Changes, provide comment
click on Check In button

In excluded changes, click on 'detected' and you will get a dialog box with all detected changes but not added to source control. Choose the changes u want to check in and then click on promote. You will be able to see the changes in the included section and you can check in.

For me was only solution making new workspace with shorter path without special chars. So I didnt use folders like users and stuff but ProgramFiles. Maybe it was because of Win 7.
And run VS as admin for making directories in ProgramFiles

VS2019 Check that all projects are bound there:

Manage Workspaces -> Edit (the workspace you are using)-> Advanced -> Change Location item from "Server" to "Local". This solve my issue

Pls check the mapping in source control.
Open Team explorer -> Source Control Explorer
Check the Local Path mapping.. if it is not appropriate, map it again with correct path.

In my case, the two files ".cs" that were missing in the "Included Changes" section, I have to follow these steps:
In the "Team Explorer" window - under the "Excluded Changes" section -, select the "Show All" dropdown and select the option "Custom filter".
In the text field that appears after the selection was made, type the name of the file - it's not needed to type the full name.
The file results will show and then, you can right-click over the files found and select "Include".
The included file(s) should now be shown in the "Included Changes" section.

Related

Workspace dialog is not coming

When I'm launching my eclipse application, the workspace selection dialog box is not coming. When I checked the settings in preference pages, the check box was selected for "Prompt for workspace on startup". Has anybody come across this situation?
If you wish to use another workspace than the default - or what have become the default - you can specify the -data <path> argument at start-up in the shortcut. I usually have a shortcut for each of my important workspaces - for the current set of active customers - and have linked these to my desktop.
Having said that, I don't know why you have the problem you have. The Prompt for workspace at startup setting usually works fine for me...
Yeah i think i know what you're talking about, i had this problem once, when i checked the box the problem got resolved, i would try unchecking the box, then closing eclipse, then open it up again and check the box and close it again, then see if the problem persists, if it does i have a way around it, if you want to switch to a different workspace then you can go to file-> switch workspace -> and then a recent workspace or select other to manually select a directory.
Hope that helped!
John
start eclipse using eclipse -clean
It will work.
Thanks to some comment on the eclipse issue: https://bugs.eclipse.org/bugs/show_bug.cgi?id=134412

Avoiding "resource is out of sync with the filesystem"

I develop Java code with Eclipse and regularly get this message:
resource is out of sync with the filesystem.
Right-click > Refresh will always clear this.
But why can't Eclipse refresh automatically when it finds this condition? Are there cases where you want the resource to be out of sync?.
If there are such conditions and they don't apply to my work, is there a way of getting Eclipse to refresh automatically when it encounters this state?. (I appreciate that it should refresh as little as it needs to in normal development to increase performance for human developers.)
UPDATE (2012-06-25):
My latest update (Version: Indigo Release Build id: 20110615-0604)
no longer shows
Preferences - General - Workspace - Refresh Automatically
There is an option "Refresh on access" - should I use this?
You can enable this in Window - Preferences - General - Workspace - Refresh Automatically (called Refresh using native hooks or polling in newer builds)
The only reason I can think why this isn't enabled by default is performance related.
For example, refreshing source folders automatically might trigger a build of the workspace. Perhaps some people want more control over this.
There is also an article on the Eclipse site regarding auto refresh.
Basically, there is no external trigger that notifies Eclipse of files changed outside the workspace. Rather a background thread is used by Eclipse to monitor file changes that can possibly lead to performance issues with large workspaces.
Just right click on the file or on the project and click Refresh. The error will vanish. I also faced the same issue and it worked for me.
Window -> Preferences -> General -> Workspace
For the new Indigo version, the Preferences change to "Refresh on access", and with a detail explanation : Automatically refresh external workspace changes on access via the workspace.
As “resource is out of sync with the filesystem” this problem happens when I use external workspace, so after I select this option, problem solved.
This happens to me all the time.
Go to the error log, find the exception, and open a few levels until you can see something more like a root cause. Does it says "Resource is out of sync with the file system" ?
When renaming packages, of course, Eclipse has to move files around in the file system. Apparently what happens is that it later discovers that something it thinks it needs to clean up has been renamed, can't find it, throws an exception.
There are a couple of things you might try. First, go to Window: Preferences, Workspace, and enable "Refresh Automatically". In theory this should fix the problem, but for me, it didn't.
Second, if you are doing a large refactoring with subpackages, do the subpackages one at a time, from the bottom up, and explicitly refresh with the file system after each subpackage is renamed.
Third, just ignore the error: when the error dialog comes up, click Abort to preserve the partial change, instead of rolling it back. Try it again, and again, and you may find you can get through the entire operation using multiple retries.
If this occurs trying to delete a folder (on *nix) and Refresh does not help, open a terminal and look for a symlink below the folder you are trying to delete and remove this manually. This solved my issues.
When you open an Eclipse workspace from within a clearcase view and try to rename the project, you will often get the pop-up warning ... “Resource ‘project’ is out of sync with the file system”. If refreshing the project does not fix the problem, then do the following workaround: a. Open workspace WITHOUT being in a view b. Select the project in Project Explorer c. ClearCase -> Associate Project (project should now look like project [] ) d. Right click project -> Refresh (vob sub-folders should now be empty) e. Right click project -> Rename ... f. Enter New name
Now you can close the workspace, reopen it in a view and refresh the project. You may also dissociate the project if you prefer the project not to be associated with the vob.
A little hint. The message often appears during rename operation. The quick workaround for me is pressing Ctrl-Y (redo shortcut) after message confirmation. It works only if the renaming affects a single file.
If you are a regular Eclipse user than you might have got this error many times. The error simply says, “you’ve made changes in files in your workspace from outside eclipse”. The simplest solution would be to select the project and press F5 (Right click -> Refresh).
if you need more explanation you can read from this web site
I was not able to resolve this error by either refresh or by turning on "native polling" workspace feature. Turned out my project was also opened in two instances of eclipse. Once I closed the other instance, the error went away. So make sure your project is only opened at one place if you are seeing this error.

Adding existing project folders to the project explorer in eclipse

Probably a very straight forward solution here, but can't seem to find an answer. I recently changed my eclipse workspace to my dropbox folder, so I can work on my netbook when in college and on my desktop when at home. I copied and pasted all my project folders from the old workspace into the dropbox workspace, changed the workspace location in eclipse, but none of the projects are showing up in the project explorer now. Having refreshed the project explorer many times now to no avail, is there any way to add these projects into the project explorer? Thanks
From the main menu bar, select File > Import. The Import wizard opens.
Collapse or click + in General > Existing Project into Workspace and click Next.
Choose either Select root directory or Select archive file and click the associated Browse to locate the directory or file containing the projects.
Under Projects select the project or projects which you would like to import.
Click Finish to start the import.
I have had this problem in many versions of Eclipse and followed the process outlined by #vijin-paulraj, but frustratingly kept failing...
Until I noticed that the checkbox at the bottom of the wizard "Copy projects into workspace" is checked by default, and does not have an eventhandler attached to it. So if you do not clear this box before selecting the directory it will tell you that "Some projects cannot be imported because they already exist in the workspace." Clearing the checkbox after this will not trigger a form refresh and the Finish button will remain disabled.
TIP: once the checkbox is cleared, select the directory again will trigger form validation and allow you to proceed.
Try importing existing project:
http://publib.boulder.ibm.com/infocenter/wf/v2r7m0/index.jsp?topic=/org.eclipse.platform.doc.user/tasks/tasks-importproject.htm
The answer for me was to make sure that I was in the correct working set.
I was in the working set from training and had not placed my new project into a working set at all.
While the above answers will most likely place your project into Eclipse, a working set will exclude you from seeing any project that is not placed in it from the package explorer.
My personal answer was to create a new working set to keep it separate from work, via the context menu from the upside down triangle at the top left of the package explorer.
Yours may be to modify your current set by adding the new project to it. This option is also located in the same menu.
My circumstance could have been avoided in the "new project" wizard, if I had placed it in a set from there.
I hope this has been useful. Please, feel free to ask for clarification.

How to activate revision info in line number view

I know of an Eclipse feature to show revision information (gradual coloring, more info like revisionnumber, date and author on mouseover) for the last changes in a line in the linenumbers-view.
Does anyone know how to activate this feature for a file, or even better, by default? I accidently hit some shortcut lately which made it show in one file, it does not show up in the others, though.
This is called "Show Annotation" and you can find it in the "Team" menu. Since this is a pretty expensive operation, you can't make it the default.
Regarding the shortcut: You have to enable the command group SVN.
Window -> Customize Perspective... -> Command Groups Availability -> check "SVN".
If you do this, some SVN actions show up in the toolbar which you can remove again (if you want) using the same Customize Perspective dialog (tab Tool Bar Visibility).
Remapping the shortcut did not work for me but enabling the command group did (with the default key mapping Ctrl+Alt+A).
(did not find a way to reply to Aaron's answer so I had to create a new one)
I found my way here while trying to find a way to get the option to show up with code from my git repository.
A lot of the logic in the other answers applies to git too, and I followed the equivalent steps for git but it didn't help me.
It turned out that my projects, although imported from a git repository, hadn't been connected to (or had become disconnected from) the eclipse git integration. I think this happened because I imported the projects before I installed the elcipse git plugin.
I needed to connect them thus:
Right-click your project (or multiple selected projects) in the Project Explorer
Select 'Team' > 'Share Project...'
The default settings were fine for me, but change them if needed
Click 'Finish'
I found this solution here.

Show modification (new and edited files) since a given date

How can I ask TFS to show me only modified files (new and edited files) in a workspace (or in a folder) since a given date.
Is it possible? or do I have to go myself through all the history and build my own "modification tree".
Open the Source Control Explorer in Visual studio (View->Other Windows->Source Control Explorer), and select the top folder for your project. Then right-click and view history.
This will show all check-ins for all code in this folder ordered by date. Then select two dates from the list of check-ins, right click and choose "Compare". For example if you wanted to see all of the code changed in the past month click the most recent checkin and the checkin from a month ago.
This will show all of the code changed since those two points in time. You can also choose just the past date to compare against your current code. This works in VS2015 which is what I'm using right now. Good Luck.
Use the command line
tf history -noprompt -server:http://tfsserver:8080/tfs/DefaultCollection $/TeamProjectName/path
-version:D2006-12-01T01:01:01Z~D2006-12-13T20:00:00Z -recursive
-format:detailed -login:DOMAIN\name,password"
change the dates in the version flag to what you need and it should get you what you want.
If you open the menu item File->Source Control->Find In Source Control->Changesets... (you must be in Source Control Explorer for this to be available). This will open the Find Changesets dialog. You can then search for change sets by date on a given source folder.
The down side is that you then have to click the details button on each change set to see which files were changed (Double Clicking closes the dialog).
If you are searching for changes this may be the better way. It will allow more interactive searching. If you are trying to print out a report for others to read (or for Change Documentation) then the command line way shown by Alex is better.
Open the Source Control Explorer in VS10 (View->TeamExplorer->Source Control Explorer) and right click to project and click Compare. You can see different options for view. I normally use "Show items that are different" in order to see difference between local and server.