开发者

Visual Studio 2010 - local history feature?

开发者 https://www.devze.com 2023-03-18 09:24 出处:网络
The last few years I\'ve been using Eclipse as an IDE. Recently, however, I started working with Visual Studio 2010 and I\'m intuitively searching for features I used in Eclipse.

The last few years I've been using Eclipse as an IDE. Recently, however, I started working with Visual Studio 2010 and I'm intuitively searching for features I used in Eclipse.

One such is the Local file history. Is there some extension or addon which provides such functionality ?

Another small feature that I'm missing is that I can't just double click on a window to enlarge it, t开发者_运维技巧hen just double click again and shrink it.


Not a great answer, but after looking around for this feature and not finding it I decided to build my own. Couldn't get the tool on Codeplex to work with VS2010. Anyway, this post was very helpful and got me on the road to a DIY solution. Note that this assumes that you are not using git as your primary VCS. I suppose if you're using git as primary then you'll want to use mercurial as your 'history' source control.

Steps:

  1. install git
  2. init an empty git repo in the same folder as your solution.
  3. create a VS extensibility project (see post above)
  4. put this to the OnAfterSave:

    m_RDT.GetDocumentInfo(docCookie, out flags, out readlocks, out editlocks, out name, out hier, out itemid, out docData);

    var ctext = string.Format("/c cd {1} && git add \"{0}\" && git commit \"{0}\" -m \"autosave {0}\" ", name, SolutionBaseDirectory);

  5. Now you'll have autosave [the file name] in your git history.


Look at this add-in Visual Local History it is for VS2008 but using adjustment found here you can use this add-in in VS2010, It works fine for me. Regards.


There is unfortunately no such feature for VS2010. The best I can suggest is to either use a full source control system such as SVN or TFS. I have also read that some people have used GIT as a means of local source control, but I cannot comment on this as I've never used GIT before.


you can download this extension. Visual Studio History Extension

And run it, restart your visual studio. Though, it keeps your changes, when you undo any item, that is a change. Therefore, it keeps your changes before from undo.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号