On Sun, Dec 28, 2008 at 05:33:56PM -0500, Joey Hess wrote:
>
> +               printf "%s\n" "find $NOVCS -type l -print | xargs rm -f {} 
> \\;"
>
> I don't think this is safe. It could delete symlinks that are in the tree but 
> not
> committed.
>
> +               find $NOVCS -type l -print | sort | while read link; do
> +                       dest=$( readlink "$link" )
> +                       printf "ln -s '%s' '%s'\n" "$dest" "$link"
>
> Maybe this should use ln -sf in case dest exists?

Yes, this snippet is scary. It's a try to deal with removal of symlinks
in addition to add/modify. I thought it can be 'almost' safe because it
should only matter when checking-out a previous version, so you should
have a working repository (with all infos replayable). On second
thought, however, yes things can go bad. I think tomorrow I'll have time
to try a different approach. I'm thinking about add/move symlinks with
link -sf, as suggested, and just warn the user about
should-to-be-deleted symlinks. Do you think it's ok? Not sure if I need
another file to store just the link names. If needed (or easier), are
you fine with another file to be added in the repo, like .darcslinks or
.etckeeper.links?

> > OTH, this allows the use of darcs w/o the -a option to the record
> > command (commit w/o confirmation) and it's useful for examining
> > automatic pre-install commits.
>
> I think that etckeeper should do the pre-install commit without confirmation,
> unless there“s something significantly different about darcs.
>
> It's fine to be able to configure darcs to confirm or do the commit
> interactively.

Per default, darcs works interactively asking for confirmation for every
hunk (but you can answer a for all). I think it's good as an alternative
to $AVOID_COMMIT_BEFORE_INSTALL.
Using -a in $DARCS_COMMIT_OPTIONS, let darcs automatically commit w/o
asking.


Thanks,
Gian Piero.



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to