# This patch file was generated by NetBeans IDE # This patch can be applied using context Tools: Apply Diff Patch action on respective folder. # It uses platform neutral UTF-8 encoding. # Above lines and this line are ignored by the patching process. Index: versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/annotate/AnnotateAction.java --- versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/annotate/AnnotateAction.java Base (1.6) +++ versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/annotate/AnnotateAction.java Locally Modified (Based On 1.6) @@ -168,7 +168,7 @@ AnnotateLine [] lines = toAnnotateLines(list); ab.annotationLines(file, Arrays.asList(lines)); try { - list = HgCommand.doLog(repository, file); + list = HgCommand.doLogShort(repository, file); } catch (HgException ex) { NotifyDescriptor.Exception e = new NotifyDescriptor.Exception(ex); DialogDisplayer.getDefault().notifyLater(e); Index: versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/log/LogAction.java --- versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/log/LogAction.java Base (1.9) +++ versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/log/LogAction.java Locally Modified (Based On 1.9) Index: versioncontrol/mercurial/src/org/netbeans/modules/mercurial/util/HgCommand.java --- versioncontrol/mercurial/src/org/netbeans/modules/mercurial/util/HgCommand.java Base (1.59) +++ versioncontrol/mercurial/src/org/netbeans/modules/mercurial/util/HgCommand.java Locally Modified (Based On 1.59) @@ -120,7 +120,8 @@ private static final String HG_LOG_CMD = "log"; // NOI18N private static final String HG_LOG_LIMIT_CMD = "-l 1"; // NOI18N - private static final String HG_LOG_TEMPLATE_CMD = "--template={rev}\\n{desc}\\n{date|hgdate}\\n{node|short}\\n"; // NOI18N + private static final String HG_LOG_TEMPLATE_SHORT_CMD = "--template={rev}\\n{desc|firstline}\\n{date|hgdate}\\n{node|short}\\n"; // NOI18N + private static final String HG_LOG_TEMPLATE_LONG_CMD = "--template={rev}\\n{desc}\\n{date|hgdate}\\n{node|short}\\n"; // NOI18N private static final String HG_CSET_TEMPLATE_CMD = "--template={rev}:{node|short}\\n"; // NOI18N private static final String HG_REV_TEMPLATE_CMD = "--template={rev}\\n"; // NOI18N private static final String HG_CSET_TARGET_TEMPLATE_CMD = "--template={rev} ({node|short})\\n"; // NOI18N @@ -666,14 +667,37 @@ } /** - * Retrives the log information for the specified file. + * Retrives the log information with just first line of commit message for the specified file. * * @param File repository of the mercurial repository's root directory * @param File of file which revision history is to be retrieved. * @return List list of the log entries for the specified file. * @throws org.netbeans.modules.mercurial.HgException */ - public static List doLog(File repository, File file) throws HgException { + public static List doLogShort(File repository, File file) throws HgException { + return doLog(repository, file, HG_LOG_TEMPLATE_SHORT_CMD); + } + + /** + * Retrives the log information with the full commit message for the specified file. + * + * @param File repository of the mercurial repository's root directory + * @param File of file which revision history is to be retrieved. + * @return List list of the log entries for the specified file. + * @throws org.netbeans.modules.mercurial.HgException + */ + public static List doLogLong(File repository, File file) throws HgException { + return doLog(repository, file, HG_LOG_TEMPLATE_LONG_CMD); + } + /** + * Retrives the log information for the specified file, as defined by the LOG_TEMPLATE. + * + * @param File repository of the mercurial repository's root directory + * @param File of file which revision history is to be retrieved. + * @return List list of the log entries for the specified file. + * @throws org.netbeans.modules.mercurial.HgException + */ + public static List doLog(File repository, File file, String LOG_TEMPLATE) throws HgException { if (repository == null ) return null; List command = new ArrayList(); @@ -685,7 +709,7 @@ } command.add(HG_OPT_REPOSITORY); command.add(repository.getAbsolutePath()); - command.add(HG_LOG_TEMPLATE_CMD); + command.add(LOG_TEMPLATE); command.add(file.getAbsolutePath()); List list = exec(command);