[GUILT 03/28] Added test case for guilt delete -f.

2014-03-21 Thread Per Cederqvist
Ensure that the file really is deleted. Signed-off-by: Per Cederqvist ced...@opera.com --- regression/t-026.out | 15 +++ regression/t-026.sh | 5 - 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/regression/t-026.out b/regression/t-026.out index 3b9fb14..be50b48

[GUILT 00/28] Teach guilt import-commit how create legal patch names, and more

2014-03-21 Thread Per Cederqvist
; if not, please use the repo above to fetch the commits. Per Cederqvist (28): The tests should not fail if guilt.diffstat is set. Allow guilt delete -f to run from a dir which contains spaces. Added test case for guilt delete -f. Allow guilt import-commit to run from a dir which contains spaces

[GUILT 02/28] Allow guilt delete -f to run from a dir which contains spaces.

2014-03-21 Thread Per Cederqvist
Signed-off-by: Per Cederqvist ced...@opera.com --- guilt-delete | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guilt-delete b/guilt-delete index 3e394f8..967ac10 100755 --- a/guilt-delete +++ b/guilt-delete @@ -49,7 +49,7 @@ series_remove_patch $patch guilt_hook delete

[GUILT 26/28] guilt pop now fails when there are no more patches to pop.

2014-03-21 Thread Per Cederqvist
This is analogous to how guilt push now fails when there are no more patches to push. Like push, the --all argument still succeeds even if there was no need to pop anything. Updated the test suite. Signed-off-by: Per Cederqvist ced...@opera.com --- guilt-pop| 13

[GUILT 21/28] The log.decorate setting should not influence import-commit.

2014-03-21 Thread Per Cederqvist
Use --no-decorate in the call to git log that tries to read the commit message to produce patch names. Otherwise, if the user has set log.decorate to short or full, the patch name will be less useful. Modify the t-034.sh test case to demonstrate that this is needed. Signed-off-by: Per

[GUILT 15/28] Produce legal patch names in guilt-import-commit.

2014-03-21 Thread Per Cederqvist
new rules are added in the future). Always append a .patch suffix to the patch name. Added test cases. Signed-off-by: Per Cederqvist ced...@opera.com --- guilt-import-commit | 22 +- regression/t-034.out | 567 +++ regression/t-034.sh | 72

[GUILT 20/28] guilt graph: Handle patch names containing quotes.

2014-03-21 Thread Per Cederqvist
Quote quotes with a backslash in the guitl graph output. Otherwise, the dot file could contain syntax errors. Added a test case. --- guilt-graph | 2 ++ regression/t-033.out | 22 ++ regression/t-033.sh | 9 + 3 files changed, 33 insertions(+) diff --git

[GUILT 06/28] Fix and simplify the do_get_patch function.

2014-03-21 Thread Per Cederqvist
if guilt.diffstat is true. Signed-off-by: Per Cederqvist ced...@opera.com --- guilt | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/guilt b/guilt index 8701481..c59cd0f 100755 --- a/guilt +++ b/guilt @@ -332,12 +332,7 @@ do_make_header() # usage: do_get_patch patchfile

[GUILT 24/28] disp no longer processes backslashes.

2014-03-21 Thread Per Cederqvist
, and changed disp and disp_ to use printf code %s instead of %b. Signed-off-by: Per Cederqvist ced...@opera.com --- guilt | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/guilt b/guilt index ca922aa..36cfd1e 100755 --- a/guilt +++ b/guilt @@ -36,15 +36,24 @@ usage

[GUILT 11/28] test suite: remove pointless redirection.

2014-03-21 Thread Per Cederqvist
The shouldfail function already redirects stderr to stdout, so there is no need to do the same in t-028.sh and t-021.sh. Signed-off-by: Per Cederqvist ced...@opera.com --- regression/t-021.sh | 2 +- regression/t-025.sh | 2 +- regression/t-028.sh | 2 +- 3 files changed, 3 insertions(+), 3

[GUILT 19/28] Check that guilt graph works when working on a branch with a comma.

2014-03-21 Thread Per Cederqvist
git branch names can contain commas. Check that guilt graph works even in that case. Signed-off-by: Per Cederqvist ced...@opera.com --- regression/t-033.out | 62 regression/t-033.sh | 37 +++ 2 files changed, 99

[GUILT 18/28] guilt-graph: Handle commas in branch names.

2014-03-21 Thread Per Cederqvist
This fix relies on the fact that git branch names can not contain :. Signed-off-by: Per Cederqvist ced...@opera.com --- guilt-graph | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guilt-graph b/guilt-graph index 00301d5..575f03b 100755 --- a/guilt-graph +++ b/guilt-graph

[GUILT 22/28] The log.decorate setting should not influence patchbomb.

2014-03-21 Thread Per Cederqvist
Signed-off-by: Per Cederqvist ced...@opera.com --- guilt-patchbomb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guilt-patchbomb b/guilt-patchbomb index 1231418..164b10c 100755 --- a/guilt-patchbomb +++ b/guilt-patchbomb @@ -47,7 +47,7 @@ if [ $? -ne 0 ]; then fi

[GUILT 07/28] Added test cases for guilt fold.

