Stories
Slash Boxes
Comments

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Ovid (2709)

Ovid
  (email not shown publicly)
http://publius-ovidius.livejournal.com/
AOL IM: ovidperl (Add Buddy, Send Message)

Stuff with the Perl Foundation. A couple of patches in the Perl core. A few CPAN modules. That about sums it up.

Journal of Ovid (2709)

Monday April 21, 2008
10:06 AM

Auto-Edit SVN Conflicts

[ #36204 ]

From time to time, we get conflicts when we merge SVN branches. Now I can automatically edit them:

alias edit_conflicts="${EDITOR:-vim} \$(svn status|grep '^C'|awk '{print \$2}')"

That uses whatever is in your EDITOR environment variable, but defaults to vim.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • Usually, you can replace any grep | awk with just awk. In the instance above, you could say awk '/^C/{print $2}'.
    • Thanks. Works like a charm. I now have the following:

      alias edit_conflicts="${EDITOR:-vim} \$(svn status|awk '/^C/{print \$2}')"
      alias edit_code="${EDITOR:-vim} \$(svn st | awk '/^[AM].*p[ml]/{print \$2}')"
      alias edit_tests="${EDITOR:-vim} \$(svn st | awk '/^[AM].*\.t$/{print \$2}')"