Archive for the ‘Technology’ Category

SVN – Quick Startup

Friday, September 10th, 2010

SVN (or Subversion) Quick Startup

For version control – In 3 to 4 easy steps, place a given directory and all dirs and files under that directory, under SVN control.

Process Summary – Create a Repository, Import current files into that repository, Checkout files from repository to desired working directory, work on files, committing as you go to collect versioning information.

  1. Create a repository
    • i.e. svnadmin create –fs-type fsfs /path/to/svnrepo
  2. Import files into the repository
    • i.e. svn import /path/to/files/you/want/under/svn-control/ file:///path/to/svnrepo/ -m “Initial import”
    • NOTE; This will import all sub-dirs as well.
  3. Probably delete the original location of the files imported into the repo, backing up the originals first of course.
    • i.e. rm -rf /path/to/files/you/want/under/svn-control/
    • NOTE; Of course, this isn’t relevant if your going to place working copy somewhere other than original location.
  4. Create a working copy/location where you want the files to reside.
    • i.e svn checkout file:///path/to/svnrepo/ /path/to/final/working/location/
  5. Work on files in /path/to/final/working/location/.
    • i.e. cd /path/to/final/working/location/; vi <somefile>; svn diff; svn commit -m “First edits”
    • NOTE: All subdirs are under SVN as well. Commands like “svn commit” will propagate to subdirs as well.
  6. A specific example; putting my ~/bin/ directory under SVN control.
    • $ svnadmin create –fs-type fsfs ~/MyBinDirSVNRepo/ # create repo
    • $ svn import ~/bin/ file:///home/bryan/MyBinDirSVNRepo/ -m “Initial bindir Import” # import files into repo
    • $ tar -cvf ~/bin.tar ~/bin/ # backup original files
    • $ gzip ~/bin.tar
    • $ rm -rf ~/bin/ # remove original files
    • $ svn checkout file:///home/bryan/MyBinDirSVNRepo/ ~/bin/ # checkout files back into orig location
    • Now all files under ~/bin/ are under SVN control. # Edit and commit

Cheatsheet:

  • svn diff ; see what’s different before commiting.
  • svn diff -r 1:2 <somefile> ; show diff between ver 1 and ver 2 of <somefile>
  • svn diff -r 5 <somefile> ; show diff between current working copy and ver 5.
  • svn commit ; if you leave off the “-m” you’ll be prompted to enter a comment.
  • svn blame <somefile> ; see who edited each version (blame being mis-leading of course)
  • svn info ; repo info, like were the repo is located.
  • svn info <somefile> ; everything you wanted to know about a file in the repo, latest ver, etc, etc.
  • svn info <somefile> ; everything you wanted to know about a file in the repo, latest ver, etc, etc.
  • svn list ; everything in the repo
  • svn ls ; same as “svn list”
  • svn status -v ; provides latest version of each file. Useful in know were to start doing “svn diff -r #:# <somename>
  • svn add <newfile> ; adding a new file to the repo.
  • svn status ; show status of each file (if all matches repo, then no output)
  • svn update ; syncs with repo, includes pulling in diffs in repo into working copy. Only makes sense if you have multiple copies checked out.

References:

My Delicious Bookmarks

Tuesday, May 30th, 2006

I setup and am going to start using Delicious to keep some good bookmarks.

http://del.icio.us/bryannielsen

Inventing

Tuesday, May 30th, 2006

A good article outlining what it takes to invent. I’ve always been interested in the part serendipity plays in the discover process or how discovery requires “tinkering” with failures along the road to success. We shouldn’t under estimate the importance of allowing our creative people time to tinker. Some great discoveries have evolved from that process, and the companies who allowed it profited greatly. e.g. google and 3m.

A nice Workstation, Home Theatre Combo

Thursday, May 4th, 2006

A nice write-up from Lee Campbell on building a home theatre system with a Mac Mini and an LCD screen, which doubles as a workstation in the living room while you sit on the couch. :)

lee wrote:

I’d recommend the $799 Mac Mini with intel dual core. http://www.apple.com/macmini The computer ships with two 256 MB memory sticks. I would spend the approximately $170 to upgrade the memory to 2 GB. I bought two 1 GB DDR non-ecc memory sticks at Fry’s Electronics for about $170. The computer has 2 memory slots and both slots must have the same size memory stick. If you plan on running Windows and Mac OS X at the same time, you will certainly need 2 GB of ram. Apple charges $300 per GB and you need two of them, so I don’t recommend buying memory from Apple. Upgrading the ram in a mini is a little tricky.

When shopping for an LCD TV, I valued how the TV displayed the computer image the most. The picture quality for TV/Cable signals wasn’t as important for me. I chose a Polaroid 32″ LCD because it was the only model I could find that displayed the computer image perfectly. A similar 37″ Polaroid is availabe. Sony projection, Sony LCD, Panasonic, LG, Samsung, and Mitsubishi all clipped the image so that the Windows task bar or Apple menu was not visible. Of all the models I tested at Best Buy, Sears, Circuit City and Tweeters, the Polaroid was the only model that worked well as a computer display. The picture quality for TV/Cable is perfectly acceptable but not the best. I found this TV at Circuit City for $900. The Apple store uses a NEC LCD display that looks beautiful, but I could not find any NEC TVs to test. The Polaroid LCD defaults to using a color profile that makes the computer image look dark and very high contrast. To fix this problem, use the “Apple RGB” Color profile in System Preferences | Display | Color.

I recommend an Apple Bluetooth keyboard. So far, I have not needed a wired keyboard at all, even for use when the Mini is booting or in the bios. For example, holding down the C key to boot from cdrom works with a Bluetooth keyboard.

I’m using a Microsoft bluetooth mouse and it’s lost its pairing a couple of times. I tried the Kensington mouse that the Apple store sells, but found it difficult to pair and jumpy. I’d recommend keeping a USB mouse handy.

You’ll need to connect your computer to the TV using an HDMI cable. Circuit City had only one cable for sale and it cost $125. Fry’s had a slightly cheaper looking cable for $25 (yes $100 less!) that works perfectly.

You will also need a sound cable that has headphone jacks on one end and the red/white RCA jacks on the other end. I bought mine at Radio Shack, but any electronics store should have one.

To run Windows XP or Linux at the same time you’re running Mac OS X, you will need this software: http://www.parallels.com/

To dual boot Windows XP and Mac OS X, you will need this: http://www.apple.com/macosx/bootcamp/ With these components, I now have a full Windows and Mac workstation with almost no footprint in my living room.

Technorati Tags: , ,