0

Not to be confused with Mercurial .hgignore for Visual Studio 2008 projects and VS 2010 projects.

Visual Studio 11 ("vNext") includes many new features that should probably be excluded from a source code repository... for example, Application Life-cycle Management tooling and Metro related project info.

Question: What new extensions or changes should to be made to .hgignore and why?

Community
  • 1
  • 1
one.beat.consumer
  • 9,414
  • 11
  • 55
  • 98

1 Answers1

1

I see these sort of questions often and they differ only by the point release of the IDE in question. I never understand them. My usual process for setting up a new project in a new environment is:

  1. create the new project
  2. hg init
  3. hg status --unknown --no-status > .hgignore
  4. edit the new .hgignore to glob file types I'll see a lot of

Looking at the answers to the two similar questions to which you linked it looks like an essentially similar process would've worked.

I guess I just don't understand this broad category of question or why this is easier/faster to copy/paste than quickly assemble oneself. Unless one is doing a lot of (ill advised) hg addremove or hg commit -A there's no risk of accidentally tracking files one didn't mean to add.

Ry4an Brase
  • 78,112
  • 7
  • 148
  • 169
  • Thanks for the reply, though honestly your answer has confused me further. I am barely familiar with Mercurial, but I know with experience in Git it was very easy to accidently track solution files, build stuff, etc. With Mercurial I did not want to rely on a plugin like @jrummell suggested in comment. How do the `--unknown --no-status` switches make it impossible to track unintended files? – one.beat.consumer Feb 13 '12 at 19:51
  • Those don't make it impossible. That sequence just says "take everything that's currently unknown and ignore it". My aside at the end was about how nothing is ever automatically added, so just make sure that anything you `hg add` was typed not generated and you'll be tracking only the important stuff. – Ry4an Brase Feb 14 '12 at 04:02
  • 1
    I think that the question is really about what files should, or shouldn't, be in source control i.e. What is the important stuff? Your suggestion is not a good one for VS2010. For a web application it would generate an ignore file with 15 lines - 12 would need to be removed, the other 3 would need to be changed plus at least one more would need to be added. – Steve Kaye Feb 14 '12 at 14:29
  • I guess I've always worked in environments where it's very clear what's worth tracking -- things you've typed, not things you've generated. I don't use Visual Studio, but surely it doesn't make that test **too** hard to apply? – Ry4an Brase Feb 14 '12 at 16:38
  • 1
    Unfortunately, it does. There are a lot of generated files and it's really not clear which need to be in source control beyond the few obvious ones so you do need to google it. Also, the list seems to change with each version of Visual Studio. – Steve Kaye Feb 14 '12 at 20:23