2014-03-21 Thread Per Cederqvist
Test that we can combine any combination of patches with empty and non-empty messages, both with and without guilt.diffstat. (All patches are empty.) Signed-off-by: Per Cederqvist ced...@opera.com --- regression/t-035.out | 659 +++ regression/t

[GUILT 12/28] guilt header: more robust header selection.

2014-03-21 Thread Per Cederqvist
accepts a unique regular expression.) Signed-off-by: Per Cederqvist ced...@opera.com --- guilt-header | 33 ++--- 1 file changed, 30 insertions(+), 3 deletions(-) diff --git a/guilt-header b/guilt-header index 41e00cc..2e96406 100755 --- a/guilt-header +++ b/guilt-header

[GUILT 08/28] Added more test cases for guilt new: empty patches.

2014-03-21 Thread Per Cederqvist
Test that empty patches are handled correctly, both with and without the guilt.diffstat configuration option. Signed-off-by: Per Cederqvist ced...@opera.com --- regression/t-020.out | 250 +++ regression/t-020.sh | 60 + 2 files

[GUILT 05/28] guilt new: Accept more than 4 arguments.

2014-03-21 Thread Per Cederqvist
error message if -m isn't followed by a message argument. Signed-off-by: Per Cederqvist ced...@opera.com --- guilt-new | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/guilt-new b/guilt-new index bb68924..9528438 100755 --- a/guilt-new +++ b/guilt-new @@ -11,10 +11,6

[GUILT 09/28] Test suite: properly check the exit status of commands.

2014-03-21 Thread Per Cederqvist
place. (The comment in the script makes it clear that the command is expected to succeed.) Signed-off-by: Per Cederqvist ced...@opera.com --- regression/scaffold | 17 +++-- regression/t-032.sh | 2 +- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/regression/scaffold

[GUILT 27/28] Minor testsuite fix.

2014-03-21 Thread Per Cederqvist
Fix remove_topic() in t-061.sh so that it doesn't print a git hash. Signed-off-by: Per Cederqvist ced...@opera.com --- regression/t-061.out | 1 - regression/t-061.sh | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/regression/t-061.out b/regression/t-061.out index ef0f335

[GUILT 23/28] The log.decorate setting should not influence guilt rebase.

2014-03-21 Thread Per Cederqvist
Signed-off-by: Per Cederqvist ced...@opera.com --- guilt-rebase | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guilt-rebase b/guilt-rebase index fd28e48..a1714a0 100755 --- a/guilt-rebase +++ b/guilt-rebase @@ -66,7 +66,7 @@ pop_all_patches git merge --no-commit $upstream

[GUILT 28/28] Added guilt.reusebranch configuration option.

2014-03-21 Thread Per Cederqvist
From: Per Cederqvist ce...@lysator.liu.se When the option is true (the default), Guilt does not create a new Git branch when patches are applied. This way, you can switch between Guilt 0.35 and the current version of Guilt with no issues. At a future time, maybe a year after Guilt

[GUILT 13/28] Check that guilt header '.*' fails.

2014-03-21 Thread Per Cederqvist
Signed-off-by: Per Cederqvist ced...@opera.com --- regression/t-028.out | 7 +++ regression/t-028.sh | 4 2 files changed, 11 insertions(+) diff --git a/regression/t-028.out b/regression/t-028.out index 1564c09..ea72a3a 100644 --- a/regression/t-028.out +++ b/regression/t-028.out

[GUILT 25/28] guilt push now fails when there are no more patches to push.

2014-03-21 Thread Per Cederqvist
there are no patches to apply. Updated the test suite. guilt push -a still does not fail. (It successfully manages to ensure that all patches are pushed, even if it did not have to do anything to make it so.) Signed-off-by: Per Cederqvist ced...@opera.com --- guilt-push | 14

[GUILT 16/28] Fix backslash handling when creating names of imported patches.

2014-03-21 Thread Per Cederqvist
expansion is not portable; it is not supported by dash.) Signed-off-by: Per Cederqvist ced...@opera.com --- guilt-import-commit | 2 +- regression/t-034.out | 14 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/guilt-import-commit b/guilt-import-commit index a4119d6

[GUILT 17/28] guilt graph no longer loops when no patches are applied.

2014-03-21 Thread Per Cederqvist
Give an error message if no patches are applied. Added a test case that never terminates unless this fix is applied. Signed-off-by: Per Cederqvist ced...@opera.com --- guilt-graph | 10 -- regression/t-033.out | 3 +++ regression/t-033.sh | 11 +++ 3 files changed, 22

[GUILT 04/28] Allow guilt import-commit to run from a dir which contains spaces.

2014-03-21 Thread Per Cederqvist
Signed-off-by: Per Cederqvist ced...@opera.com --- guilt-import-commit | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/guilt-import-commit b/guilt-import-commit index 20dcee2..9488ded 100755 --- a/guilt-import-commit +++ b/guilt-import-commit @@ -23,7 +23,7

[GUILT 01/28] The tests should not fail if guilt.diffstat is set.

