alex brie . net

bloghez din 2003 despre mine, internet, prieteni si altele.

  • Blog
  • About
  • Contact
  • Articole preferate
  • Publicitate
  • Blogs
« alexbrie.net, singurul blog de 12579 de stele
Timbre de odinioara »

*nix tip of the day

September 14th, 2007 |

I keep having the following problem when dealing with svn: I frequently find myself wanting to add to my own SVN repository stuff(javascript libraries, rails plugins) retrieved from some other svn repositories. The inevitable outcome of my bold attempt is that SVN starts complaining that the new folders can’t be submitted, that they already are under code control or something.

The reason is because when copying entire FOLDERS from one svn repository to another, you also copy their associated .svn folders with svn-specific information. These .svn folders are usually hidden, but you can see them (on Unix/Linux/OSX) by running ls -la from the terminal.

So you see my problem: I want to copy files or folders into my code repository, but don’t want to involve svn into this. I want them to be added as new files/folders, regardless of where they came from.

The following command-line command has helped me avoid quite a bit of frustration today:


find . -name "*.svn" -print
find . -name "*.svn" -ok rm -rf {} \;

The first command lists recursively all svn-specific subfolders of the current one.
The second command displays them to me one after the other and patiently awaits I press ‘y’ to remove it.
Extremely useful, right?
For many more uses of the find command, check out this page - where I learned about the useful ‘ok rm’ trick.

Pe vremea asta…

  • 2007: Timbre de odinioara
  • 2006: Cine e inventatorul anului?
  • 2005: Google Blog Search
  • 2005: NOT3S DOT NET

Daca esti nou pe aici, nu uita sa te abonezi la feedul meu RSS rss feed. Iti multumesc pentru vizita!

Articole inrudite

  • Yahoo! Messenger 3.0 Beta 2 pentru Mac (5)
  • The 300 … de motive ca sa faci upgrade la Mac OS Leopard (3)
  • Ruby: create your code on the fly (10)
  • MacHeist - ultimele 2 zile (2)
  • Grepping in Ruby (0)

Tags: command-line, find-command, OSX, snippet, svn, Tips and Tricks, unix


Postata in Tips and Tricks | RSS 2.0 feed comentarii | Comenteaza; Trackback.

4 Responses to “*nix tip of the day”

  1. Gravatar Iulian Dogariu:
    September 14th, 2007 at 7:50 pm

    Call me pedantic, but you’ll want to make sure you’re removing only directories named .svn, not any file that happens to match the “*.svn” pattern. So you’ll want to do something like:

    find . -name .svn -type d -ok rm -rf {} ‘;’

    -type d matches only directories.

    ;-)

  2. Gravatar Alex:
    September 14th, 2007 at 8:10 pm

    thanks for the -d correction. and, yes, you are pedantic :D - really now, why would I have useful files named .svn , and why wouldn’t the manual check discover them ;-) ?

  3. Gravatar Cristian Strat:
    September 16th, 2007 at 4:27 am

    svn export?

  4. Gravatar NB:
    September 17th, 2007 at 5:57 am

    Yep, Cristian has the nose for these things. You can svn export your current working copy (or remote svn’s base copy) directly into the new project.

    svn export . /path/to/other/project

    No need to run odd finds.

