Changeset 4259 in josm for trunk/src/org
- Timestamp:
- 2011-07-20T16:04:43+02:00 (14 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/Version.java
r4237 r4259 66 66 67 67 private int version; 68 private String re vision;68 private String releaseDescription; 69 69 private String time; 70 70 private boolean isLocalBuild; … … 96 96 protected void initFromRevisionInfo(String revisionInfo) { 97 97 if (revisionInfo == null) { 98 this.re vision = tr("UNKNOWN");98 this.releaseDescription = tr("UNKNOWN"); 99 99 this.version = JOSM_UNKNOWN_VERSION; 100 100 this.time = null; … … 137 137 sb.append(property.getKey()).append(":").append(property.getValue()).append("\n"); 138 138 } 139 re vision = sb.toString();139 releaseDescription = sb.toString(); 140 140 } 141 141 … … 145 145 System.err.println(tr("Warning: the revision file ''/REVISION'' is missing.")); 146 146 version = 0; 147 re vision = "";147 releaseDescription = ""; 148 148 return; 149 149 } 150 150 initFromRevisionInfo(loadResourceFile(u)); 151 System.out.println(revision);152 151 } 153 152 … … 168 167 */ 169 168 public String getReleaseAttributes() { 170 return re vision;169 return releaseDescription; 171 170 } 172 171 -
trunk/src/org/openstreetmap/josm/gui/MainApplication.java
r4249 r4259 29 29 import org.openstreetmap.josm.data.AutosaveTask; 30 30 import org.openstreetmap.josm.data.Preferences; 31 import org.openstreetmap.josm.data.Version; 31 32 import org.openstreetmap.josm.gui.preferences.server.OAuthAccessTokenHolder; 32 33 import org.openstreetmap.josm.gui.progress.ProgressMonitor; … … 122 123 if ("-h".equals(arg) || "-?".equals(arg)) { 123 124 arg = "--help"; 125 } else if ("-v".equals(arg)) { 126 arg = "--version"; 124 127 } 125 128 // handle simple arguments like file names, URLs, bounds … … 172 175 // initialize the platform hook, and 173 176 Main.determinePlatformHook(); 174 // call the really early hook before we anything else 177 // call the really early hook before we do anything else 175 178 Main.platform.preStartupHook(); 176 179 177 180 // construct argument table 178 181 final Map<String, Collection<String>> args = buildCommandLineArgumentMap(argArray); 182 183 if (args.containsKey("version")) { 184 System.out.println(Version.getInstance().getAgentString()); 185 System.exit(0); 186 } else { 187 System.out.println(Version.getInstance().getReleaseAttributes()); 188 } 179 189 180 190 Main.pref.init(args.containsKey("reset-preferences"));
Note:
See TracChangeset
for help on using the changeset viewer.