This project is read-only.

Greedy VisualHg

Jul 26, 2011 at 2:39 PM

Why does VisualHg's automatically add files to Mercurial select files which are NOT in the Visual Studio Solution?  It is pulling in _ReSharper, _UpgradeReport and many other files.  It is quite difficult to undo this if you have not touched the .hgignore file.

What I was doing was taking an existing Visual Studio solution.  Created an Hg repository in the SLN folder.  Then open the solution with Visual Studio.  With the source control VisualHg selected all files were added that existed in the folder.  It was not limiting the add to only the files in the Solution.

I would expect VisualHg to only manage the files contained in the Visual Studio Solution.  I would have to use TortoiseHg or other Hg tools to manage the other files.

Jul 26, 2011 at 6:33 PM

This is my initial .hgignore file that I am testing out.

syntax: glob
#-- Directories

#-- Files

Jul 27, 2011 at 3:38 AM

See for a more comprehensive .hgignore lists for VS. 

Jul 27, 2011 at 2:35 PM

Yes, I saw those.  I put some thought behind what I posted.  The filtering of /bin and /obj will filter out majority of the individual files that have been added to the .hgignore files I found.  I wanted to allow a developer the ability to add artifacts into the VS solution that would otherwise be ignored by the explicit files listed in the .hgignore you have linked to.  Yes, binary in Mercurial is not a good thing but at times there are some binary artifacts that need to be stored with the project.  It just seems redundant to have the files listed that are automatically filtered out when filtering directories.  The files area I was using to filter files that should be unique to each workstation and not version controlled.  

Aug 21, 2011 at 4:24 PM

Hi All, 

I am very new with this VisualHG.

Currently I am trying to setup the ignore list, by updating the .ignore file.

However inside the HG Pending Changes windows the files inside the "obj/" folder are still there.

Is there anything that I need to do after I modified the .ignore file?


Thank you for advance.

Aug 22, 2011 at 4:00 AM

HP: Once a file is commited to source control the .hgignore file is irrelevant - it only filters files in the adding process. That way you can still commit the odd DLL etc. Use to TortoiseHg / Mercurial command "forget" if you want to remove a file from source control but keep it on local disk. Use "Remove" to delete the file from everywhere.

Aug 31, 2011 at 8:35 AM

Hi cadbloke, 

Thank you very much for the answer.

Sep 2, 2011 at 2:07 PM

After using VisualHg for a while I have come to like the auto add aspect of it.  I didn't realize how useful it was until I was working on a solution that used a different client that didn't auto add.  The .ignore file that I have posted is still working quite well for me.