comparison src/org/tmatesoft/hg/core/HgStatus.java @ 154:ba2bf656f00f

Changeset => RawChangeset
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Thu, 24 Feb 2011 22:16:19 +0100
parents b9700740553a
children f052f40839ec
comparison
equal deleted inserted replaced
153:ab7ea2ac21cb 154:ba2bf656f00f
17 package org.tmatesoft.hg.core; 17 package org.tmatesoft.hg.core;
18 18
19 import java.util.Date; 19 import java.util.Date;
20 20
21 import org.tmatesoft.hg.internal.ChangelogHelper; 21 import org.tmatesoft.hg.internal.ChangelogHelper;
22 import org.tmatesoft.hg.repo.HgChangelog.Changeset; 22 import org.tmatesoft.hg.repo.HgChangelog.RawChangeset;
23 import org.tmatesoft.hg.util.Path; 23 import org.tmatesoft.hg.util.Path;
24 24
25 /** 25 /**
26 * Repository file status and extra handy information. 26 * Repository file status and extra handy information.
27 * 27 *
69 69
70 /** 70 /**
71 * @return <code>null</code> if author for the change can't be deduced (e.g. for clean files it's senseless) 71 * @return <code>null</code> if author for the change can't be deduced (e.g. for clean files it's senseless)
72 */ 72 */
73 public String getModificationAuthor() { 73 public String getModificationAuthor() {
74 Changeset cset = logHelper.findLatestChangeWith(path); 74 RawChangeset cset = logHelper.findLatestChangeWith(path);
75 if (cset == null) { 75 if (cset == null) {
76 if (kind == Kind.Modified || kind == Kind.Added || kind == Kind.Removed /*&& RightBoundary is TIP*/) { 76 if (kind == Kind.Modified || kind == Kind.Added || kind == Kind.Removed /*&& RightBoundary is TIP*/) {
77 // perhaps, also for Kind.Missing? 77 // perhaps, also for Kind.Missing?
78 return logHelper.getNextCommitUsername(); 78 return logHelper.getNextCommitUsername();
79 } 79 }
82 } 82 }
83 return null; 83 return null;
84 } 84 }
85 85
86 public Date getModificationDate() { 86 public Date getModificationDate() {
87 Changeset cset = logHelper.findLatestChangeWith(path); 87 RawChangeset cset = logHelper.findLatestChangeWith(path);
88 if (cset == null) { 88 if (cset == null) {
89 // FIXME check dirstate and/or local file for tstamp 89 // FIXME check dirstate and/or local file for tstamp
90 return new Date(); // what's correct 90 return new Date(); // what's correct
91 } else { 91 } else {
92 return cset.date(); 92 return cset.date();