« Random Rails Bits - "Universal Applications" |  main  | Less known facts about SubEthaEdit Modes »

see and the subversion command line

Posted by dom on Thu Jul 07 00:00:07 +0200 2005

Adding many files via the svn add command can be a tedious effort. Especially if they are dispersed over many directories. But here the see command line tool can help. Instead of svn add do

svn st | see | sh
What this does is simple, it does a svn st and pipes it to the nearest SubEthaEdit for editing. So far so good. The next steps are easy:
  • trim all the lines which you don’t want to add
  • select all and do a blockedit to replace the first few characters with a svn add
  • then close the window

the closing of the window hands this little snippet over to sh which does a decent job of executing every single svn add line you just left in your text. Much more convenient than adding the files one by one.

Too add even more convenince, I added the following alias to my ~/.bash_profile file. Now I have a convenient little command called svnadd that does a svn st, greps for all lines that begin with a ? (which are the files that may need adding), shows them to me via SubEthaEdit in which I can pick my lines and add the svn add, and sends them to sh when I’m done. Very handy.

alias svnadd="svn st | grep \"^\?\" | see -t \"svn st\" -j \"->to sh\" | sh"

1 response to 'see and the subversion command line'

  1. Metal scrap suppliers: Importers of various metal scrap, industrial scrap, obsolete scrap that includes aluminum

write a comment.... (textile enabled)
author
email
url
Body