简体   繁体   中英

How to view/compare a file's history in Delphi?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM