{"thread":{"id":"9659","subject":"[StGIT PATCH 0/4] Miscellaneous fixes","startedAt":"2007-08-26T20:26:04Z","lastAt":"2007-09-03T08:40:08Z","messageCount":8,"participants":["Karl Hasselström","Catalin Marinas"],"isPatch":true,"patchVersion":1,"patchTotal":4},"messages":[{"id":"51584","messageId":"20070826202309.15933.54183.stgit@yoghurt","threadId":"9659","inReplyTo":null,"subject":"[StGIT PATCH 0/4] Miscellaneous fixes","fromName":"Karl Hasselström","fromEmail":"kha@treskal.com","sentAt":"2007-08-26T20:26:04Z","receivedAt":"2007-08-26T20:26:04Z","isPatch":true,"sender":{"key":"kha@treskal.com","avatar":"https://gravatar.com/avatar/f0120c734b5279b345075a28521e1ac66acb20c9913ffe9bf6ae97e53f7f3f13?d=mp&s=160"},"body":"This is a few miscellaneous fixes. Also available here:\n\n  git://repo.or.cz/stgit/kha.git fixes\n\nKarl Hasselström (4):\n      Don't use test_expect_failure when more than one thing could fail\n      Don't write None to the conf file\n      Replace \"git repo-config\" with \"git config\" in help texts\n      Compile regexp just once\n\n examples/gitconfig          |    2 +-\n stgit/git.py                |    3 ++-\n stgit/stack.py              |    7 ++++---\n t/t2101-pull-policy-pull.sh |    4 ++--\n 4 files changed, 9 insertions(+), 7 deletions(-)\n\n-- \nKarl Hasselström, kha@treskal.com\n      www.treskal.com/kalle\n"},{"id":"51586","messageId":"20070826202615.15933.76401.stgit@yoghurt","threadId":"9659","inReplyTo":"20070826202309.15933.54183.stgit@yoghurt","subject":"[StGIT PATCH 1/4] Don't use test_expect_failure when more than one thing could fail","fromName":"Karl Hasselström","fromEmail":"kha@treskal.com","sentAt":"2007-08-26T20:26:15Z","receivedAt":"2007-08-26T20:26:15Z","isPatch":true,"sender":{"key":"kha@treskal.com","avatar":"https://gravatar.com/avatar/f0120c734b5279b345075a28521e1ac66acb20c9913ffe9bf6ae97e53f7f3f13?d=mp&s=160"},"body":"It's much better to use ! for the part that you actually expect to\nfail; that way, the test will still scream if something _else_ goes\nwrong.\n\nSigned-off-by: Karl Hasselström <kha@treskal.com>\n\n---\n\n t/t2101-pull-policy-pull.sh |    4 ++--\n 1 files changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/t/t2101-pull-policy-pull.sh b/t/t2101-pull-policy-pull.sh\nindex 793491c..14d5adb 100755\n--- a/t/t2101-pull-policy-pull.sh\n+++ b/t/t2101-pull-policy-pull.sh\n@@ -39,11 +39,11 @@ test_expect_success \\\n # as rewinding, and thus heads/origin is not moved, but the stack\n # is still correctly rebased\n \n-test_expect_failure \\\n+test_expect_success \\\n     'Rewind/rewrite upstream commit and pull it from clone, without --merged' \\\n     '\n     (cd upstream && echo b >> file2 && stg refresh) &&\n-    (cd clone && stg pull)\n+    (cd clone && ! stg pull)\n     '\n \n test_expect_success \\\n"},{"id":"51585","messageId":"20070826202620.15933.51552.stgit@yoghurt","threadId":"9659","inReplyTo":"20070826202309.15933.54183.stgit@yoghurt","subject":"[StGIT PATCH 2/4] Don't write None to the conf file","fromName":"Karl Hasselström","fromEmail":"kha@treskal.com","sentAt":"2007-08-26T20:26:21Z","receivedAt":"2007-08-26T20:26:21Z","isPatch":true,"sender":{"key":"kha@treskal.com","avatar":"https://gravatar.com/avatar/f0120c734b5279b345075a28521e1ac66acb20c9913ffe9bf6ae97e53f7f3f13?d=mp&s=160"},"body":"If we don't have a value for the remote, just don't write it. Writing\nNone will either write the string \"None\" or crash StGIT, depending on\nhow exactly the call is done -- and neither is what we want!\n\nSigned-off-by: Karl Hasselström <kha@treskal.com>\n\n---\n\n stgit/stack.py |    3 ++-\n 1 files changed, 2 insertions(+), 1 deletions(-)\n\ndiff --git a/stgit/stack.py b/stgit/stack.py\nindex 030562d..0ce9992 100644\n--- a/stgit/stack.py\n+++ b/stgit/stack.py\n@@ -546,7 +546,8 @@ class Series(PatchSet):\n \n     def set_parent(self, remote, localbranch):\n         if localbranch:\n-            self.__set_parent_remote(remote)\n+            if remote:\n+                self.__set_parent_remote(remote)\n             self.__set_parent_branch(localbranch)\n         # We'll enforce this later\n #         else:\n"},{"id":"51587","messageId":"20070826202626.15933.27528.stgit@yoghurt","threadId":"9659","inReplyTo":"20070826202309.15933.54183.stgit@yoghurt","subject":"[StGIT PATCH 3/4] Replace \"git repo-config\" with \"git config\" in help texts","fromName":"Karl Hasselström","fromEmail":"kha@treskal.com","sentAt":"2007-08-26T20:26:26Z","receivedAt":"2007-08-26T20:26:26Z","isPatch":true,"sender":{"key":"kha@treskal.com","avatar":"https://gravatar.com/avatar/f0120c734b5279b345075a28521e1ac66acb20c9913ffe9bf6ae97e53f7f3f13?d=mp&s=160"},"body":"It makes sense to still use git-repo-config instead of git-config in\nthe code, since the latter name is not available in older gits, but\nit's better to use the new name in the help texts since the\noverwhelming majority of users aren't going to use a very old git.\n\nSigned-off-by: Karl Hasselström <kha@treskal.com>\n\n---\n\n examples/gitconfig |    2 +-\n stgit/stack.py     |    4 ++--\n 2 files changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/examples/gitconfig b/examples/gitconfig\nindex e402208..f1c653e 100644\n--- a/examples/gitconfig\n+++ b/examples/gitconfig\n@@ -1,6 +1,6 @@\n # StGIT configuration file. Copy it to any of ~/.gitconfig or\n # .git/config and modify as needed. Note that the latter overrides\n-# the former. The \"git repo-config\" command can be used as well\n+# the former. The \"git config\" command can be used as well\n \n [user]\n \t# Default author/committer details (standard GIT variables)\ndiff --git a/stgit/stack.py b/stgit/stack.py\nindex 0ce9992..1ab10c5 100644\n--- a/stgit/stack.py\n+++ b/stgit/stack.py\n@@ -515,7 +515,7 @@ class Series(PatchSet):\n             out.note(('No parent remote declared for stack \"%s\",'\n                       ' defaulting to \"origin\".' % self.get_name()),\n                      ('Consider setting \"branch.%s.remote\" and'\n-                      ' \"branch.%s.merge\" with \"git repo-config\".'\n+                      ' \"branch.%s.merge\" with \"git config\".'\n                       % (self.get_name(), self.get_name())))\n             return 'origin'\n         else:\n@@ -532,7 +532,7 @@ class Series(PatchSet):\n             out.note(('No parent branch declared for stack \"%s\",'\n                       ' defaulting to \"heads/origin\".' % self.get_name()),\n                      ('Consider setting \"branch.%s.stgit.parentbranch\"'\n-                      ' with \"git repo-config\".' % self.get_name()))\n+                      ' with \"git config\".' % self.get_name()))\n             return 'heads/origin'\n         else:\n             raise StackException, 'Cannot find a parent branch for \"%s\"' % self.get_name()\n"},{"id":"51588","messageId":"20070826202632.15933.99722.stgit@yoghurt","threadId":"9659","inReplyTo":"20070826202309.15933.54183.stgit@yoghurt","subject":"[StGIT PATCH 4/4] Compile regexp just once","fromName":"Karl Hasselström","fromEmail":"kha@treskal.com","sentAt":"2007-08-26T20:26:32Z","receivedAt":"2007-08-26T20:26:32Z","isPatch":true,"sender":{"key":"kha@treskal.com","avatar":"https://gravatar.com/avatar/f0120c734b5279b345075a28521e1ac66acb20c9913ffe9bf6ae97e53f7f3f13?d=mp&s=160"},"body":"It's a waste of time to recompile the same regexp every time we go\nthrough the loop.\n\nSigned-off-by: Karl Hasselström <kha@treskal.com>\n\n---\n\n stgit/git.py |    3 ++-\n 1 files changed, 2 insertions(+), 1 deletions(-)\n\ndiff --git a/stgit/git.py b/stgit/git.py\nindex 1807f69..14b4c81 100644\n--- a/stgit/git.py\n+++ b/stgit/git.py\n@@ -275,8 +275,9 @@ def local_changes(verbose = True):\n \n def get_heads():\n     heads = []\n+    hr = re.compile(r'^[0-9a-f]{40} refs/heads/(.+)$')\n     for line in _output_lines(['git-show-ref', '--heads']):\n-        m = re.match('^[0-9a-f]{40} refs/heads/(.+)$', line)\n+        m = hr.match(line)\n         heads.append(m.group(1))\n     return heads\n \n"},{"id":"51799","messageId":"b0943d9e0708290318k715cb94eidfa38a97825511ca@mail.gmail.com","threadId":"9659","inReplyTo":"20070826202309.15933.54183.stgit@yoghurt","subject":"Re: [StGIT PATCH 0/4] Miscellaneous fixes","fromName":"Catalin Marinas","fromEmail":"catalin.marinas@gmail.com","sentAt":"2007-08-29T10:18:34Z","receivedAt":"2007-08-29T10:18:34Z","isPatch":true,"sender":{"key":"catalin.marinas@gmail.com","avatar":null},"body":"On 26/08/2007, Karl Hasselström <kha@treskal.com> wrote:\n> This is a few miscellaneous fixes. Also available here:\n\nThanks.\n\n>\n>   git://repo.or.cz/stgit/kha.git fixes\n>\n> Karl Hasselström (4):\n>       Don't use test_expect_failure when more than one thing could fail\n>       Don't write None to the conf file\n>       Replace \"git repo-config\" with \"git config\" in help texts\n>       Compile regexp just once\n>\n>  examples/gitconfig          |    2 +-\n>  stgit/git.py                |    3 ++-\n>  stgit/stack.py              |    7 ++++---\n>  t/t2101-pull-policy-pull.sh |    4 ++--\n>  4 files changed, 9 insertions(+), 7 deletions(-)\n\nBTW, did you generate the above text by hand and copied it to the\ne-mail? People asked in the past for this kind of text to be\nautomatically generated by 'stg mail'.\n\n-- \nCatalin\n"},{"id":"51808","messageId":"20070829111759.GB29980@diana.vm.bytemark.co.uk","threadId":"9659","inReplyTo":"b0943d9e0708290318k715cb94eidfa38a97825511ca@mail.gmail.com","subject":"Re: [StGIT PATCH 0/4] Miscellaneous fixes","fromName":"Karl Hasselström","fromEmail":"kha@treskal.com","sentAt":"2007-08-29T11:17:59Z","receivedAt":"2007-08-29T11:17:59Z","isPatch":true,"sender":{"key":"kha@treskal.com","avatar":"https://gravatar.com/avatar/f0120c734b5279b345075a28521e1ac66acb20c9913ffe9bf6ae97e53f7f3f13?d=mp&s=160"},"body":"On 2007-08-29 11:18:34 +0100, Catalin Marinas wrote:\n\n> On 26/08/2007, Karl Hasselström <kha@treskal.com> wrote:\n>\n> >   git://repo.or.cz/stgit/kha.git fixes\n> >\n> > Karl Hasselström (4):\n> >       Don't use test_expect_failure when more than one thing could fail\n> >       Don't write None to the conf file\n> >       Replace \"git repo-config\" with \"git config\" in help texts\n> >       Compile regexp just once\n> >\n> >  examples/gitconfig          |    2 +-\n> >  stgit/git.py                |    3 ++-\n> >  stgit/stack.py              |    7 ++++---\n> >  t/t2101-pull-policy-pull.sh |    4 ++--\n> >  4 files changed, 9 insertions(+), 7 deletions(-)\n>\n> BTW, did you generate the above text by hand and copied it to the\n> e-mail?\n\nYes. It's the output of git-request-pull.\n\n> People asked in the past for this kind of text to be automatically\n> generated by 'stg mail'.\n\nI might very well have been one of them.\n\nAdding cover message template support for shortlog and aggregate\ndiffstat should be straightforward. I might get to it some time in the\nnot too distant future if no one else beats me to it. As for the pull\nline, that's another story; git-request-pull actually seems to connect\nto that repository and check its contents, and I'm not convinced\nthat's a good thing for stg-mail to be doing. But that's the least\nwanted item of the three anyway, I guess.\n\n-- \nKarl Hasselström, kha@treskal.com\n      www.treskal.com/kalle\n"},{"id":"52320","messageId":"b0943d9e0709030140s57beca46j4fc93298744dc9c5@mail.gmail.com","threadId":"9659","inReplyTo":"20070829111759.GB29980@diana.vm.bytemark.co.uk","subject":"Re: [StGIT PATCH 0/4] Miscellaneous fixes","fromName":"Catalin Marinas","fromEmail":"catalin.marinas@gmail.com","sentAt":"2007-09-03T08:40:08Z","receivedAt":"2007-09-03T08:40:08Z","isPatch":true,"sender":{"key":"catalin.marinas@gmail.com","avatar":null},"body":"On 29/08/07, Karl Hasselström <kha@treskal.com> wrote:\n> On 2007-08-29 11:18:34 +0100, Catalin Marinas wrote:\n>\n> > On 26/08/2007, Karl Hasselström <kha@treskal.com> wrote:\n> > >  examples/gitconfig          |    2 +-\n> > >  stgit/git.py                |    3 ++-\n> > >  stgit/stack.py              |    7 ++++---\n> > >  t/t2101-pull-policy-pull.sh |    4 ++--\n> > >  4 files changed, 9 insertions(+), 7 deletions(-)\n> >\n> > BTW, did you generate the above text by hand and copied it to the\n> > e-mail?\n>\n> Yes. It's the output of git-request-pull.\n>\n> > People asked in the past for this kind of text to be automatically\n> > generated by 'stg mail'.\n>\n> I might very well have been one of them.\n\nOn a related note, it might make sense for 'stg export' to add (with\nan additional option) a comment line beside each patch in the series\nfile containing the short description.\n\n-- \nCatalin\n"}]}