The title says it all. I made some changes & closed/re-opened Delphi, so I Can't use Ctrl-Z to undo my changes.
How do I compare the current file with previous versions?
For code only, if you don't have a version control system installed, you can view recent changes by using the History tab at the bottom of the code editor window, and then click the Differences tab. How far back you can go depends on how you've configured it; the default is 10 revisions. You can change the default in Tools->Options->Editor Options->File backup limit.
In the absence of any other revision control system there is a History tab in the code editor window - from there you can view a side-by-side diff with previous saved versions by using the Differences tab.
If you installed BeyondCompare with XE8 then you can also access a revision history of your files by selecting (with the file of interest open in the IDE)
Edit -> Compare -> History Compare...
This will present you with a list of saved revisions. Select one and click the Show Diff... button to present a side-by-side comparison.
Going forward, I would seriously consider using dedicated revision control. Commit often and this type of situation should never be a problem for you.
if you have a version control system then use this.
else: if you use Win7 then right-click the file, choose properties and see "older versions". You have to have enabled this Win feature beforehand...
else: your previous versions are lost
Related
Using TFS 2010
I am going back to the previous versions of several files across various projects(all of these were previously rolled back)
To do this, I View History on the project, and choose GetThisVersion.
This works fine.
I now want to see a list of all the files for which I have a previous version.
I expected these to show up in the View Pending Changes. But they don't. Why is that?
Do I have to explicitly check out the file first, and then go to a previous version?
Getting a file from the server (whichever version - latest or specific) doesn't check out the file. You have to check it out explicitely.
Depending on the options you have switched on ("Get latest version of item on checkout"), checking out a file may get the latest version at the same time. In this case, you may have to:
get a specific version first,
copy the files locally outside of TFS folders,
check out files and replace with the specific version.
In the source control explorer it says per file if we have the latest or not, and if you right click and view properties it says the latest version and the workspace version. Is there any way to see the overall latest version and the current workspace version (and possibly to add columns for the two on a per file basis rather than having to check each file's properties one by one)?
We are using both VS2012 and VS2013.
Not from the GUI but you can use the tf properties command to get that with /recursive option
http://msdn.microsoft.com/en-us/library/tzy14b58.aspx
Is this a bug in TFS 2010? Has anyone else come across this? Am I doing something wrong?
Steps to reproduce:
Right click on a folder in the Source Control Explorer and choose View History.
Right click a changeset and choose Compareā¦
For the Target Path, pick another (more recent) changeset and press OK.
In the resultant Folder Differences window, right-click on a file with differences and select Compare Files. Note the differences, and leave the compare tool open for future reference.
Back in the Folder Differences window, right click the same file and choose View. Choose the Source and confirm that you do indeed view the source version. (Cross-check with the compare tool left open in step 4.)
Back in the Folder Differences window, right click the same file and choose View. Choose the Target.
Expected result: to see the target version of the file.
Actual result: I get the source version of the file again.
Does anyone else get this?
Yes, this is a bug in VS 2010 and I can reproduce it using the RTM and SP1 versions. I can also confirm that this has been fixed in VS 2012 which is currently in Beta. As a workaround, when you right click on the item, select View History. This will show you the history of the file and from there you can right-click on the version you are interested and select "View".
Sorry about the inconvenience.
-Taylor, TFS Version Control Development Lead
I am still on the lookout for a Eclipse-like ROR IDE (at least it should have the functions that I am more or less used to having), and have decided to conduct a trial of RubyMine.
Unfortunately I quickly discovered two things:
Git log/history view: There isn't an equivalent for Link with Editor and Selection (it's the function that allows the history to be updated and limited to changes applicable to the active document at any point in time)
The closest is a per document history on separate tabs, there is no linking with editor or selection.
There is no way to reset to a particular commit (or branch from it) by right clicking on it. Is it really worse than gitk in this regard?!
Reset/branch at a particular commit is not possible at the Changes or the Version Control view (though possible via Checkout/Reset Head with ability to specify commit hashes). The context integration has room for improvement in this regard.
I would be very glad to be proven wrong on either/both counts.
Edit: Updated with input from CrazyCoder
There is no exactly this feature, but there is Show History from the file context menu. Multiple history tabs can be switched between in the Version Control panel.
Changes | Log panel has these actions in the context menu (New Branch, Checkout Revision).
I'm looking for an editor that lets me see all the changes I've made to a file on a line-by-line basis.
Eclipse does this. It maintains a "local history" of every revision based on file-saves. Has saved my a** more than a few times.
Eclipse has a local history that gets updated every time you save a file. You can open a change log for the file and compare it to previous versions. It can also recover deleted files.
Apple's Xcode 3.x has a Project Snapshot feature that snapshots all files, so that you can compare and go back later.
As for using a "real" version control system, of course, you should do that, too.
If you work in a group it is basically a must.
But that does not make local history tools provided by the editor obsolete. I see those more as a natural extension of Undo. Just like I cannot use Windows Notepad anymore because it has only one level of Undo, I am beginning to expect that editors let me undo changes that I made last week.
It is Eclipse. It also support multiple language by adding plugin. You can compare each change by comparing with local history. Only you have to take precaution, this tool won't help to revise the changes if you change the file other than eclipse editor.
You'll need some sort of version control software to keep track of all your changes, and a diff/merge tool. Most of the popular version control systems (Subversion, TFS, Source Safe, etc.) come with a builtin visual diff tool.
For example with Java, you can use Eclipse with a Subversion plugin called Subclipse.
There are also standalone diff/merge tools available. Here's a good one for Windows:Winmerge
If you like Vim, there is a builtin difftool called vimdiff. (This would be an example of an editor with diff capabilities).
I'm sure Emacs also has diff tools available, but I wouldn't know.
By using a revision control program like Subversion/CVS/Git you can use any editor and run for example "svn diff".
This is not exactly what you need but you may find it interesting.
There are no editors out there that saves revisions you made. Editors must connect to SVN in order to check their revision histories like in Zend Studio for Eclipse.