VisualHG adds untracked files

Jun 8, 2010 at 2:13 AM
Edited Jun 8, 2010 at 2:19 AM

I have a project which has a certain number of files that are automatically generated. I have them in the project but they aren't tracked in Mercurial. VisualHG will, from time to time, automatically 'hg add' them.

I haven't been able to isolate the exact causal event, but I suspect it happens when the code generator runs sometimes. It doesn't always happen so I don't have a repro, unfortunately. From time to time, I'll be doing a commit and I'll see a whole raft load of files have been added for me.

I would try to fix it and supply a patch, but I thought I'd ask first since the developer may know the mechanics of the directory watcher, or whatever is being used to add the files. I thought that VHG would look for new files. These files were already there and are just being overwritten. In case it helps, I'm just using a stream writer to update the files, like so:

    using (TextWriter w = new StreamWriter(path))
    {
        w.Write(text);
    }

Thanks for any help you can provide.

Todd

Coordinator
Jun 8, 2010 at 6:47 AM
Add these files to the .hgignore file. Bernd