{"thread":{"id":"8474","subject":"[PATCH 1/3] Robustify rebase test: check patches are reapplied.","startedAt":"2007-06-06T22:01:36Z","lastAt":"2007-06-10T08:40:45Z","messageCount":5,"participants":["Yann Dirson","Karl Hasselström"],"isPatch":true,"patchVersion":1,"patchTotal":3},"messages":[{"id":"44197","messageId":"20070606215922.18635.38379.stgit@gandelf.nowhere.earth","threadId":"8474","inReplyTo":null,"subject":"[SGIT PATCH 0/3] Assorted fixes","fromName":"Yann Dirson","fromEmail":"ydirson@altern.org","sentAt":"2007-06-06T22:01:36Z","receivedAt":"2007-06-06T22:01:36Z","isPatch":true,"sender":{"key":"ydirson@altern.org","avatar":"https://avatars.githubusercontent.com/u/1190950?v=4"},"body":"This fixes the issue reported by Andrey Borzenkov, and robustifies\nanother testcase to catch any similar issue.\n\nAlso updates stg-whatchanged, which for some reason had been left\nbroken.\n\n-- \nYann Dirson    <ydirson@altern.org> |\nDebian-related: <dirson@debian.org> |   Support Debian GNU/Linux:\n                                    |  Freedom, Power, Stability, Gratis\n     http://ydirson.free.fr/        | Check <http://www.debian.org/>\n"},{"id":"44196","messageId":"20070606220142.18635.3961.stgit@gandelf.nowhere.earth","threadId":"8474","inReplyTo":"20070606215922.18635.38379.stgit@gandelf.nowhere.earth","subject":"[PATCH 1/3] Robustify rebase test: check patches are reapplied.","fromName":"Yann Dirson","fromEmail":"ydirson@altern.org","sentAt":"2007-06-06T22:01:42Z","receivedAt":"2007-06-06T22:01:42Z","isPatch":true,"sender":{"key":"ydirson@altern.org","avatar":"https://avatars.githubusercontent.com/u/1190950?v=4"},"body":"\nSigned-off-by: Yann Dirson <ydirson@altern.org>\n\n---\n\n t/t2200-rebase.sh |    3 ++-\n 1 files changed, 2 insertions(+), 1 deletions(-)\n\ndiff --git a/t/t2200-rebase.sh b/t/t2200-rebase.sh\nindex 52462dd..882572c 100755\n--- a/t/t2200-rebase.sh\n+++ b/t/t2200-rebase.sh\n@@ -27,7 +27,8 @@ test_expect_success \\\n \t'Rebase to previous commit' \\\n \t'\n \tstg rebase master~1 &&\n-\ttest `stg id base@stack` = `git rev-parse master~1`\n+\ttest `stg id base@stack` = `git rev-parse master~1` &&\n+\ttest `stg applied | wc -l` = 1\n \t'\n \n test_done\n"},{"id":"44198","messageId":"20070606220147.18635.81773.stgit@gandelf.nowhere.earth","threadId":"8474","inReplyTo":"20070606215922.18635.38379.stgit@gandelf.nowhere.earth","subject":"[PATCH 2/3] Catch early trying rebasing to unknown ref, and add testcase.","fromName":"Yann Dirson","fromEmail":"ydirson@altern.org","sentAt":"2007-06-06T22:01:47Z","receivedAt":"2007-06-06T22:01:47Z","isPatch":true,"sender":{"key":"ydirson@altern.org","avatar":"https://avatars.githubusercontent.com/u/1190950?v=4"},"body":"\nSigned-off-by: Yann Dirson <ydirson@altern.org>\n\n---\n\n stgit/commands/rebase.py |    4 ++++\n t/t2200-rebase.sh        |   12 ++++++++++++\n 2 files changed, 16 insertions(+), 0 deletions(-)\n\ndiff --git a/stgit/commands/rebase.py b/stgit/commands/rebase.py\nindex d132b60..2f0e660 100644\n--- a/stgit/commands/rebase.py\n+++ b/stgit/commands/rebase.py\n@@ -52,6 +52,10 @@ def func(parser, options, args):\n     check_conflicts()\n     check_head_top_equal()\n \n+    # ensure an exception is raised before popping on non-existent target\n+    if git_id(args[0]) == None:\n+        raise GitException, 'Unknown revision: %s' % git_id\n+        \n     applied = prepare_rebase(real_rebase=True, force=options.force)\n     rebase(args[0])\n     post_rebase(applied, options.nopush, options.merged)\ndiff --git a/t/t2200-rebase.sh b/t/t2200-rebase.sh\nindex 882572c..c142e08 100755\n--- a/t/t2200-rebase.sh\n+++ b/t/t2200-rebase.sh\n@@ -31,4 +31,16 @@ test_expect_success \\\n \ttest `stg applied | wc -l` = 1\n \t'\n \n+test_expect_failure \\\n+\t'Attempt rebase to non-existing commit' \\\n+\t'\n+\tstg rebase not-a-ref\n+\t'\n+\n+test_expect_success \\\n+\t'Check patches were re-applied' \\\n+\t'\n+\ttest $(stg applied | wc -l) = 1\n+\t'\n+\n test_done\n"},{"id":"44199","messageId":"20070606220152.18635.43506.stgit@gandelf.nowhere.earth","threadId":"8474","inReplyTo":"20070606215922.18635.38379.stgit@gandelf.nowhere.earth","subject":"[PATCH 3/3] Fixed typo in contrib/stg-whatchanged.","fromName":"Yann Dirson","fromEmail":"ydirson@altern.org","sentAt":"2007-06-06T22:01:52Z","receivedAt":"2007-06-06T22:01:52Z","isPatch":true,"sender":{"key":"ydirson@altern.org","avatar":"https://avatars.githubusercontent.com/u/1190950?v=4"},"body":"\nSigned-off-by: Yann Dirson <ydirson@altern.org>\n\n---\n\n contrib/stg-whatchanged |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/contrib/stg-whatchanged b/contrib/stg-whatchanged\nindex f80d0a1..d5b6965 100755\n--- a/contrib/stg-whatchanged\n+++ b/contrib/stg-whatchanged\n@@ -23,7 +23,7 @@ fi\n \n # Merges via \"push\" leave top=bottom so we must look at old patch\n # in this case (unlike, eg., \"pick --fold\")\n-patchdir=\"$(git-rev-parse --git-dir)/patches/$(stg branch)/$(stg top)\"\n+patchdir=\"$(git-rev-parse --git-dir)/patches/$(stg branch)/patches/$(stg top)\"\n if [ $(cat \"$patchdir/bottom\") = $(cat \"$patchdir/top\") ];\n then\n     current_cmd=\"stg show //top.old\"\n"},{"id":"44553","messageId":"20070610084045.GA31274@diana.vm.bytemark.co.uk","threadId":"8474","inReplyTo":"20070606220142.18635.3961.stgit@gandelf.nowhere.earth","subject":"Re: [PATCH 1/3] Robustify rebase test: check patches are reapplied.","fromName":"Karl Hasselström","fromEmail":"kha@treskal.com","sentAt":"2007-06-10T08:40:45Z","receivedAt":"2007-06-10T08:40:45Z","isPatch":true,"sender":{"key":"kha@treskal.com","avatar":"https://gravatar.com/avatar/f0120c734b5279b345075a28521e1ac66acb20c9913ffe9bf6ae97e53f7f3f13?d=mp&s=160"},"body":"On 2007-06-07 00:01:42 +0200, Yann Dirson wrote:\n\n> +\ttest `stg applied | wc -l` = 1\n\nUnimportant note: I believe \"stg applied\" has a -c (count) flag for\nprecisely this purpose.\n\n-- \nKarl Hasselström, kha@treskal.com\n      www.treskal.com/kalle\n"}]}