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

[PATCH 5/5] Use the 'die' function where it is appropriate.

From
Fredrik Kuivinen <freku045@student.liu.se>
Date
Sep 13, 2005, 21:41 UTC
Message-ID
<20050913214139.GF10953@c165.ib.student.liu.se>
In-Reply-To
<20050913213730.GA10953@c165.ib.student.liu.se>
Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se>
---
 gitMergeCommon.py |   27 +++++++++++++--------------
 1 files changed, 13 insertions(+), 14 deletions(-)
bd535d629be12d94648a40c2feb89cf14482f772
diff --git a/gitMergeCommon.py b/gitMergeCommon.py
--- a/gitMergeCommon.py
+++ b/gitMergeCommon.py
@@ -1,19 +1,24 @@
 import sys, re, os, traceback
 from sets import Set
 
+def die(*args):
+    printList(args, sys.stderr)
+    sys.exit(2)
+
+def printList(list, file=sys.stdout):
+    for x in list:
+        file.write(str(x))
+        file.write(' ')
+    file.write('\n')
+
 if sys.version_info[0] < 2 or \
        (sys.version_info[0] == 2 and sys.version_info[1] < 4):
-    print 'Python version 2.4 required, found', \
-          str(sys.version_info[0])+'.'+str(sys.version_info[1])+'.'+ \
-          str(sys.version_info[2])
-    sys.exit(1)
+    die('Python version 2.4 required, found', \
+        str(sys.version_info[0])+'.'+str(sys.version_info[1])+'.'+ \
+        str(sys.version_info[2]))
 
 import subprocess
 
-def die(*args):
-    printList(args, sys.stderr)
-    sys.exit(2)
-
 # Debugging machinery
 # -------------------
 
@@ -32,12 +37,6 @@ def debug(*args):
         if funcName in functionsToDebug:
             printList(args)
 
-def printList(list, file=sys.stdout):
-    for x in list:
-        file.write(str(x))
-        file.write(' ')
-    file.write('\n')
-
 # Program execution
 # -----------------
 
Previous: Fredrik Kuivinen
Message 6 of 6 in “More recursive merge updates”
  1. 0/5 More recursive merge updatesFredrik Kuivinen, Sep 13, 2005
  2. 1/5 Be more like the 'resolve' strategy.Fredrik Kuivinen, Sep 13, 2005
  3. 2/5 Don't output 'Automatic merge failed, ...'Fredrik Kuivinen, Sep 13, 2005
  4. 3/5 Adjust git-merge-recursive.py for the new tool names.Fredrik Kuivinen, Sep 13, 2005
  5. 4/5 Use a temporary index file when we merge the common ancestors.Fredrik Kuivinen, Sep 13, 2005
  6. 5/5 Use the 'die' function where it is appropriate.Fredrik Kuivinen, Sep 13, 2005

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.