2014-03-21 Thread Per Cederqvist
Explicitly set guilt.diffstat to its default value. Without this, the 027 test (and possibly others) fail if guilt.diffstat is set to true in ~/.gitconfig. Signed-off-by: Per Cederqvist ced...@opera.com --- regression/scaffold | 1 + 1 file changed, 1 insertion(+) diff --git a/regression

[GUILT 10/28] Run test_failed if the exit status of a test script is bad.

2014-03-21 Thread Per Cederqvist
and checking the exit status, so the exit status was lost. (Actually, the exit status was saved in $ERR, but nothing ever looked at $ERR.) Signed-off-by: Per Cederqvist ced...@opera.com --- regression/run-tests | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git

[GUILT 14/28] Use git check-ref-format to validate patch names.

2014-03-21 Thread Per Cederqvist
is bad. Added testcases that breaks most of the rules in that man-page. Git version 1.8.5 no longer allows the single character @ as a branch name. Guilt always rejects that name, for increased compatibility. Signed-off-by: Per Cederqvist ced...@opera.com --- guilt| 23

Re: [GUILT 04/28] Allow guilt import-commit to run from a dir which contains spaces.

2014-03-23 Thread Per Cederqvist
On Sun, Mar 23, 2014 at 6:04 PM, Jeff Sipek jef...@josefsipek.net wrote: On Fri, Mar 21, 2014 at 08:31:42AM +0100, Per Cederqvist wrote: Signed-off-by: Per Cederqvist ced...@opera.com --- guilt-import-commit | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/guilt

Re: [GUILT 06/28] Fix and simplify the do_get_patch function.

2014-03-23 Thread Per Cederqvist
On Sun, Mar 23, 2014 at 6:09 PM, Jeff Sipek jef...@josefsipek.net wrote: On Fri, Mar 21, 2014 at 08:31:44AM +0100, Per Cederqvist wrote: When extracting the patch, we only want the actual patches. We don't want the --- delimiter. Simplify the extraction by simply deleting everything before

Re: [GUILT 04/28] Allow guilt import-commit to run from a dir which contains spaces.

2014-03-23 Thread Per Cederqvist
On Sun, Mar 23, 2014 at 9:07 PM, Jeff Sipek jef...@josefsipek.net wrote: On Sun, Mar 23, 2014 at 08:57:08PM +0100, Per Cederqvist wrote: On Sun, Mar 23, 2014 at 6:04 PM, Jeff Sipek jef...@josefsipek.net wrote: On Fri, Mar 21, 2014 at 08:31:42AM +0100, Per Cederqvist wrote: Signed-off

Re: [GUILT 06/28] Fix and simplify the do_get_patch function.

2014-05-07 Thread Per Cederqvist
n Tue, May 6, 2014 at 9:08 PM, Jeff Sipek jef...@josefsipek.net wrote: On Sun, Mar 23, 2014 at 10:03:48PM +0100, Per Cederqvist wrote: On Sun, Mar 23, 2014 at 6:09 PM, Jeff Sipek jef...@josefsipek.net wrote: On Fri, Mar 21, 2014 at 08:31:44AM +0100, Per Cederqvist wrote: When extracting

Re: [GUILT 07/28] Added test cases for guilt fold.

2014-05-07 Thread Per Cederqvist
On Tue, May 6, 2014 at 9:40 PM, Jeff Sipek jef...@josefsipek.net wrote: On Fri, Mar 21, 2014 at 08:31:45AM +0100, Per Cederqvist wrote: Test that we can combine any combination of patches with empty and non-empty messages, both with and without guilt.diffstat. (All patches are empty.) I

Re: [GUILT 07/28] Added test cases for guilt fold.

2014-05-08 Thread Per Cederqvist
On Wed, May 7, 2014 at 11:06 PM, Jeff Sipek jef...@josefsipek.net wrote: On Wed, May 07, 2014 at 10:59:56PM +0200, Per Cederqvist wrote: On Tue, May 6, 2014 at 9:40 PM, Jeff Sipek jef...@josefsipek.net wrote: On Fri, Mar 21, 2014 at 08:31:45AM +0100, Per Cederqvist wrote: Test that we can

Re: [GUILT 20/28] guilt graph: Handle patch names containing quotes.

2014-05-08 Thread Per Cederqvist
On Tue, May 6, 2014 at 10:24 PM, Jeff Sipek jef...@josefsipek.net wrote: On Fri, Mar 21, 2014 at 03:57:37AM -0400, Eric Sunshine wrote: On Fri, Mar 21, 2014 at 3:31 AM, Per Cederqvist ced...@opera.com wrote: Quote quotes with a backslash in the guitl graph output. Otherwise, s/guitl/guilt

Re: [GUILT 25/28] guilt push now fails when there are no more patches to push.

2014-05-08 Thread Per Cederqvist
On Thu, May 8, 2014 at 12:04 AM, Jeff Sipek jef...@josefsipek.net wrote: On Fri, Mar 21, 2014 at 08:32:03AM +0100, Per Cederqvist wrote: This makes it easier to script operations on the entire queue, for example run the test suite on each patch in the queue: guilt pop -a;while guilt push

[GUILT v2 00/29] Teach guilt import-commit how to create legal patch names, and more

