{"thread":{"id":"33401","subject":"[PATCH] remote-helpers: remove --graph in hg_log()","startedAt":"2013-04-06T16:00:55Z","lastAt":"2013-04-07T01:25:15Z","messageCount":6,"participants":["Antoine Pelisse","Felipe Contreras","Eric Sunshine"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"213309","messageId":"1365264055-30507-1-git-send-email-apelisse@gmail.com","threadId":"33401","inReplyTo":null,"subject":"[PATCH] remote-helpers: remove --graph in hg_log()","fromName":"Antoine Pelisse","fromEmail":"apelisse@gmail.com","sentAt":"2013-04-06T16:00:55Z","receivedAt":"2013-04-06T16:00:55Z","isPatch":true,"sender":{"key":"apelisse@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1929644?v=4"},"body":"The hg_log() test helper uses the \"--graph\" parameter that is\nimplemented by the GraphLog extension. If the extension is not activated\nby the user, the parameter is not available. Do not use the option that\nis unnecessary.\n\nAlso changes the way we grep the output in hg_log(). The pipe operator\ncan hide the return code of hg command. As a matter of fact, if log\nfails because it doesn't know about \"--graph\", it doesn't report any\nfailure and let's you think everything worked.\n\nSigned-off-by: Antoine Pelisse <apelisse@gmail.com>\n---\nHey Felipe,\nI'm not so confident that --graph is useless to the test. If it's really\nnecessary, it would be nice either to activate it in setup() or to use\nit just for the command through: \"--config extensions.graphlog=\".\n\nCheers,\n\n contrib/remote-helpers/test-hg-bidi.sh |    3 ++-\n 1 file changed, 2 insertions(+), 1 deletion(-)\n\ndiff --git a/contrib/remote-helpers/test-hg-bidi.sh b/contrib/remote-helpers/test-hg-bidi.sh\nindex 1d61982..96cd5a7 100755\n--- a/contrib/remote-helpers/test-hg-bidi.sh\n+++ b/contrib/remote-helpers/test-hg-bidi.sh\n@@ -50,7 +50,8 @@ hg_push () {\n }\n\n hg_log () {\n-\thg -R $1 log --graph --debug | grep -v 'tag: *default/'\n+\thg -R $1 log --debug >log &&\n+\tgrep -v 'tag: *default/' log\n }\n\n setup () {\n--\n1.7.9.5\n"},{"id":"213337","messageId":"CAMP44s2tdKhGuH3E7nGqU4R3jgEw4tH-=Cq6dhHwiLc=b_fm6Q@mail.gmail.com","threadId":"33401","inReplyTo":"1365264055-30507-1-git-send-email-apelisse@gmail.com","subject":"Re: [PATCH] remote-helpers: remove --graph in hg_log()","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2013-04-06T16:06:39Z","receivedAt":"2013-04-06T16:06:39Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"On Sat, Apr 6, 2013 at 10:00 AM, Antoine Pelisse <apelisse@gmail.com> wrote:\n> The hg_log() test helper uses the \"--graph\" parameter that is\n> implemented by the GraphLog extension. If the extension is not activated\n> by the user, the parameter is not available. Do not use the option that\n> is unnecessary.\n\n> I'm not so confident that --graph is useless to the test. If it's really\n> necessary, it would be nice either to activate it in setup() or to use\n> it just for the command through: \"--config extensions.graphlog=\".\n\nI think it should be activated in the setup, it comes packaged with\nmercurial, and it's likely that many users have it enabled.\n\n> Also changes the way we grep the output in hg_log(). The pipe operator\n> can hide the return code of hg command. As a matter of fact, if log\n> fails because it doesn't know about \"--graph\", it doesn't report any\n> failure and let's you think everything worked.\n\nYeap, that is good to have.\n\nCheers.\n\n-- \nFelipe Contreras\n"},{"id":"213342","messageId":"CALWbr2yhZW46RB=8gUivcN4r5NFhk0y-0ND-X2c8ALKos6qi=Q@mail.gmail.com","threadId":"33401","inReplyTo":"CAMP44s2tdKhGuH3E7nGqU4R3jgEw4tH-=Cq6dhHwiLc=b_fm6Q@mail.gmail.com","subject":"Re: [PATCH] remote-helpers: remove --graph in hg_log()","fromName":"Antoine Pelisse","fromEmail":"apelisse@gmail.com","sentAt":"2013-04-06T16:12:02Z","receivedAt":"2013-04-06T16:12:02Z","isPatch":true,"sender":{"key":"apelisse@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1929644?v=4"},"body":"On Sat, Apr 6, 2013 at 6:06 PM, Felipe Contreras\n<felipe.contreras@gmail.com> wrote:\n> On Sat, Apr 6, 2013 at 10:00 AM, Antoine Pelisse <apelisse@gmail.com> wrote:\n>> I'm not so confident that --graph is useless to the test. If it's really\n>> necessary, it would be nice either to activate it in setup() or to use\n>> it just for the command through: \"--config extensions.graphlog=\".\n>\n> I think it should be activated in the setup, it comes packaged with\n> mercurial, and it's likely that many users have it enabled.\n\nBut is it relevant to the tests ? I have the feeling that it's not\nstrictly necessary to both add an extension to hgrc and a command line\noption. (and indeed, the tests still work for me, but maybe I'm\nmissing something).\n"},{"id":"213335","messageId":"CAMP44s1RhMR4vkUqbOOqQ+VAHVQgO8SCrBSSGNjCD-buGnb10g@mail.gmail.com","threadId":"33401","inReplyTo":"CALWbr2yhZW46RB=8gUivcN4r5NFhk0y-0ND-X2c8ALKos6qi=Q@mail.gmail.com","subject":"Re: [PATCH] remote-helpers: remove --graph in hg_log()","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2013-04-06T16:32:10Z","receivedAt":"2013-04-06T16:32:10Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"On Sat, Apr 6, 2013 at 10:12 AM, Antoine Pelisse <apelisse@gmail.com> wrote:\n> On Sat, Apr 6, 2013 at 6:06 PM, Felipe Contreras\n> <felipe.contreras@gmail.com> wrote:\n>> On Sat, Apr 6, 2013 at 10:00 AM, Antoine Pelisse <apelisse@gmail.com> wrote:\n>>> I'm not so confident that --graph is useless to the test. If it's really\n>>> necessary, it would be nice either to activate it in setup() or to use\n>>> it just for the command through: \"--config extensions.graphlog=\".\n>>\n>> I think it should be activated in the setup, it comes packaged with\n>> mercurial, and it's likely that many users have it enabled.\n>\n> But is it relevant to the tests ? I have the feeling that it's not\n> strictly necessary to both add an extension to hgrc and a command line\n> option. (and indeed, the tests still work for me, but maybe I'm\n> missing something).\n\nIt's possible that the order of the commits make them look the same,\nbut the topology is different. At least I saw a couple of cases when I\nwas working on them, but of course, that was on test-hg-hg-git.sh,\nwhich should also have a patch. I think adding it in hgrc is the best\noption.\n\n-- \nFelipe Contreras\n"},{"id":"213340","messageId":"1365267052-2604-1-git-send-email-apelisse@gmail.com","threadId":"33401","inReplyTo":"CAMP44s1RhMR4vkUqbOOqQ+VAHVQgO8SCrBSSGNjCD-buGnb10g@mail.gmail.com","subject":"[PATCH] remote-hg: activate graplog extension for hg_log()","fromName":"Antoine Pelisse","fromEmail":"apelisse@gmail.com","sentAt":"2013-04-06T16:50:52Z","receivedAt":"2013-04-06T16:50:52Z","isPatch":true,"sender":{"key":"apelisse@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1929644?v=4"},"body":"The hg_log() test helper uses the \"--graph\" parameter that is\nimplemented by the GraphLog extension. If the extension is not activated\nby the user, the parameter is not available. Activate the extension in\nsetup().\n\nAlso changes the way we grep the output in hg_log(). The pipe operator\ncan hide the return code of hg command. As a matter of fact, if log\nfails because it doesn't know about \"--graph\", it doesn't report any\nfailure and let's you think everything worked.\n\nSigned-off-by: Antoine Pelisse <apelisse@gmail.com>\n---\n- Updated the title to use remote-hg instead of remote-helpers\n- Activate the extension instead of removing the option\n- Apply the same to test-hg-hg-git\n\n contrib/remote-helpers/test-hg-bidi.sh   |    5 ++++-\n contrib/remote-helpers/test-hg-hg-git.sh |    4 +++-\n 2 files changed, 7 insertions(+), 2 deletions(-)\n\ndiff --git a/contrib/remote-helpers/test-hg-bidi.sh b/contrib/remote-helpers/test-hg-bidi.sh\nindex 1d61982..84b9228 100755\n--- a/contrib/remote-helpers/test-hg-bidi.sh\n+++ b/contrib/remote-helpers/test-hg-bidi.sh\n@@ -50,7 +50,8 @@ hg_push () {\n }\n\n hg_log () {\n-\thg -R $1 log --graph --debug | grep -v 'tag: *default/'\n+\thg -R $1 log --graph --debug >log &&\n+\tgrep -v 'tag: *default/' log\n }\n\n setup () {\n@@ -62,6 +63,8 @@ setup () {\n \techo \"commit = -d \\\"0 0\\\"\"\n \techo \"debugrawcommit = -d \\\"0 0\\\"\"\n \techo \"tag = -d \\\"0 0\\\"\"\n+\techo \"[extensions]\"\n+\techo \"graphlog =\"\n \t) >> \"$HOME\"/.hgrc &&\n \tgit config --global remote-hg.hg-git-compat true\n\ndiff --git a/contrib/remote-helpers/test-hg-hg-git.sh b/contrib/remote-helpers/test-hg-hg-git.sh\nindex 7e3967f..17a074e 100755\n--- a/contrib/remote-helpers/test-hg-hg-git.sh\n+++ b/contrib/remote-helpers/test-hg-hg-git.sh\n@@ -78,7 +78,8 @@ hg_push_hg () {\n }\n\n hg_log () {\n-\thg -R $1 log --graph --debug | grep -v 'tag: *default/'\n+\thg -R $1 log --graph --debug >log &&\n+\tgrep -v 'tag: *default/' log\n }\n\n git_log () {\n@@ -97,6 +98,7 @@ setup () {\n \techo \"[extensions]\"\n \techo \"hgext.bookmarks =\"\n \techo \"hggit =\"\n+\techo \"graphlog =\"\n \t) >> \"$HOME\"/.hgrc &&\n \tgit config --global receive.denycurrentbranch warn\n \tgit config --global remote-hg.hg-git-compat true\n--\n1.7.9.5\n"},{"id":"213368","messageId":"CAPig+cShUBxRWhb+DOQjACm1wfRT+MBR712shkKveo1Rx9beDg@mail.gmail.com","threadId":"33401","inReplyTo":"1365267052-2604-1-git-send-email-apelisse@gmail.com","subject":"Re: [PATCH] remote-hg: activate graplog extension for hg_log()","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2013-04-07T01:25:15Z","receivedAt":"2013-04-07T01:25:15Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Sat, Apr 6, 2013 at 12:50 PM, Antoine Pelisse <apelisse@gmail.com> wrote:\n> remote-hg: activate graplog extension for hg_log()\n\ns/graplog/graphlog/\n\n> The hg_log() test helper uses the \"--graph\" parameter that is\n> implemented by the GraphLog extension. If the extension is not activated\n> by the user, the parameter is not available. Activate the extension in\n> setup().\n>\n> Also changes the way we grep the output in hg_log(). The pipe operator\n> can hide the return code of hg command. As a matter of fact, if log\n> fails because it doesn't know about \"--graph\", it doesn't report any\n> failure and let's you think everything worked.\n>\n> Signed-off-by: Antoine Pelisse <apelisse@gmail.com>\n"}]}