Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7443563
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T11:20:58+00:00 2026-05-29T11:20:58+00:00

Is it possible to setup VisualHg such that i’m automatically presented with a commit

  • 0

Is it possible to setup VisualHg such that i’m automatically presented with a commit screen every time I quit Visual studio 2010?

This would be extremely useful if I forget to commit some changes.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T11:20:59+00:00Added an answer on May 29, 2026 at 11:20 am

    I’ve managed to do this using the following steps:

    1. Select Tools > Macros > Macros IDE from the VS 2010 IDE.
    2. This should present you with an empty IDE with Project Explorer on the left
    3. Expand MyMacros and double-click on EnvironmentEvents

    This gives you a file which is set up to handle IDE events. Before the last End Module in the file add the following code:

    Private Sub SolutionEvents_BeforeClosing() Handles SolutionEvents.BeforeClosing
        DTE.ExecuteCommand("File.Commit")
    End Sub
    

    This will execute the commit action before the solution closes (which will happen before Visual Studio closes) but VS doesn’t wait for the commit window to close before carrying on. This isn’t ideal as it means that you’d have to re-load the solution if you wanted to make any changes before committing.

    An alternative solution would be to handle the QueryCloseSolution event and ask the user if they want to commit their changes before closing. If they answer “Yes” then you’d cancel the close solution (by setting the passed in boolean to be True) and call DTE.ExecuteCommand("File.Commit"). That would then leave the solution open whilst you did your commit but would ask you if you wanted to commit every time you close the solution.

    Taking that solution further would involve launching hg status from the QueryCloseSolution event to check if there are outstanding changes before asking the user if they want to commit their changes.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it possible to setup visual studio so that i can go to definition
When creating a setup/MSI with Visual Studio is it possible to make a setup
First, I know it is possible to setup Visual Studio keyboard scheme in Eclipse
Is it possible to setup HSQLDB in a way, so that the files with
Is it possible to setup vdproj so as new UpgradeCode is generated for every
Is it possible to setup Eclipse so that, when I am switched between working
Is it possible to setup a view in Database A that references a table
is it possible to make setup installation for WebService ? that the installation will
In Xcode 4 is it possible to somehow setup so that with one click
Is it possible to customize the syntax highlighting in Visual Studio 2005? Up to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.