SubEthaEdit and Subversion part II
Posted by dom Tue, 02 May 2006 15:33:00 GMT
Continuing with the more advanced stuff: 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
- 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 convenience, 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.
More recently bbum has brought up a really nice way of doing shell aliases to quickly use the output of the svn st command to look into the details of the status. I myself find the M shortcut for quick diffing most useful, and therefore I added these lines to my ~/.bash_profile:
svn diff $* | see -m diff -t "diff:$*"
}
Which really gives nice quick access to a see enhanced diff.
I always knew we were doing a poor job of advertising SCM (a GPL front-end to various revision control systems)! You've prompted me to write Why you should use jessies.org SCM tools.
Eliott, some of us live in bash and like it. I don't see why you feel those people are "masochists". I looks to me like you haven't even tried the things mentioned here, due to your "doing commits via your editor's find/replace functionality" comment. In fact SubEthaEdit diff.mode display of a diff looks quite similar to RevisionTool's diff display...
The processes described here sounds pretty painful. Why pretend there is a interface between SubEthaEdit and svn when it consists of a bunch of arcane commands and shell scripts. Assuming I am incorrect in my evaluation---and I probably am---please help me out with my lack of understanding here. BTW, I use TeX, Plain TeX that is, and have read the The TeXBook several time, so it's not like I can not understand arcane content. :) Thanks.
Bob, the tips described here are ment for an audience that interacts with subversion via "arcane commands" anyway.
If you prefer using a GUI to interact with your SCM, Xcode and svnX come to mind as frontends.
as map said: the see tool and this tips are for people that like living in the command line. I myself e.g. am normally a total gui person. But when it comes to subversion there just isn't a real good subversion gui client IMHO so I put up with the command line.
Thanks to all the members who have given their wonderful comments.... keep on posting
I am glad i found this coding treasure. it is filled up with lots of tips and tricks. Keep up the great work.
Nice information. But can you explain how to use bash mode with subEthaEdit. I am getting much of the trouble while trying out this? rosalinjones
this feature not only reduces the time but also cut down the problems relating to mixed line ending.