From 7d964825d34aec6d2ab425aea1e616c164d418c8 Mon Sep 17 00:00:00 2001 From: Christian Thaeter Date: Thu, 30 Aug 2012 20:48:26 +0200 Subject: [PATCH] internal RFC reorganization * rfcs are now all stored in the rfc folder (formerly hold the final rfcs) * a new rfc_final folder is created * the state folders (rfc_final|pending|parked|dropped) now contain symlinks back to the rfc pool --- admin/rfc.sh | 48 +++++++++++++++++++++++------------ doc/devel/rfc/DIR_INFO | 4 ++- doc/devel/rfc/index.txt | 9 +++---- doc/devel/rfc_final/DIR_INFO | 1 + doc/devel/rfc_final/index.txt | 11 ++++++++ doc/technical/infra/rfcsh.txt | 6 ----- 6 files changed, 51 insertions(+), 28 deletions(-) create mode 100644 doc/devel/rfc_final/DIR_INFO create mode 100644 doc/devel/rfc_final/index.txt diff --git a/admin/rfc.sh b/admin/rfc.sh index c464be687..5e76eaf28 100755 --- a/admin/rfc.sh +++ b/admin/rfc.sh @@ -2,6 +2,14 @@ shopt -s extglob +# +# RFC's are created from ./doc/devel/template/new_rfc.sh and stored in +# ./doc/devel/rfc/ . There are directories for the various states +# ./doc/devel/rfc_final, ./doc/devel/rfc_pending, ./doc/devel/rfc_parked, +# ./doc/devel/rfc_dropped . Which contain symlinks back to ../rfc/ +# + + function usage() { grep -v '^// ' <<"EOF" | less -F @@ -199,7 +207,7 @@ function find_rfc() local globstate=$(shopt -p nocasematch) shopt -s nocasematch - for file in $(find ./doc/devel/rfc* -name '*.txt'); + for file in $(find ./doc/devel/rfc/ -name '*.txt'); do local name="/${file##*/}" if [[ "$name" =~ $match ]]; then @@ -229,28 +237,37 @@ function process_file() local file="$1" local path="${1%/*}" local basename="${1##*/}" - local destpath="$path" + local linkdest="$path" local state=$(grep '^\*State\* *' "$file") case "$state" in *Final*) - destpath="./doc/devel/rfc" + linkdest="./doc/devel/rfc_final" ;; *Idea*|*Draft*) - destpath="./doc/devel/rfc_pending" + linkdest="./doc/devel/rfc_pending" ;; *Parked*) - destpath="./doc/devel/rfc_parked" + linkdest="./doc/devel/rfc_parked" ;; *Dropped*) - destpath="./doc/devel/rfc_dropped" + linkdest="./doc/devel/rfc_dropped" ;; + *) + echo "Unknown State: '$state'" >&2 + exit 1 esac - if [[ "$path" != "$destpath" ]]; then - git mv "$file" "$destpath" + local oldpath=./doc/devel/rfc_*/$basename + + if [[ "$oldpath" != './doc/devel/rfc_*/'"$basename" ]]; then + if [[ "$oldpath" != "$linkdest/$basename" ]]; then + git mv "$oldpath" "$linkdest/$basename" + fi + elif [[ ! -s "$linkdest/$basename" ]]; then + ln -s "../rfc/$basename" "$linkdest/" + git add "$linkdest/$basename" fi - git add "$destpath/$basename" } @@ -349,7 +366,7 @@ shift case "$command" in process) # for all rfc's - for file in $(find ./doc/devel/rfc* -name '*.txt'); + for file in $(find ./doc/devel/rfc -name '*.txt'); do echo "process $file" process_file "$file" @@ -373,14 +390,13 @@ show|less|more) create) TITLE="$@" name=$(camel_case "$TITLE") - if [[ -f "./doc/devel/rfc/${name}.txt" || - -f "./doc/devel/rfc_pending/${name}.txt" || - -f "./doc/devel/rfc_dropped/${name}.txt" ]]; then + if [[ -f "./doc/devel/rfc/${name}.txt" ]]; then echo "$name.txt exists already" else - source ./doc/devel/template/new_rfc.sh >"./doc/devel/rfc_pending/${name}.txt" - edit "./doc/devel/rfc_pending/${name}.txt" 2 abstract - process_file "./doc/devel/rfc_pending/${name}.txt" + source ./doc/devel/template/new_rfc.sh >"./doc/devel/rfc/${name}.txt" + edit "./doc/devel/rfc/${name}.txt" 2 abstract + git add "./doc/devel/rfc/${name}.txt" + process_file "./doc/devel/rfc/${name}.txt" fi ;; edit) diff --git a/doc/devel/rfc/DIR_INFO b/doc/devel/rfc/DIR_INFO index 393ae51b8..205119027 100644 --- a/doc/devel/rfc/DIR_INFO +++ b/doc/devel/rfc/DIR_INFO @@ -1 +1,3 @@ -accepted design proposals +RFC pool + +all other rfc dirs (sorted by state) link back to here diff --git a/doc/devel/rfc/index.txt b/doc/devel/rfc/index.txt index c9e8a4515..23814933a 100644 --- a/doc/devel/rfc/index.txt +++ b/doc/devel/rfc/index.txt @@ -1,11 +1,10 @@ -Accepted Design Proposals -========================= +Design Proposal Pool +==================== -//Menu: label accepted +//Menu: off //Menu: sort children -> read link:../rfc.html[more about Lumiera RfC] and the Design Process -The RfC entries listed here where discussed, maybe modified and finally agreed upon -during some developers meeting in the past. So they represent design decisions taken. +This is the poll where all Design Proposals are stored. diff --git a/doc/devel/rfc_final/DIR_INFO b/doc/devel/rfc_final/DIR_INFO new file mode 100644 index 000000000..393ae51b8 --- /dev/null +++ b/doc/devel/rfc_final/DIR_INFO @@ -0,0 +1 @@ +accepted design proposals diff --git a/doc/devel/rfc_final/index.txt b/doc/devel/rfc_final/index.txt new file mode 100644 index 000000000..c9e8a4515 --- /dev/null +++ b/doc/devel/rfc_final/index.txt @@ -0,0 +1,11 @@ +Accepted Design Proposals +========================= + +//Menu: label accepted +//Menu: sort children + +-> read link:../rfc.html[more about Lumiera RfC] and the Design Process + +The RfC entries listed here where discussed, maybe modified and finally agreed upon +during some developers meeting in the past. So they represent design decisions taken. + diff --git a/doc/technical/infra/rfcsh.txt b/doc/technical/infra/rfcsh.txt index 07790f7c2..a75fb3640 100644 --- a/doc/technical/infra/rfcsh.txt +++ b/doc/technical/infra/rfcsh.txt @@ -1,12 +1,6 @@ Lumiera RFC maintenance script ============================== -// Note: the source of this documentation is maintained -// directly admin/rfc.sh in its usage() function -// edit it only there and then regenerate -// doc/devel/technical/infra/ with: -// ./admin/rfc.sh help >doc/technical/infra/rfcsh.txt - Usage -----