2014-05-13 Thread Per Cederqvist
the commits. Per Cederqvist (29): The tests should not fail if guilt.diffstat is set. Allow guilt delete -f to run from a dir which contains spaces. Added test case for guilt delete -f. Allow guilt import-commit to run from a dir which contains spaces. guilt new: Accept more than 4

[GUILT v2 01/29] The tests should not fail if guilt.diffstat is set.

2014-05-13 Thread Per Cederqvist
Explicitly set guilt.diffstat to its default value. Without this, the 027 test (and possibly others) fail if guilt.diffstat is set to true in ~/.gitconfig. Signed-off-by: Per Cederqvist ced...@opera.com Signed-off-by: Josef 'Jeff' Sipek jef...@josefsipek.net --- regression/scaffold | 1 + 1

[GUILT v2 02/29] Allow guilt delete -f to run from a dir which contains spaces.

2014-05-13 Thread Per Cederqvist
Signed-off-by: Per Cederqvist ced...@opera.com Signed-off-by: Josef 'Jeff' Sipek jef...@josefsipek.net --- guilt-delete | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guilt-delete b/guilt-delete index 3e394f8..967ac10 100755 --- a/guilt-delete +++ b/guilt-delete @@ -49,7

[GUILT v2 03/29] Added test case for guilt delete -f.

2014-05-13 Thread Per Cederqvist
Ensure that the file really is deleted. Signed-off-by: Per Cederqvist ced...@opera.com Signed-off-by: Josef 'Jeff' Sipek jef...@josefsipek.net --- regression/t-026.out | 15 +++ regression/t-026.sh | 5 - 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/regression

[GUILT v2 04/29] Allow guilt import-commit to run from a dir which contains spaces.

2014-05-13 Thread Per Cederqvist
Signed-off-by: Per Cederqvist ced...@opera.com --- guilt-import-commit | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/guilt-import-commit b/guilt-import-commit index 20dcee2..f14647c 100755 --- a/guilt-import-commit +++ b/guilt-import-commit @@ -23,7 +23,7

[GUILT v2 06/29] Fix the do_get_patch function.

2014-05-13 Thread Per Cederqvist
guilt push empty-2 guilt pop guilt fold empty-2 guilt pop guilt push Signed-off-by: Per Cederqvist ced...@opera.com --- guilt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guilt b/guilt index 8701481..3fc524e 100755 --- a/guilt +++ b/guilt @@ -334,7 +334,7

[GUILT v2 05/29] guilt new: Accept more than 4 arguments.

2014-05-13 Thread Per Cederqvist
error message if -m isn't followed by a message argument. Signed-off-by: Per Cederqvist ced...@opera.com Signed-off-by: Josef 'Jeff' Sipek jef...@josefsipek.net --- guilt-new | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/guilt-new b/guilt-new index bb68924..9528438

[GUILT v2 08/29] Added more test cases for guilt new: empty patches.

2014-05-13 Thread Per Cederqvist
Test that empty patches are handled correctly, both with and without the guilt.diffstat configuration option. Signed-off-by: Per Cederqvist ced...@opera.com --- regression/t-020.out | 250 +++ regression/t-020.sh | 60 + 2 files

[GUILT v2 07/29] Added test cases for guilt fold.

2014-05-13 Thread Per Cederqvist
Test that we can combine any combination of patches with empty and non-empty messages, both with and without guilt.diffstat. (All patches are empty.) Signed-off-by: Per Cederqvist ced...@opera.com --- regression/t-035.out | 467 +++ regression/t

[GUILT v2 09/29] Test suite: properly check the exit status of commands.

2014-05-13 Thread Per Cederqvist
place. (The comment in the script makes it clear that the command is expected to succeed.) Signed-off-by: Per Cederqvist ced...@opera.com --- regression/scaffold | 17 +++-- regression/t-032.sh | 2 +- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/regression/scaffold

[GUILT v2 13/29] Check that guilt header '.*' fails.

2014-05-13 Thread Per Cederqvist
Signed-off-by: Per Cederqvist ced...@opera.com --- regression/t-028.out | 7 +++ regression/t-028.sh | 4 2 files changed, 11 insertions(+) diff --git a/regression/t-028.out b/regression/t-028.out index 1564c09..ea72a3a 100644 --- a/regression/t-028.out +++ b/regression/t-028.out

[GUILT v2 11/29] test suite: remove pointless redirection.

2014-05-13 Thread Per Cederqvist
The shouldfail function already redirects stderr to stdout, so there is no need to do the same in t-028.sh and t-021.sh. Signed-off-by: Per Cederqvist ced...@opera.com Signed-off-by: Josef 'Jeff' Sipek jef...@josefsipek.net --- regression/t-021.sh | 2 +- regression/t-025.sh | 2 +- regression/t

[GUILT v2 10/29] Run test_failed if the exit status of a test script is bad.

2014-05-13 Thread Per Cederqvist
and checking the exit status, so the exit status was lost. (Actually, the exit status was saved in $ERR, but nothing ever looked at $ERR.) Signed-off-by: Per Cederqvist ced...@opera.com --- regression/run-tests | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git

[GUILT v2 12/29] guilt header: more robust header selection.

