git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] remote-helpers: remove --graph in hg_log()

From
Antoine Pelisse <apelisse@gmail.com>
Date
Apr 6, 2013, 16:00 UTC
Message-ID
<1365264055-30507-1-git-send-email-apelisse@gmail.com>

The hg_log() test helper uses the "--graph" parameter that is implemented by the GraphLog extension. If the extension is not activated by the user, the parameter is not available. Do not use the option that is unnecessary.

Also changes the way we grep the output in hg_log(). The pipe operator can hide the return code of hg command. As a matter of fact, if log fails because it doesn't know about "--graph", it doesn't report any failure and let's you think everything worked.

Signed-off-by: Antoine Pelisse <apelisse@gmail.com>
---
Hey Felipe,
I'm not so confident that --graph is useless to the test. If it's really
necessary, it would be nice either to activate it in setup() or to use
it just for the command through: "--config extensions.graphlog=".
Cheers,
 contrib/remote-helpers/test-hg-bidi.sh |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/contrib/remote-helpers/test-hg-bidi.sh b/contrib/remote-helpers/test-hg-bidi.sh
index 1d61982..96cd5a7 100755
--- a/contrib/remote-helpers/test-hg-bidi.sh
+++ b/contrib/remote-helpers/test-hg-bidi.sh
@@ -50,7 +50,8 @@ hg_push () {
 }

 hg_log () {
-	hg -R $1 log --graph --debug | grep -v 'tag: *default/'
+	hg -R $1 log --debug >log &&
+	grep -v 'tag: *default/' log
 }

 setup () {
--
1.7.9.5
Next: Felipe Contreras
Message 1 of 6 in “remote-helpers: remove --graph in hg_log()”
  1. remote-helpers: remove --graph in hg_log()Antoine Pelisse, Apr 6, 2013
  2. Felipe ContrerasApr 6, 2013
  3. Antoine PelisseApr 6, 2013
  4. Felipe ContrerasApr 6, 2013
  5. remote-hg: activate graplog extension for hg_log()Antoine Pelisse, Apr 6, 2013
  6. Eric SunshineApr 7, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.