Mercurial > hg4j
comparison src/org/tmatesoft/hg/repo/HgTags.java @ 354:5f9073eabf06
Propagate errors with exceptions up to a end client
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Thu, 01 Dec 2011 05:21:40 +0100 |
parents | 168f1994de7e |
children | 2fadf8695f8a |
comparison
equal
deleted
inserted
replaced
353:0f3687e79f5a | 354:5f9073eabf06 |
---|---|
27 import java.util.LinkedList; | 27 import java.util.LinkedList; |
28 import java.util.List; | 28 import java.util.List; |
29 import java.util.Map; | 29 import java.util.Map; |
30 import java.util.TreeMap; | 30 import java.util.TreeMap; |
31 | 31 |
32 import org.tmatesoft.hg.core.HgInvalidControlFileException; | |
32 import org.tmatesoft.hg.core.Nodeid; | 33 import org.tmatesoft.hg.core.Nodeid; |
33 | 34 |
34 /** | 35 /** |
35 * @see http://mercurial.selenic.com/wiki/TagDesign | 36 * @see http://mercurial.selenic.com/wiki/TagDesign |
36 * | 37 * |
236 | 237 |
237 public boolean isLocal() { | 238 public boolean isLocal() { |
238 return localFromName.containsKey(name); | 239 return localFromName.containsKey(name); |
239 } | 240 } |
240 | 241 |
241 public String branch() { | 242 public String branch() throws HgInvalidControlFileException { |
242 if (branch == null) { | 243 if (branch == null) { |
243 int x = repo.getChangelog().getLocalRevision(revision()); | 244 int x = repo.getChangelog().getLocalRevision(revision()); |
244 branch = repo.getChangelog().range(x, x).get(0).branch(); | 245 branch = repo.getChangelog().range(x, x).get(0).branch(); |
245 } | 246 } |
246 return branch; | 247 return branch; |