2014-05-13 Thread Per Cederqvist
accepts a unique regular expression.) Signed-off-by: Per Cederqvist ced...@opera.com --- guilt-header | 28 +--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/guilt-header b/guilt-header index 41e00cc..4701b31 100755 --- a/guilt-header +++ b/guilt-header

[GUILT v2 14/29] Use git check-ref-format to validate patch names.

2014-05-13 Thread Per Cederqvist
is bad. Added testcases that breaks most of the rules in that man-page. Git version 1.8.5 no longer allows the single character @ as a branch name. Guilt always rejects that name, for increased compatibility. Signed-off-by: Per Cederqvist ced...@opera.com --- guilt| 21

[GUILT v2 15/29] Produce legal patch names in guilt-import-commit.

2014-05-13 Thread Per Cederqvist
new rules are added in the future). Always append a .patch suffix to the patch name. Added test cases. Signed-off-by: Per Cederqvist ced...@opera.com --- guilt-import-commit | 20 +- regression/t-034.out | 567 +++ regression/t-034.sh | 71

[GUILT v2 16/29] Fix backslash handling when creating names of imported patches.

2014-05-13 Thread Per Cederqvist
expansion is not portable; it is not supported by dash.) Signed-off-by: Per Cederqvist ced...@opera.com --- guilt-import-commit | 2 +- regression/t-034.out | 14 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/guilt-import-commit b/guilt-import-commit index 6260c56

[GUILT v2 17/29] guilt graph no longer loops when no patches are applied.

2014-05-13 Thread Per Cederqvist
Give an error message if no patches are applied. Added a test case that never terminates unless this fix is applied. Signed-off-by: Per Cederqvist ced...@opera.com --- guilt-graph | 9 +++-- regression/t-033.out | 3 +++ regression/t-033.sh | 13 + 3 files changed

[GUILT v2 19/29] Check that guilt graph works when working on a branch with a comma.

2014-05-13 Thread Per Cederqvist
git branch names can contain commas. Check that guilt graph works even in that case. Signed-off-by: Per Cederqvist ced...@opera.com --- regression/t-033.out | 65 regression/t-033.sh | 39 +++ 2 files changed, 104

[GUILT v2 20/29] guilt graph: Handle patch names containing quotes.

2014-05-13 Thread Per Cederqvist
Quote quotes with a backslash in the guilt graph output. Otherwise, the dot file could contain syntax errors. Added a test case. Signed-off-by: Per Cederqvist ced...@opera.com --- guilt-graph | 2 ++ regression/t-033.out | 22 ++ regression/t-033.sh | 9

[GUILT v2 18/29] guilt-graph: Handle commas in branch names.

2014-05-13 Thread Per Cederqvist
This fix relies on the fact that git branch names can not contain :. Signed-off-by: Per Cederqvist ced...@opera.com Signed-off-by: Josef 'Jeff' Sipek jef...@josefsipek.net --- guilt-graph | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guilt-graph b/guilt-graph index 56d0e77

[GUILT v2 25/29] guilt push now fails when there are no more patches to push.

2014-05-13 Thread Per Cederqvist
there are no patches to apply. Updated the test suite. guilt push -a still does not fail. (It successfully manages to ensure that all patches are pushed, even if it did not have to do anything to make it so.) Signed-off-by: Per Cederqvist ced...@opera.com --- guilt-push | 19

[GUILT v2 27/29] Minor testsuite fix.

2014-05-13 Thread Per Cederqvist
Fix remove_topic() in t-061.sh so that it doesn't print a git hash. Signed-off-by: Per Cederqvist ced...@opera.com Signed-off-by: Josef 'Jeff' Sipek jef...@josefsipek.net --- regression/t-061.out | 1 - regression/t-061.sh | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git

[GUILT v2 26/29] guilt pop now fails when there are no more patches to pop.

2014-05-13 Thread Per Cederqvist
This is analogous to how guilt push now fails when there are no more patches to push. Like push, the --all argument still succeeds even if there was no need to pop anything. Updated the test suite. Signed-off-by: Per Cederqvist ced...@opera.com --- guilt-pop| 17

[GUILT v2 22/29] The log.decorate setting should not influence patchbomb.

2014-05-13 Thread Per Cederqvist
Signed-off-by: Per Cederqvist ced...@opera.com Signed-off-by: Josef 'Jeff' Sipek jef...@josefsipek.net --- guilt-patchbomb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guilt-patchbomb b/guilt-patchbomb index 1231418..164b10c 100755 --- a/guilt-patchbomb +++ b/guilt

[GUILT v2 23/29] The log.decorate setting should not influence guilt rebase.

2014-05-13 Thread Per Cederqvist
Signed-off-by: Per Cederqvist ced...@opera.com Signed-off-by: Josef 'Jeff' Sipek jef...@josefsipek.net --- guilt-rebase | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guilt-rebase b/guilt-rebase index fd28e48..a1714a0 100755 --- a/guilt-rebase +++ b/guilt-rebase @@ -66,7

[GUILT v2 21/29] The log.decorate setting should not influence import-commit.

2014-05-13 Thread Per Cederqvist
Use --no-decorate in the call to git log that tries to read the commit message to produce patch names. Otherwise, if the user has set log.decorate to short or full, the patch name will be less useful. Modify the t-034.sh test case to demonstrate that this is needed. Signed-off-by: Per

