On Nov 20, 2017, at 1:33 PM, Warren Young <war...@etr-usa.com> wrote: > > There is one more thing Git really gets right compared to Fossil: single-step > clone-and-open. We should be able to do the same:
I’ve prototyped this as a simple shell script: #!/bin/sh -e url=$1 shift tmprepo=`mktemp .fslrepo-XXXXXXXXXX` rm $tmprepo fossil clone "$url" $tmprepo name=`fossil sql -R "$tmprepo" \ "select value from config where name='short-project-name' \ or name='project-name' and value != '' limit 1"` if [ -z "$name" ] ; then echo "No project name in $tmprepo!" ; exit 1 ; fi if [ -d "$name" ] ; then echo "Already checked out as $name!" ; exit 1 ; fi if [ -e "$name" ] ; then echo "$name in the way; aborting!" ; exit 1 ; fi mkdir "$name" cd "$name" mv ../"$tmprepo" .fslrepo fossil open .fslrepo "$@" This is not useful as-is, since the whole point of this feature is that clone-and-open should be a single step with no other messing about by the user. What it proves, however, is that Fossil has everything needed to do this today. The existing pieces just need to be rearranged to allow it. _______________________________________________ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users