[GRASS-dev] Re: Code re-indentation: done.

Glynn Clements glynn at gclements.plus.com
Wed Aug 6 11:58:40 EDT 2008


Markus Neteler wrote:

> >> I have discovered that we overlooked
> >> lib/external/*
> >> to be taken out from reformatting.
> >>
> >> Is there an easy way to revert a set of files to their respective
> >> previous versions?
> >> svn revert only works with unsubmitted changes.
> >> Didn't find any other useful reference...
> >
> >        find lib/external -type f -name '*.[ch]' | \
> >        while read file ; do
> >                svn merge -c -32526 $file
> >        done
> >
> > Here, 32526 is the revision corresponding to the indenting of the
> > trunk. Passing a negative revision to "svn merge -c" will "unmerge"
> > that change.
> 
> It didn't work like this:
> 
> [neteler at markus grass70]$ find lib/external -type f -name '*.[ch]' | \
> > while read file ; do
> >       svn merge -c -32526 $file
> > done
> svn: REPORT request failed on '/grass/!svn/vcc/default'
> svn: Cannot replace a directory from within

Oops; it needs to be done from within the directory:

	find lib/external -type f -name '*.[ch]' | \
	while read file ; do
		( cd ${file%/*} && svn merge -c -32526 ${file##*/} )
	done

But that's likely to be inefficient; in this case, you can just use:

	cd lib/external/shapelib
	svn merge -c -32526 .

[BWidget is Tcl/Tk; there are no C source files.]

-- 
Glynn Clements <glynn at gclements.plus.com>


More information about the grass-dev mailing list