[GUILT v2 24/29] disp no longer processes backslashes.

2014-05-13 Thread Per Cederqvist
, and changed disp and _disp to use printf code %s instead of %b. Signed-off-by: Per Cederqvist ced...@opera.com --- guilt | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/guilt b/guilt index 23cc2da..9947acc 100755 --- a/guilt +++ b/guilt @@ -36,15 +36,24 @@ usage

[GUILT v2 28/29] Added guilt.reusebranch configuration option.

2014-05-13 Thread Per Cederqvist
should be changed to false to take advantage of the ability to use a separate Git branch when patches are applied. Signed-off-by: Per Cederqvist ced...@opera.com --- guilt| 28 +++- regression/scaffold | 1 + regression/t-062.out | 441

[GUILT v2 29/29] Added a short style guide, and Emacs settings.

2014-05-13 Thread Per Cederqvist
Signed-off-by: Per Cederqvist ced...@opera.com --- .dir-locals.el | 3 +++ Documentation/Contributing | 15 +++ 2 files changed, 18 insertions(+) create mode 100644 .dir-locals.el diff --git a/.dir-locals.el b/.dir-locals.el new file mode 100644 index 000..50ef2b7

Re: [GUILT v2 00/29] Teach guilt import-commit how to create legal patch names, and more

2014-05-13 Thread Per Cederqvist
On Tue, May 13, 2014 at 10:54 PM, Jeff Sipek jef...@josefsipek.net wrote: On Tue, May 13, 2014 at 04:45:47PM -0400, Theodore Ts'o wrote: On Tue, May 13, 2014 at 10:30:36PM +0200, Per Cederqvist wrote: ... - Changed behavior: by default, guilt no longer changes branch when you push

Re: [GUILT v2 06/29] Fix the do_get_patch function.

2014-05-14 Thread Per Cederqvist
On Tue, May 13, 2014 at 11:13 PM, Jeff Sipek jef...@josefsipek.net wrote: On Tue, May 13, 2014 at 10:30:42PM +0200, Per Cederqvist wrote: A patch file consists of: (1) the description (2) optional diffstat (3) the patches When extracting the patch, we only want part 3. The do_get_patch

Re: [GUILT v2 07/29] Added test cases for guilt fold.

