[darcs-users] "broken" hard links.

Nicolas Pouillard nicolas.pouillard at gmail.com
Wed Apr 29 17:07:25 UTC 2009


Excerpts from Trent W. Buck's message of Wed Apr 29 10:55:09 +0200 2009:
> On Wed, Apr 29, 2009 at 10:32:01AM +0200, Nicolas Pouillard wrote:
> > Excerpts from Trent W. Buck's message of Wed Apr 29 05:02:54 +0200 2009:
> > > >>>> Short of there being a bug, is there any reason for hashed repos to
> > > >>>> go out of sync?
> > > 
> > > The following transcript demonstrates this using a concrete example:
> > > the Darcs repo.  The working directory is in /tmp, which is a
> > > different filesystem from the cache directory in /home/twb/.darcs/cache.
> > > 
> > >     $ map darcs get http://darcs.net/ --quiet --complete -- R S
> > 
> > Just curious, what is this map command?
> 
> #!/bin/bash -e
> #### Add variadicity to a non-variadic executable.
> ####
> #### Usage: map foo bar -- x y z
> #### expands to: foo bar x && foo bar y && foo bar z
> ####
> #### This code is written by twkm (of Freenode's #bash) and placed in
> #### the Public Domain.  All warranties are disclaimed.
> 
> unset cmd doit
> for arg
> do  if ((doit))
>     then "${cmd[@]}" "$arg"
>     elif [[ $arg = -- ]]
>     then doit=1
>     else cmd=("${cmd[@]}" "$arg")
>     fi
> done

Thanks, nice one!

-- 
Nicolas Pouillard


More information about the darcs-users mailing list