Mercurial > jhg
comparison src/org/tmatesoft/hg/internal/CommitFacility.java @ 610:5c68567b3645
Refresh tags, branches, bookmarks and ignore when their files (or csets in the repo) are changed
| author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
|---|---|
| date | Thu, 09 May 2013 21:06:48 +0200 |
| parents | 66f1cc23b906 |
| children | dca70c0b1f74 |
comparison
equal
deleted
inserted
replaced
| 609:e4a71afd3c71 | 610:5c68567b3645 |
|---|---|
| 190 } | 190 } |
| 191 try { | 191 try { |
| 192 fncache.write(); | 192 fncache.write(); |
| 193 } catch (IOException ex) { | 193 } catch (IOException ex) { |
| 194 // see comment above for fnchache.read() | 194 // see comment above for fnchache.read() |
| 195 repo.getSessionContext().getLog().dump(getClass(), Severity.Error, ex, "Failed to write fncache, error ignored"); | 195 repo.getLog().dump(getClass(), Severity.Error, ex, "Failed to write fncache, error ignored"); |
| 196 } | 196 } |
| 197 } | 197 } |
| 198 // bring dirstate up to commit state | 198 // bring dirstate up to commit state |
| 199 final DirstateBuilder dirstateBuilder = new DirstateBuilder(repo); | 199 final DirstateBuilder dirstateBuilder = new DirstateBuilder(repo); |
| 200 dirstateBuilder.fillFrom(new DirstateReader(repo, new Path.SimpleSource())); | 200 dirstateBuilder.fillFrom(new DirstateReader(repo, new Path.SimpleSource())); |
| 208 dirstateBuilder.serialize(); | 208 dirstateBuilder.serialize(); |
| 209 // update bookmarks | 209 // update bookmarks |
| 210 if (p1Commit != NO_REVISION || p2Commit != NO_REVISION) { | 210 if (p1Commit != NO_REVISION || p2Commit != NO_REVISION) { |
| 211 repo.getRepo().getBookmarks().updateActive(p1Cset, p2Cset, changesetRev); | 211 repo.getRepo().getBookmarks().updateActive(p1Cset, p2Cset, changesetRev); |
| 212 } | 212 } |
| 213 // TODO Revisit: might be reasonable to send out a "Repo changed" notification, to clear | |
| 214 // e.g. cached branch, tags and so on, not to rely on file change detection methods? | |
| 215 // The same notificaion might come useful once Pull is implemented | |
| 213 return changesetRev; | 216 return changesetRev; |
| 214 } | 217 } |
| 215 /* | 218 /* |
| 216 private Pair<Integer, Integer> getManifestParents() { | 219 private Pair<Integer, Integer> getManifestParents() { |
| 217 return new Pair<Integer, Integer>(extractManifestRevisionIndex(p1Commit), extractManifestRevisionIndex(p2Commit)); | 220 return new Pair<Integer, Integer>(extractManifestRevisionIndex(p1Commit), extractManifestRevisionIndex(p2Commit)); |