2014-05-14 Thread Per Cederqvist
On Tue, May 13, 2014 at 11:30 PM, Jeff Sipek jef...@josefsipek.net wrote: On Tue, May 13, 2014 at 10:30:43PM +0200, Per Cederqvist wrote: Test that we can combine any combination of patches with empty and non-empty messages, both with and without guilt.diffstat. (All patches are empty

Re: [GUILT v2 16/29] Fix backslash handling when creating names of imported patches.

2014-05-14 Thread Per Cederqvist
On Wed, May 14, 2014 at 12:09 AM, Jeff Sipek jef...@josefsipek.net wrote: On Tue, May 13, 2014 at 10:30:52PM +0200, Per Cederqvist wrote: The 'echo %s' construct sometimes processes escape sequences. (This %s? Should this be $s? Yes. Will fix that typo in v3 of the patch series. /ceder

Re: [GUILT v2 25/29] guilt push now fails when there are no more patches to push.

2014-05-14 Thread Per Cederqvist
On Tue, May 13, 2014 at 11:41 PM, Jeff Sipek jef...@josefsipek.net wrote: On Tue, May 13, 2014 at 10:31:01PM +0200, Per Cederqvist wrote: This makes it easier to script operations on the entire queue, for example run the test suite on each patch in the queue: guilt pop -a;while guilt push

Re: [GUILT v2 00/29] Teach guilt import-commit how to create legal patch names, and more

2014-05-14 Thread Per Cederqvist
On Tue, May 13, 2014 at 11:29 PM, Per Cederqvist ced...@opera.com wrote: On Tue, May 13, 2014 at 10:54 PM, Jeff Sipek jef...@josefsipek.net wrote: On Tue, May 13, 2014 at 04:45:47PM -0400, Theodore Ts'o wrote: On Tue, May 13, 2014 at 10:30:36PM +0200, Per Cederqvist wrote: ... - Changed

Re: [GUILT v2 08/29] Added more test cases for guilt new: empty patches.

2014-05-14 Thread Per Cederqvist
On Wed, May 14, 2014 at 7:10 PM, Jeff Sipek jef...@josefsipek.net wrote: On Tue, May 13, 2014 at 10:30:44PM +0200, Per Cederqvist wrote: Test that empty patches are handled correctly, both with and without the guilt.diffstat configuration option. Signed-off-by: Per Cederqvist ced...@opera.com

Re: [GUILT v2 28/29] Added guilt.reusebranch configuration option.

2014-05-15 Thread Per Cederqvist
On Wed, May 14, 2014 at 5:53 PM, Jeff Sipek jef...@josefsipek.net wrote: On Tue, May 13, 2014 at 10:31:04PM +0200, Per Cederqvist wrote: When the option is true (the default), Guilt does not create a new Git branch when patches are applied. This way, you can switch between Guilt 0.35

Re: [GUILT v2 12/29] guilt header: more robust header selection.

2014-05-16 Thread Per Cederqvist
On Fri, May 16, 2014 at 12:46 AM, Jeff Sipek jef...@josefsipek.net wrote: On Tue, May 13, 2014 at 10:30:48PM +0200, Per Cederqvist wrote: If you run something like guilt header '.*' the command would crash, because the grep comand that tries to ensure that the patch exist would detect a match

[GUILT v3 01/31] The tests should not fail if guilt.diffstat is set.

2014-05-16 Thread Per Cederqvist
Explicitly set guilt.diffstat to its default value. Without this, the 027 test (and possibly others) fail if guilt.diffstat is set to true in ~/.gitconfig. Signed-off-by: Per Cederqvist ced...@opera.com Signed-off-by: Josef 'Jeff' Sipek jef...@josefsipek.net --- regression/scaffold | 1 + 1

[GUILT v3 02/31] Allow guilt delete -f to run from a dir which contains spaces.

2014-05-16 Thread Per Cederqvist
Signed-off-by: Per Cederqvist ced...@opera.com Signed-off-by: Josef 'Jeff' Sipek jef...@josefsipek.net --- guilt-delete | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guilt-delete b/guilt-delete index 3e394f8..967ac10 100755 --- a/guilt-delete +++ b/guilt-delete @@ -49,7

[GUILT v3 00/31] Teach guilt import-commit how to create legal patch names, and more

2014-05-16 Thread Per Cederqvist
the commits. Per Cederqvist (31): The tests should not fail if guilt.diffstat is set. Allow guilt delete -f to run from a dir which contains spaces. Added test case for guilt delete -f. Allow guilt import-commit to run from a dir which contains spaces. guilt new: Accept more than 4 arguments

[GUILT v3 04/31] Allow guilt import-commit to run from a dir which contains spaces.

2014-05-16 Thread Per Cederqvist
Signed-off-by: Per Cederqvist ced...@opera.com Signed-off-by: Josef 'Jeff' Sipek jef...@josefsipek.net --- guilt-import-commit | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/guilt-import-commit b/guilt-import-commit index 20dcee2..f14647c 100755 --- a/guilt-import

[GUILT v3 06/31] Fix the do_get_patch function.

2014-05-16 Thread Per Cederqvist
$ guilt new empty-2 $ guilt pop Now at empty-1 $ guilt fold empty-2 $ guilt pop All patches popped. $ guilt push Applying patch..empty-1 fatal: unrecognized input To force apply this patch, use 'guilt push -f' Signed-off-by: Per Cederqvist ced...@opera.com Signed

[GUILT v3 03/31] Added test case for guilt delete -f.

2014-05-16 Thread Per Cederqvist
Ensure that the file really is deleted. Signed-off-by: Per Cederqvist ced...@opera.com Signed-off-by: Josef 'Jeff' Sipek jef...@josefsipek.net --- regression/t-026.out | 15 +++ regression/t-026.sh | 5 - 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/regression

[GUILT v3 05/31] guilt new: Accept more than 4 arguments.

2014-05-16 Thread Per Cederqvist
error message if -m isn't followed by a message argument. Signed-off-by: Per Cederqvist ced...@opera.com Signed-off-by: Josef 'Jeff' Sipek jef...@josefsipek.net --- guilt-new | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/guilt-new b/guilt-new index bb68924..9528438

[GUILT v3 07/31] Added test cases for guilt fold.

2014-05-16 Thread Per Cederqvist
Test that we can combine any combination of patches with empty and non-empty messages, both with and without guilt.diffstat. (All patches are empty.) Signed-off-by: Per Cederqvist ced...@opera.com Signed-off-by: Josef 'Jeff' Sipek jef...@josefsipek.net --- regression/t-035.out | 467

[GUILT v3 08/31] Added more test cases for guilt new: empty patches.

2014-05-16 Thread Per Cederqvist
Test that empty patches are handled correctly, both with and without the guilt.diffstat configuration option. Signed-off-by: Per Cederqvist ced...@opera.com --- regression/t-020.out | 269 +++ regression/t-020.sh | 60 2 files

[GUILT v3 09/31] Test suite: properly check the exit status of commands.

2014-05-16 Thread Per Cederqvist
place. (The comment in the script makes it clear that the command is expected to succeed.) Signed-off-by: Per Cederqvist ced...@opera.com --- regression/scaffold | 17 +++-- regression/t-032.sh | 2 +- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/regression/scaffold

[GUILT v3 11/31] test suite: remove pointless redirection.

2014-05-16 Thread Per Cederqvist
The shouldfail function already redirects stderr to stdout, so there is no need to do the same in t-028.sh and t-021.sh. Signed-off-by: Per Cederqvist ced...@opera.com Signed-off-by: Josef 'Jeff' Sipek jef...@josefsipek.net --- regression/t-021.sh | 2 +- regression/t-025.sh | 2 +- regression/t

[GUILT v3 10/31] Run test_failed if the exit status of a test script is bad.

2014-05-16 Thread Per Cederqvist
and checking the exit status, so the exit status was lost. (Actually, the exit status was saved in $ERR, but nothing ever looked at $ERR.) Signed-off-by: Per Cederqvist ced...@opera.com Signed-off-by: Josef 'Jeff' Sipek jef...@josefsipek.net --- regression/run-tests | 10 +++--- 1 file

[GUILT v3 14/31] Use git check-ref-format to validate patch names.

2014-05-16 Thread Per Cederqvist
is bad. Added testcases that breaks most of the rules in that man-page. Git version 1.8.5 no longer allows the single character @ as a branch name. Guilt always rejects that name, for increased compatibility. Signed-off-by: Per Cederqvist ced...@opera.com Signed-off-by: Josef 'Jeff' Sipek jef

[GUILT v3 12/31] guilt header: more robust header selection.

2014-05-16 Thread Per Cederqvist
accepts a unique regular expression.) Signed-off-by: Per Cederqvist ced...@opera.com --- guilt-header | 29 ++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/guilt-header b/guilt-header index 41e00cc..c3d24f9 100755 --- a/guilt-header +++ b/guilt-header

[GUILT v3 15/31] Produce legal patch names in guilt-import-commit.

2014-05-16 Thread Per Cederqvist
new rules are added in the future). Always append a .patch suffix to the patch name. Added test cases. Signed-off-by: Per Cederqvist ced...@opera.com Signed-off-by: Josef 'Jeff' Sipek jef...@josefsipek.net --- guilt-import-commit | 20 +- regression/t-034.out | 567

