private static String createMessage(final File[] args, final GlobalOptions gopt) {
        File temp = null;
        BufferedReader reader = null;
        try {
            temp = createTempFile(args, gopt.getTempDir());
            // we now have a temp file with the appropriate text in it. Just
            // get the appropriate process to edit it.
            // TODO maybe make this more sophisticated, e.g. the cvs.editor
            // property allows certain fields to specify arguments, where the
            // actual filename goes etc.
            final String editorProcess = getEditorProcess(gopt.getEditor());
            if (editorProcess == null) {
                return null;
            }
            final Process proc = Runtime.getRuntime().exec(new String[] { editorProcess, temp.getPath() });
            int returnCode = -1;

            try {
                returnCode = proc.waitFor();
            } catch (final InterruptedException e) {
                // So somebody else interrupted us.
            }

            if (returnCode != 0) {
                return null;
            } else {
                // TODO: need to add the bit that tests whether the file
                // has been changed so that we can bring up the abort etc.
                // message just like real CVS.
                reader = new BufferedReader(new FileReader(temp));
                String line;
                final StringBuffer message = new StringBuffer((int) temp.length());
                while ((line = reader.readLine()) != null) {
                    if (!line.startsWith("CVS:")) {
                        message.append(line);
                        message.append('\n');
                    }
                }
                return message.toString();
            }
        } catch (final IOException e) {
            // OK something went wrong so just don't bother returning a
            // message
            System.err.println("Error: " + e);
            e.printStackTrace();
            return null;
        } finally {
            try {
                if (reader != null) {
                    reader.close();
                }
                if (temp != null) {
                    temp.delete();
                }
            } catch (final Exception e) {
                // we're clearly in real trouble so just dump the
                // exception to standard err and get out of here
                System.err.println("Fatal error: " + e);
                e.printStackTrace();
            }
        }
    }