Lines 120-126
public final class Setup {
Link Here
|
120 |
private final String firstRevision; |
120 |
private final String firstRevision; |
121 |
private final String secondRevision; |
121 |
private final String secondRevision; |
122 |
private FileInformation info; |
122 |
private FileInformation info; |
123 |
private String changeSetId; |
|
|
124 |
|
123 |
|
125 |
private DiffStreamSource firstSource; |
124 |
private DiffStreamSource firstSource; |
126 |
private DiffStreamSource secondSource; |
125 |
private DiffStreamSource secondSource; |
Lines 140-156
public final class Setup {
Link Here
|
140 |
String firstTitle; |
139 |
String firstTitle; |
141 |
String secondTitle; |
140 |
String secondTitle; |
142 |
|
141 |
|
143 |
try { |
|
|
144 |
File repository = HgUtils.getRootFile(HgUtils.getCurrentContext(null)); |
145 |
changeSetId = HgCommand.getLastChangeSetId(repository, baseFile); |
146 |
if (changeSetId == null) { |
147 |
changeSetId = org.openide.util.NbBundle.getMessage(org.netbeans.modules.mercurial.ui.diff.Setup.class, "CTL_Setup_NotCommitted"); // NOI18N |
148 |
} |
149 |
} catch (HgException ex) { |
150 |
NotifyDescriptor.Exception e = new NotifyDescriptor.Exception(ex); |
151 |
DialogDisplayer.getDefault().notifyLater(e); |
152 |
} |
153 |
|
154 |
// the first source |
142 |
// the first source |
155 |
|
143 |
|
156 |
switch (type) { |
144 |
switch (type) { |
Lines 169-178
public final class Setup {
Link Here
|
169 |
} else if (match(status, FileInformation.STATUS_VERSIONED_DELETEDLOCALLY |
157 |
} else if (match(status, FileInformation.STATUS_VERSIONED_DELETEDLOCALLY |
170 |
| FileInformation.STATUS_VERSIONED_REMOVEDLOCALLY)) { |
158 |
| FileInformation.STATUS_VERSIONED_REMOVEDLOCALLY)) { |
171 |
firstRevision = REVISION_BASE; |
159 |
firstRevision = REVISION_BASE; |
172 |
firstTitle = MessageFormat.format(loc.getString("MSG_DiffPanel_BaseRevision"), new Object [] { changeSetId }); // NOI18N |
160 |
firstTitle = MessageFormat.format(loc.getString("MSG_DiffPanel_BaseRevision"), new Object [] { firstRevision }); // NOI18N |
173 |
} else { |
161 |
} else { |
174 |
firstRevision = REVISION_BASE; |
162 |
firstRevision = REVISION_BASE; |
175 |
firstTitle = MessageFormat.format(loc.getString("MSG_DiffPanel_BaseRevision"), new Object [] { changeSetId }); // NOI18N |
163 |
firstTitle = MessageFormat.format(loc.getString("MSG_DiffPanel_BaseRevision"), new Object [] { firstRevision }); // NOI18N |
176 |
} |
164 |
} |
177 |
|
165 |
|
178 |
break; |
166 |
break; |
Lines 191-197
public final class Setup {
Link Here
|
191 |
|
179 |
|
192 |
if (match(status, FileInformation.STATUS_VERSIONED_CONFLICT)) { |
180 |
if (match(status, FileInformation.STATUS_VERSIONED_CONFLICT)) { |
193 |
secondRevision = REVISION_CURRENT; |
181 |
secondRevision = REVISION_CURRENT; |
194 |
secondTitle = MessageFormat.format(loc.getString("MSG_DiffPanel_LocalConflict"), new Object [] { changeSetId }); // NOI18N |
182 |
secondTitle = MessageFormat.format(loc.getString("MSG_DiffPanel_LocalConflict"), new Object [] { secondRevision }); // NOI18N |
195 |
} else if (match(status, FileInformation.STATUS_NOTVERSIONED_NEWLOCALLY |
183 |
} else if (match(status, FileInformation.STATUS_NOTVERSIONED_NEWLOCALLY |
196 |
| FileInformation.STATUS_VERSIONED_ADDEDLOCALLY)) { |
184 |
| FileInformation.STATUS_VERSIONED_ADDEDLOCALLY)) { |
197 |
secondRevision = REVISION_CURRENT; |
185 |
secondRevision = REVISION_CURRENT; |
Lines 205-211
public final class Setup {
Link Here
|
205 |
secondTitle = loc.getString("MSG_DiffPanel_LocalDeleted"); // NOI18N |
193 |
secondTitle = loc.getString("MSG_DiffPanel_LocalDeleted"); // NOI18N |
206 |
} else { |
194 |
} else { |
207 |
secondRevision = REVISION_CURRENT; |
195 |
secondRevision = REVISION_CURRENT; |
208 |
secondTitle = MessageFormat.format(loc.getString("MSG_DiffPanel_LocalModified"), new Object [] { changeSetId }); // NOI18N |
196 |
secondTitle = MessageFormat.format(loc.getString("MSG_DiffPanel_LocalModified"), new Object [] { secondRevision }); // NOI18N |
209 |
} |
197 |
} |
210 |
break; |
198 |
break; |
211 |
|
199 |
|