Search code examples
visual-studio-2017visualhg

VisualHG in VS 2017: commit all projects in a solution


I have a C# solution with projects that are not all in folders under the *.sln directory. If I make a change in a file from such a lateral project and then try to commit the solution (as shown in picture below) these changes are not listed, but only those made in projects under the solution directory.

enter image description here

My experience is that the property to see differences from all projects, independently from their physical locations, is sometimes present. Sometimes not, however, and I do not see why. Where are the configuration data for VisualHG in VS 2017 telling it which projects to consider (when pushing 'commit solution')?


Solution

  • I do not know how to find these settings, either (to my experience, what you have described, happens really), but I can propose a workaround.

    Namely, you can simply create a batch file (something like my_batch_commit.bat) where you will have a list of all local folders with your partial HG repositories, e.g

    cd C:\MyProjects\Project_A
    thg commit
    
    cd C:\MyProjects\Project_B
    thg commit
    
    cd C:\MyProjects\Project_C
    thg commit
    
    REM ...
    

    the folders are those where the corresponding .hg directories lie. thg.exe is the name of the Tortoise HG GUI (must be retrievable via PATH, but if Tortoise HG is correctly installed, this is fulfilled automatically).

    If you now execute the batch file, you will be presented with a number of THG instances, one for each HG repository, so you can deal with them one after another.