[GUILT v3 16/31] Fix backslash handling when creating names of imported patches.

2014-05-16 Thread Per Cederqvist
expansion is not portable; it is not supported by dash.) Signed-off-by: Per Cederqvist ced...@opera.com Signed-off-by: Josef 'Jeff' Sipek jef...@josefsipek.net --- guilt-import-commit | 2 +- regression/t-034.out | 14 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git

[GUILT v3 18/31] guilt-graph: Handle commas in branch names.

2014-05-16 Thread Per Cederqvist
This fix relies on the fact that git branch names can not contain :. Signed-off-by: Per Cederqvist ced...@opera.com Signed-off-by: Josef 'Jeff' Sipek jef...@josefsipek.net --- guilt-graph | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guilt-graph b/guilt-graph index 56d0e77

[GUILT v3 17/31] guilt graph no longer loops when no patches are applied.

2014-05-16 Thread Per Cederqvist
Give an error message if no patches are applied. Added a test case that never terminates unless this fix is applied. Signed-off-by: Per Cederqvist ced...@opera.com Signed-off-by: Josef 'Jeff' Sipek jef...@josefsipek.net --- guilt-graph | 9 +++-- regression/t-033.out | 3

[GUILT v3 19/31] Check that guilt graph works when working on a branch with a comma.

2014-05-16 Thread Per Cederqvist
git branch names can contain commas. Check that guilt graph works even in that case. Signed-off-by: Per Cederqvist ced...@opera.com Signed-off-by: Josef 'Jeff' Sipek jef...@josefsipek.net --- regression/t-033.out | 65 regression/t-033.sh

[GUILT v3 21/31] The log.decorate setting should not influence import-commit.

2014-05-16 Thread Per Cederqvist
Use --no-decorate in the call to git log that tries to read the commit message to produce patch names. Otherwise, if the user has set log.decorate to short or full, the patch name will be less useful. Modify the t-034.sh test case to demonstrate that this is needed. Signed-off-by: Per

[GUILT v3 20/31] guilt graph: Handle patch names containing quotes.

2014-05-16 Thread Per Cederqvist
Quote quotes with a backslash in the guilt graph output. Otherwise, the dot file could contain syntax errors. Added a test case. Signed-off-by: Per Cederqvist ced...@opera.com Signed-off-by: Josef 'Jeff' Sipek jef...@josefsipek.net --- guilt-graph | 2 ++ regression/t-033.out | 22

[GUILT v3 24/31] disp no longer processes backslashes.

2014-05-16 Thread Per Cederqvist
, and changed disp and _disp to use printf code %s instead of %b. Signed-off-by: Per Cederqvist ced...@opera.com Signed-off-by: Josef 'Jeff' Sipek jef...@josefsipek.net --- guilt | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/guilt b/guilt index 23cc2da..9947acc 100755

[GUILT v3 23/31] The log.decorate setting should not influence guilt rebase.

2014-05-16 Thread Per Cederqvist
Signed-off-by: Per Cederqvist ced...@opera.com Signed-off-by: Josef 'Jeff' Sipek jef...@josefsipek.net --- guilt-rebase | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guilt-rebase b/guilt-rebase index fd28e48..a1714a0 100755 --- a/guilt-rebase +++ b/guilt-rebase @@ -66,7

[GUILT v3 22/31] The log.decorate setting should not influence patchbomb.

2014-05-16 Thread Per Cederqvist
Signed-off-by: Per Cederqvist ced...@opera.com Signed-off-by: Josef 'Jeff' Sipek jef...@josefsipek.net --- guilt-patchbomb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guilt-patchbomb b/guilt-patchbomb index 1231418..164b10c 100755 --- a/guilt-patchbomb +++ b/guilt

  1   2   >