Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master quill by Jaka Kranjc (9490476135576c2e96cac258f1c4c79f65c01eb9)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Jaka Kranjc <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master quill by Jaka Kranjc (9490476135576c2e96cac258f1c4c79f65c01eb9)
  • Date: Tue, 2 Dec 2008 03:44:50 -0600

GIT changes to master quill by Jaka Kranjc <lynxlynxlynx AT sourcemage.org>:

usr/bin/quill | 4 ++--
var/lib/quill/ChangeLog | 9 +++++++++
var/lib/quill/modules/libcore | 2 +-
var/lib/quill/modules/libhistory | 5 +++--
var/lib/quill/modules/libpre_build | 2 ++
var/lib/quill/modules/libupdate | 18 ++++++++++++++++--
var/lib/quill/version | 2 +-
7 files changed, 34 insertions(+), 8 deletions(-)

New commits:
commit 9490476135576c2e96cac258f1c4c79f65c01eb9
Author: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
Commit: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>

* libupdate, libpre_build: note the spell as updated
* libupdate, quill: also ask for adding new files
* libupdate: update the history before editing, so it can be ammended
* quill: allow editing of empty files in quill_edit
* libhistory: fixed detection of "headless" entries
don't add history entries for editing HISTORY

diff --git a/usr/bin/quill b/usr/bin/quill
index 8c9788f..7bd8001 100755
--- a/usr/bin/quill
+++ b/usr/bin/quill
@@ -153,7 +153,7 @@ then
'Switch to upstream gpg verification' \
'Deprecate the spell (also for renames)' \
'Manage/add PRE_BUILD and patches' \
- 'List/Edit/Remove spell files' \
+ 'List/Edit/Remove/Add spell files' \
'--NOOP--' \
'--NOOP--' \
'Copy it here from the grimoire or QUILL_GIT_DIR' \
@@ -231,7 +231,7 @@ then
"${actions[5]}") # 'Manage/add PRE_BUILD and patches'
pre_build_menu
;;
- "${actions[6]}") # 'List/Edit/Remove spell files'
+ "${actions[6]}") # 'List/Edit/Remove/Add spell files'
file_menu
;;
"${actions[9]}") #"Copy it here from the grimoire or QUILL_GIT_DIR"
diff --git a/var/lib/quill/ChangeLog b/var/lib/quill/ChangeLog
index 44cb049..5bc2e4f 100644
--- a/var/lib/quill/ChangeLog
+++ b/var/lib/quill/ChangeLog
@@ -1,3 +1,12 @@
+2008-12-02 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
+ * libupdate, libpre_build: note the spell as updated
+ * libupdate, quill: also ask for adding new files
+ * libupdate: update the history before editing, so it can be ammended
+ * quill: allow editing of empty files in quill_edit
+ * libhistory: fixed detection of "headless" entries
+ don't add history entries for editing HISTORY
+ * version: 0.3.0-rc10
+
2008-12-01 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
* quill: run quill_rc, not quillrc when in trouble
added "list/edit/remove spell file" menu option
diff --git a/var/lib/quill/modules/libcore b/var/lib/quill/modules/libcore
index 77d7a9d..599a932 100644
--- a/var/lib/quill/modules/libcore
+++ b/var/lib/quill/modules/libcore
@@ -163,7 +163,7 @@ function quill_edit() {
do
[[ $spell_file == DETAILS.orig ]] && continue
type=$(file -bi $spell_file)
- if grep -q "text/" <<< "$type"
+ if grep -Eq "text/|empty" <<< "$type"
then
$EDITOR $spell_file
fi
diff --git a/var/lib/quill/modules/libhistory
b/var/lib/quill/modules/libhistory
index dcc6d3d..32da5f2 100644
--- a/var/lib/quill/modules/libhistory
+++ b/var/lib/quill/modules/libhistory
@@ -54,8 +54,9 @@ function add_history_entry()
sed -i "/$title/ a\\\t* $entry" $history_file
else
# we do, but first check that the new addition is unique
- local first_entry_line=$(head -n1 <<< "$entry" | sed 's,\\,,')
- if ! sed -n "1,/^\s*$/p" $history_file | grep -qF "* $first_entry_line"
+ local first_entry_line=$(head -n1 <<< "$entry" | sed 's,\\$,,')
+ if ! sed -n "1,/^\s*$/p" $history_file | grep -qF "*
$first_entry_line" &&
+ ! sed -n "1,/^\s*$/p" $history_file | grep -qF "
${first_entry_line#*:}"
then
sed -i "1,/^\s*$/ {
/\* $file:/ a\\\t ${entry#*:}
diff --git a/var/lib/quill/modules/libpre_build
b/var/lib/quill/modules/libpre_build
index a0299cc..2b2ae93 100644
--- a/var/lib/quill/modules/libpre_build
+++ b/var/lib/quill/modules/libpre_build
@@ -53,6 +53,8 @@ function pre_build_menu() {
'Return to the main menu' )
query_list "What do you want to do?" choice "Return to the main menu"
"${actions[@]}"

+ [[ $choice != ${actions[5]} ]] && SPELL_UPDATED=y
+
case "$choice" in
"${actions[0]}")
add_pre_build ;;
diff --git a/var/lib/quill/modules/libupdate b/var/lib/quill/modules/libupdate
index 6ecc468..fa40e57 100644
--- a/var/lib/quill/modules/libupdate
+++ b/var/lib/quill/modules/libupdate
@@ -147,6 +147,7 @@ function file_menu() {
actions=('List files' \
'Edit files' \
'Remove files' \
+ 'Add files' \
'Return to the main menu' )
query_list "What do you want to do?" choice "Return to the main menu"
"${actions[@]}"

@@ -160,12 +161,13 @@ function file_menu() {
while true; do
query_list "Which file do you want to edit?" file none \
all $(find -type f -and ! -name DETAILS.orig -printf "%P\n") none
+ [[ $file == none ]] && break
+ [[ $file != HISTORY ]] && add_history_entry "$file: changed blabla"
case $file in
- none) break;;
all) quill_edit; echo ;;
*) quill_edit $file; echo ;;
esac
- add_history_entry "$file: changed blabla"
+ SPELL_UPDATED=y
done ;;
"${actions[2]}")
while true; do
@@ -176,8 +178,20 @@ function file_menu() {
echo "$file removed!"
echo
add_history_entry "$file: removed, no longer needed"
+ SPELL_UPDATED=y
done ;;
"${actions[3]}")
+ while true; do
+ query_string file "Which file do you want to add?" none
+ [[ $file == none ]] && break
+ touch $file
+ if query "Do you want to make it executable" y; then
+ chmod +x $file
+ fi
+ add_history_entry "$file: added, bla bla!"
+ SPELL_UPDATED=y
+ done ;;
+ "${actions[4]}")
return ;;
esac
}
diff --git a/var/lib/quill/version b/var/lib/quill/version
index 629800a..bd339c4 100644
--- a/var/lib/quill/version
+++ b/var/lib/quill/version
@@ -1 +1 @@
-0.3.0-rc9
+0.3.0-rc10



  • [SM-Commit] GIT changes to master quill by Jaka Kranjc (9490476135576c2e96cac258f1c4c79f65c01eb9), Jaka Kranjc, 12/02/2008

Archive powered by MHonArc 2.6.24.

Top of Page