Mercurial > jhg
comparison src/org/tmatesoft/hg/repo/HgRepository.java @ 484:ae4d6604debd
Bookmarks support added
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Wed, 08 Aug 2012 14:41:44 +0200 |
parents | e31e85cf4d4c |
children | d740edfff563 |
comparison
equal
deleted
inserted
replaced
483:e31e85cf4d4c | 484:ae4d6604debd |
---|---|
109 private HgManifest manifest; | 109 private HgManifest manifest; |
110 private HgTags tags; | 110 private HgTags tags; |
111 private HgBranches branches; | 111 private HgBranches branches; |
112 private HgMergeState mergeState; | 112 private HgMergeState mergeState; |
113 private SubrepoManager subRepos; | 113 private SubrepoManager subRepos; |
114 private HgBookmarks bookmarks; | |
114 | 115 |
115 // XXX perhaps, shall enable caching explicitly | 116 // XXX perhaps, shall enable caching explicitly |
116 private final HashMap<Path, SoftReference<RevlogStream>> streamsCache = new HashMap<Path, SoftReference<RevlogStream>>(); | 117 private final HashMap<Path, SoftReference<RevlogStream>> streamsCache = new HashMap<Path, SoftReference<RevlogStream>>(); |
117 | 118 |
118 private final org.tmatesoft.hg.internal.Internals impl; | 119 private final org.tmatesoft.hg.internal.Internals impl; |
231 } | 232 } |
232 return tags; | 233 return tags; |
233 } | 234 } |
234 | 235 |
235 /** | 236 /** |
237 * Access branch information | |
238 * @return branch manager instance, never <code>null</code> | |
236 * @throws HgRuntimeException subclass thereof to indicate issues with the library. <em>Runtime exception</em> | 239 * @throws HgRuntimeException subclass thereof to indicate issues with the library. <em>Runtime exception</em> |
237 */ | 240 */ |
238 public HgBranches getBranches() throws HgInvalidControlFileException { | 241 public HgBranches getBranches() throws HgInvalidControlFileException { |
239 if (branches == null) { | 242 if (branches == null) { |
240 branches = new HgBranches(this); | 243 branches = new HgBranches(this); |
241 branches.collect(ProgressSupport.Factory.get(null)); | 244 branches.collect(ProgressSupport.Factory.get(null)); |
242 } | 245 } |
243 return branches; | 246 return branches; |
244 } | 247 } |
245 | 248 |
249 /** | |
250 * Access state of the recent merge | |
251 * @return merge state facility, never <code>null</code> | |
252 */ | |
246 public HgMergeState getMergeState() { | 253 public HgMergeState getMergeState() { |
247 if (mergeState == null) { | 254 if (mergeState == null) { |
248 mergeState = new HgMergeState(this); | 255 mergeState = new HgMergeState(this); |
249 } | 256 } |
250 return mergeState; | 257 return mergeState; |
411 getContext().getLog().dump(getClass(), Warn, "Failed to close %s after read", lastMessage); | 418 getContext().getLog().dump(getClass(), Warn, "Failed to close %s after read", lastMessage); |
412 } | 419 } |
413 } | 420 } |
414 } | 421 } |
415 } | 422 } |
423 | |
424 /** | |
425 * Access bookmarks-related functionality | |
426 * @return facility to manage bookmarks, never <code>null</code> | |
427 * @throws HgRuntimeException subclass thereof to indicate issues with the library. <em>Runtime exception</em> | |
428 */ | |
429 public HgBookmarks getBookmarks() throws HgInvalidControlFileException { | |
430 if (bookmarks == null) { | |
431 bookmarks = new HgBookmarks(this); | |
432 bookmarks.read(); | |
433 } | |
434 return bookmarks; | |
435 } | |
416 | 436 |
417 /*package-local*/ DataAccessProvider getDataAccess() { | 437 /*package-local*/ DataAccessProvider getDataAccess() { |
418 return dataAccess; | 438 return dataAccess; |
419 } | 439 } |
420 | 440 |