Leave a Reply

  • Pe vremea asta...

    • 2007: Timbre de odinioara
    • 2006: Cine e inventatorul anului?
    • 2005: Google Blog Search
    • 2005: NOT3S DOT NET
  • Despre Alex Brie

    View Alexandru Brie's profile on LinkedIn

    Bloger pasionat din septembrie 2003.
    Software engineer; master in cercetare algoritmica la Ecole Polytechnique Paris; a lucrat in Paris in software bursier.

    Inapoi in Romania din 2006, programeaza Ruby on Rails pentru un startup american, este consultant independent, blogger si antreprenor cu diverse proiecte online
    [afla mai multe..]

    Aboneaza-te RSS(Romanian)

      
    Acum te poti abona si prin email.

    Subscribe(English)

  • Urmareste-ma si pe Twitter

    • Recomand

      jurnal de fapte bune cele mai tari stiri de pe blogurile

    • Users Online

      • 26 Users Online
      • Users: 26 Users
    • Comentarii recente

      • katrina on How to import Textpattern into Wordpress
      • Andrei Maxim on 10 Ruby programming tips you should already know
      • Cu ce masini m-am dat in Romania | Cafeina.ro on On/Off road adventure - Concluzii Drive Test SSang Yong Rexton
      • farouk on Beginner’s blogging guide - How to bring traffic to your blog
      • limpede on Berea e placere ?!
      • Alsaru on Patine cu rotile - wishlist 1
      • Ibdreamy.com » Blog Archive » Twitter Apps, Plugins and Tools on TwitterYM - tiny ruby Yahoo Messenger status Twitter updater
      • Alex on Berea e placere ?!
      • Gelu on Berea e placere ?!
      • Skandalouz on Bucurie pura
      • Andrei on Bucurie pura
      • Alex on Cum voi castiga eu la loto :D
      • Alex on 10 Ruby programming tips you should already know
      • Piku on 10 Ruby programming tips you should already know
      • Anca on Caut Crocs
    • bloguri care ma citesc

      • Andrei.Voce.ro
      • Avram Seby
      • Blog ul lui Mage - mai acid decat clorhidricul
      • Blogatu
      • Bogdan’s Weblog
      • Costinu Rgbdesigners
      • cotofana.RO
      • dEsign.101
      • Dowel
      • Insemnari.ro
      • Kappacelu
      • LIMPEDE - blog
      • Mihai Nasaudean Blog
      • serban.us
      • www.liveMag.ro
    • Archives

    • TLA

      • party supplies
    • Categories

      • Blog (1320)
        • carcoteli (4)
        • English (14)
        • evenimente (6)
        • FILMS (33)
        • French (3)
        • fun (57)
        • intrebari (5)
        • jocuri (5)
        • masini (1)
        • masini (1)
        • matematica (1)
        • PHOTO (147)
          • desene (12)
          • flori (2)
          • oua rosii (1)
        • Projects (81)
          • business (31)
          • ROSI (12)
        • Promo (3)
        • Romanian (118)
          • aici (49)
          • repat (33)
        • scurte (10)
        • Software (23)
          • .mac (20)
        • stiati ca (4)
        • Stiri IT Media si Internet (51)
          • yahoo (1)
        • Technicalities (66)
        • Web (460)
          • links (150)
          • Memes (54)
          • video (58)
      • dev (21)
        • Open Source (1)
        • Rails (9)
        • Ruby (8)
        • Textpattern (2)
        • Tips and Tricks (9)
        • Tutorials (7)
        • Wordpress (6)
      • iPhone (7)
      • opinii (1)
      • recenzii (9)
      • tutoriale (1)
      • Words (133)
        • essays (32)
        • Politice (44)
        • vss[very short stories] (5)
    .mac aici antreprenoriat Apple Basescu Blog blogger bloggeri blogging blogosfera bloguri blogvertising booq bucuresti business carti ceausescu cleopatra stratan comics concurs conferinte Desktop-TD Digg evenimente feedburner FILMS flash fun ganduri Google internet intrebari iPhone iread IT jocuri Leopard links linkuri Manafu marketing marketonline market online masini mema Memes Microsoft muzica myblog Netcamp netstart olimpiade online oprescu OSX personal PHOTO politica Politice poze presa programare proiecte publicitate Rails repat review rexton roblogfest Romania Romanian ROSI Ruby script seo snippet software spam ssang yong stiri Techmeme testdrive Tips and Tricks triburi triburile tutorial Tutorials twitter Utopia viata viata mea video viral vodafone Web Wordpress Words yahoo yahoo messenger youtube

    Entries (RSS) and Comments (RSS).
    Theme inspired by CrunchNotes, by Alex Brie.

    Copyright © 2005-2008 alex brie . net. Unele articole pot contine tematici sau linkuri sponsorizate. Opiniile si idele sunt intodeauna ale autorului, care le imbratiseaza si le sustine.