Thanks, Sjoerd!

As a hit for others:

You'll need to have the "purge" extension of Mercurial (HG) enabled to use
the new ./de-bootstrap,
by having the following lines in the "[extensions]" section of
your global "~/.hgrc" file or your local ".hg/hgrc" file:

"
# command to delete untracked files from the working directory
purge =
"

Stefan

On Thu, Jan 20, 2011 at 12:37:39PM +0100, Sjoerd Mullender wrote:
> Changeset: f1a7128f2ac1 for MonetDB
> URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f1a7128f2ac1
> Modified Files:
>       de-bootstrap
> Branch: default
> Log Message:
> 
> Use Mercurial command to determine which files to remove.
> This way, we don't need to tell people to check whether too much was
> removed, since Mercurial won't remove files that are under control of
> Mercurial.
> 
> 
> diffs (32 lines):
> 
> diff --git a/de-bootstrap b/de-bootstrap
> --- a/de-bootstrap
> +++ b/de-bootstrap
> @@ -43,10 +43,15 @@
>               G='/$|'
>       fi
>  
> +     if [ $# -eq 0 ]; then
> +             # nothing to do
> +             return
> +     fi
> +
>       x=N
> -     n=`ls -A $L $* 2>/dev/null | egrep -v "^total [0-9]*$|^$|^[^ ]*:$" | wc 
> -l | sed 's|^ *||'` 
> +     n=`ls -Ad $L $* 2>/dev/null | egrep -v "^total [0-9]*$|^$|^[^ ]*:$" | 
> wc -l | sed 's|^ *||'` 
>       if [ $n != '0' ]; then
> -             ls -lAF $L $* 2>/dev/null | egrep -v "$G^total [0-9]*$|^$" 
> +             ls -lAFd $L $* 2>/dev/null | egrep -v "$G^total [0-9]*$|^$" 
>               echo -e "Delete these $n files/directories? (y/N) \c"
>               read x 
>               if [ "x$x" = 'xy' ]; then
> @@ -65,9 +70,4 @@
>       exit 1
>  fi
>  
> -RM -rf `find .[^.]* [^_]* -name Makefile.\* -o -name \*.pyc | egrep -v 
> '\.(ag|PL)$'` aclocal.m4 acout.in autom4te.cache 
> buildtools/conf/{config.{guess,sub},install-sh,ltmain.sh,l[ti]*.m4,missing,ylwrap}
>  configure{,.ac} {doc,install}.lst monetdb_config.h.in
> -echo '
> -It might be a good idea to run "hg status -d", now,
> -to check whether required files have been removed accidentally.
> -If so, these files can be restored by "hg revert <file>".
> -'
> +RM -rf `hg purge --all -p 
> -I{\*\*Makefile.\*,\*\*.pyc,aclocal.m4,acout.in,autom4te.cache,buildtools/conf/{config.{guess,sub},install-sh,ltmain.sh,l[ti]\*.m4,missing,ylwrap},configure{,.ac},{doc,install}.lst,monetdb_config.h.in}`
> _______________________________________________
> Checkin-list mailing list
> [email protected]
> http://mail.monetdb.org/mailman/listinfo/checkin-list
> 
> 

-- 
| Stefan.Manegold @ CWI.nl | DB Architectures (INS1) |
| http://CWI.nl/~manegold/ | Science Park 123 (L321) |
| Tel.: +31 (0)20 592-4212 | 1098 XG Amsterdam  (NL) |
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to