tech_log: Selecting previous code chunks from svn for copy/paste

Thursday, July 16, 2009

Selecting previous code chunks from svn for copy/paste

You want to select and copy paste chunks of code from previous svn revision, but svn diff marks changes with "+ " or "-" in the beginnig of each line. In trac, lines are prefixed with line numbers, so selct will pick up these also.

We want a chunk of what was in previous revision, but easy to select/copy/paste:

drasko@marx:~/u-boot$ svn diff -r HEAD:PREV --diff-cmd diff -x -n common/cmd_spidboot.c

Use:
drasko@marx:~/u-boot$ svn help diff
and:
drasko@marx:~/u-boot$ man diff
to see what the command means, but basically it tells svn to use diff command with specific switches.

If you want to select only new changes, change HEAD:PREV to PREV:HEAD



0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home