X-Git-Url: https://git.jetbrains.org/?p=idea%2Fcommunity.git;a=blobdiff_plain;f=plugins%2Fsvn4idea%2Fsrc%2Forg%2Fjetbrains%2Fidea%2Fsvn%2Fhistory%2FSvnChangeList.java;h=0be7f65cb1f5ae3c473b288b9dce6c131122920b;hp=f98d4de249fa17d95bdadacc938a97f7b055860f;hb=56bae58032596f51a2880bd57b7ab8d3b46fcb2b;hpb=c3ba20788999cee34ebaeb9cc1a144886c711993 diff --git a/plugins/svn4idea/src/org/jetbrains/idea/svn/history/SvnChangeList.java b/plugins/svn4idea/src/org/jetbrains/idea/svn/history/SvnChangeList.java index f98d4de249fa..0be7f65cb1f5 100644 --- a/plugins/svn4idea/src/org/jetbrains/idea/svn/history/SvnChangeList.java +++ b/plugins/svn4idea/src/org/jetbrains/idea/svn/history/SvnChangeList.java @@ -29,7 +29,9 @@ import com.intellij.openapi.vcs.AbstractVcs; import com.intellij.openapi.vcs.FilePath; import com.intellij.openapi.vcs.VcsException; import com.intellij.openapi.vcs.changes.*; +import com.intellij.openapi.vcs.history.VcsRevisionNumber; import com.intellij.openapi.vcs.versionBrowser.CommittedChangeList; +import com.intellij.openapi.vcs.versionBrowser.VcsRevisionNumberAware; import com.intellij.openapi.vfs.VirtualFile; import com.intellij.util.ConstantFunction; import com.intellij.util.NotNullFunction; @@ -56,13 +58,14 @@ import java.io.File; import java.io.IOException; import java.util.*; -public class SvnChangeList implements CommittedChangeList { +public class SvnChangeList implements CommittedChangeList, VcsRevisionNumberAware { private static final Logger LOG = Logger.getInstance("#org.jetbrains.idea.svn.history"); private final SvnVcs myVcs; private final SvnRepositoryLocation myLocation; private String myRepositoryRoot; private long myRevision; + private VcsRevisionNumber myRevisionNumber; private String myAuthor; private Date myDate; private String myMessage; @@ -88,7 +91,7 @@ public class SvnChangeList implements CommittedChangeList { final SvnChangeList sample = (SvnChangeList) lists.get(0); myVcs = sample.myVcs; myLocation = location; - myRevision = sample.myRevision; + setRevision(sample.myRevision); myAuthor = sample.myAuthor; myDate = sample.myDate; myMessage = sample.myMessage; @@ -108,7 +111,7 @@ public class SvnChangeList implements CommittedChangeList { public SvnChangeList(SvnVcs vcs, @NotNull final SvnRepositoryLocation location, final LogEntry logEntry, String repositoryRoot) { myVcs = vcs; myLocation = location; - myRevision = logEntry.getRevision(); + setRevision(logEntry.getRevision()); myAuthor = StringUtil.notNullize(logEntry.getAuthor()); myDate = logEntry.getDate(); myMessage = StringUtil.notNullize(logEntry.getMessage()); @@ -171,6 +174,16 @@ public class SvnChangeList implements CommittedChangeList { return myDate; } + @Nullable + @Override + public VcsRevisionNumber getRevisionNumber() { + return myRevisionNumber; + } + + private void setRevision(long revision) { + myRevision = revision; + myRevisionNumber = new SvnRevisionNumber(SVNRevision.create(revision)); + } public Collection getChanges() { if (myListsHolder == null) { @@ -658,7 +671,7 @@ public class SvnChangeList implements CommittedChangeList { private void readFromStream(@NotNull DataInput stream, final boolean supportsCopyFromInfo, final boolean supportsReplaced) throws IOException { myRepositoryRoot = stream.readUTF(); - myRevision = stream.readLong(); + setRevision(stream.readLong()); myAuthor = stream.readUTF(); myDate = new Date(stream.readLong()); myMessage = stream.readUTF();