IDEA-27603 (Indicate which branch is being worked on)
[fedora-idea.git] / platform / vcs-impl / src / com / intellij / openapi / vcs / changes / SimpleContentRevision.java
blobca2f0079547f1c580b66ab8bfd392cff34508bf2
1 /*
2 * Copyright (c) 2007, Your Corporation. All Rights Reserved.
3 */
5 package com.intellij.openapi.vcs.changes;
7 import com.intellij.openapi.vcs.FilePath;
8 import com.intellij.openapi.vcs.VcsException;
9 import com.intellij.openapi.vcs.history.VcsRevisionNumber;
10 import org.jetbrains.annotations.NotNull;
11 import org.jetbrains.annotations.Nullable;
13 /**
14 * @author yole
16 public class SimpleContentRevision implements ContentRevision {
17 private final String myContent;
18 private final FilePath myNewFilePath;
19 private final String myRevision;
21 public SimpleContentRevision(final String content, final FilePath newFilePath, final String revision) {
22 myContent = content;
23 myNewFilePath = newFilePath;
24 myRevision = revision;
27 @Nullable
28 public String getContent() throws VcsException {
29 return myContent;
32 @NotNull
33 public FilePath getFile() {
34 return myNewFilePath;
37 @NotNull
38 public VcsRevisionNumber getRevisionNumber() {
39 return new VcsRevisionNumber() {
40 public String asString() {
41 return myRevision;
44 public int compareTo(final VcsRevisionNumber o) {
45 return 0;