Search
Monday, October 22, 2018 ..:: Home ::.. Register  Login

Peter Henry on Facebook  Peter Henry on LinkedIn  Peter Henry on Twitter

   Calendar  
     
  
   Search  
     
  
   Blogroll  
     
  
   Disclosure  
All blog entries are the opinions of the author and do not necessarily reflect the opinions of their employer. All the code presented is for explanation and demonstration purposes only. Any damages incurred to your site and/or data are not the responsibility of the author. Every effort is taken to ensure the code properly compiles, however sometimes there are some hiccups and you might be required to do your own debugging.
     
  
   TechTidBits (Blog)  

SVN's ignore list, what's in your list?

May 12

Written by:
Tuesday, May 12, 2009 7:46 PM  RssIcon

If you're new to source control, you might find the concept of "ignoring certain files" a bit disconcerting, but that's ok.  It's one of many source control's "best practises."  The only "trick" is picking which files to ignore.  Read on for some insight's on picking some and a sample SVN ignore list.

Today I got burnt.  I got "the flower."  It's not a complimentary thing, at our company, we have "the flower" (with a dead fly in it, yup, the bug LOL) for when someone does something silly/stupid/dumb or "tim-like" (aaaahhh memories of university haha), we also have a "the scarf of fame" for when you do something great, worthy of bragging or just something outstanding/stellar!  (Yes we have some fun at the office LOL)  The first if meant to poke some fun and keep thing light hearted.  The former is meant for the team to acknowledge each other (very Agile isn't it?!). 

Ok, back to why I got "the flower."  I got it cause I forgot to check in a Logger.cs file on Friday night.  Well, I didn't actually "forget" but I didn't check it in neither.  It broke the build, and thus, "the flower."  So what happened I thought?  A BIG WTF moment shortly followed by an even bigger AHA!!!!!!!  It turns out I had missed a *. in my SVN ignore list.

When your using source control, it's never a good idea to check things in which are derived/compiled or otherwise assembled from the tools you're using.  So for example, you don't check in executables or debug/release directories because you already have the source code to properly regenerate those deliverables.  First, these other files take up a lot of unnecessary space.  Second, you can ALWAYS get them back, IF you're doing proper source control that is (but I'm assuming you are haha).

If you're using SVN/TortoiseSVN, you add/change this right off of Settings and the General option in the tree.

SVNs Ignore List

So what's the big deal, just put in the files you want to ignore and be gone with it.  hhhmm if it were only that easy eh?  What files do you want to ignore?  Can you use the same list as everyone else on your team?  What about Java vs C# vs VB.NET vs (ugh) COBOL or FoxPro?  I can't speak for most of those, but for C#/.NET/VS, here's what I use for SVN.  Feel free to copy mine, the only thing I ask is to leave a comment please.

[Bb]in [Oo]bj [Oo]bject [Dd]ebug [Rr]elease *.[Uu]ser *.[Ss]uo [Dd]esktop.ini [Tt]humbs.db *.[Ll]og *.[Cc]ache *.pdb

The first few (Bin, Obj, Object, Debug, Release) will ignore any of the directories which VS uses for compiled code.  *.User and *.Suo files are user specific files VS uses, are developer specific, have no bearing on compiled deliverables and should not be in source control.  Desktop.ini and Thumbs.db are hidden files Windows uses for itself and again, have no bearing on the compiled output, they just served to muddle things up if they're in there.  *.log files shouldnt' go into source control neither as they are usually to help out developers doing development.  *.cache files are to speed up runtime execution only.  And *.pdb files are special debugger/symbol related files VS creates upon compilation and again, don't belong in source control.  The square brackets are for optional characters. 

So what I did to deserve the flower?  I accidentally put another entry on the end of my ignore list of [Ll]og*.* which ignores anything starting with L or l and then "og", so my "Logger.cs" file matches that and therefore is ignored.  Fancy that eh?  The computers doing exactly as I told it.  DOH!

So now that I have the flower (and a blog so I can always have my ignore list when I need it for reference), it's time to grab a coffee and get coding!

 

Tags:
Categories:
Location: Blogs Parent Separator TechTidBits

2 comment(s) so far...


Re: SVN's ignore list, what's in your list?

Ha! I did something similar the other day I checked all my code in the BRANCH not the TRUNK, you should see my reminder notes all over my desk! Od enough, I have not gotten the flower for it.

Cheers Sylvain

By Sylvain on   Wednesday, May 13, 2009 8:38 AM

Re: SVN's ignore list, what's in your list?

HAHA! You will now! :> hahah I'm just ITCHING to give it away! :> hahaha

By phenry on   Wednesday, May 13, 2009 9:57 AM

Your name:
Gravatar Preview
Your email:
(Optional) Email used only to show Gravatar.
Your website:
Title:
Comment:
Add Comment   Cancel 
     
  
Copyright 1999-2012 by PCHenry.com   Terms Of Use  Privacy Statement