mercurialeclipse / file revision
summary |
shortlog |
changelog |
tags | edit |
manifest |
changeset |
file |
revisions |
annotate |
diff |
raw
src/com/vectrace/MercurialEclipse/commands/HgCatClient.java
| author | Jerome Negre <jerome+hg@jnegre.org> |
| Mon Mar 17 21:36:52 2008 +0100 (8 months ago) | |
| changeset 159 | 0babd2b8861c |
| parent 156 | ab0f04ca876e |
| permissions | -rw-r--r-- |
Rewrote "Show Annotation" using Hg*client
1 package com.vectrace.MercurialEclipse.commands;
2
3 import org.eclipse.core.resources.IFile;
4
5 import com.vectrace.MercurialEclipse.exception.HgException;
6
7 public class HgCatClient {
8
9 public static String getContent(IFile file, String revision) throws HgException {
10 HgCommand command = new HgCommand("cat", file.getParent(), true);
11 if(revision != null && revision.length() != 0) {
12 command.addOptions(
13 "--rev",
14 revision);
15 }
16 command.addFiles(file.getName());
17 return command.executeToString();
18 }
19 }
