Mercurial > jhg
comparison src/org/tmatesoft/hg/internal/CommitFacility.java @ 607:66f1cc23b906
Refresh revlogs if a change to a file has been detected; do not force reload of the whole repository
| author | Artem Tikhomirov <tikhomirov.artem@gmail.com> | 
|---|---|
| date | Tue, 07 May 2013 16:52:46 +0200 | 
| parents | c56edf42be64 | 
| children | 5c68567b3645 | 
   comparison
  equal
  deleted
  inserted
  replaced
| 606:5daa42067e7c | 607:66f1cc23b906 | 
|---|---|
| 96 public Nodeid commit(String message) throws HgIOException, HgRepositoryLockException { | 96 public Nodeid commit(String message) throws HgIOException, HgRepositoryLockException { | 
| 97 final HgChangelog clog = repo.getRepo().getChangelog(); | 97 final HgChangelog clog = repo.getRepo().getChangelog(); | 
| 98 final int clogRevisionIndex = clog.getRevisionCount(); | 98 final int clogRevisionIndex = clog.getRevisionCount(); | 
| 99 ManifestRevision c1Manifest = new ManifestRevision(null, null); | 99 ManifestRevision c1Manifest = new ManifestRevision(null, null); | 
| 100 ManifestRevision c2Manifest = new ManifestRevision(null, null); | 100 ManifestRevision c2Manifest = new ManifestRevision(null, null); | 
| 101 final Nodeid p1Cset = p1Commit == NO_REVISION ? null : clog.getRevision(p1Commit); | |
| 102 final Nodeid p2Cset = p2Commit == NO_REVISION ? null : clog.getRevision(p2Commit); | |
| 101 if (p1Commit != NO_REVISION) { | 103 if (p1Commit != NO_REVISION) { | 
| 102 repo.getRepo().getManifest().walk(p1Commit, p1Commit, c1Manifest); | 104 repo.getRepo().getManifest().walk(p1Commit, p1Commit, c1Manifest); | 
| 103 } | 105 } | 
| 104 if (p2Commit != NO_REVISION) { | 106 if (p2Commit != NO_REVISION) { | 
| 105 repo.getRepo().getManifest().walk(p2Commit, p2Commit, c2Manifest); | 107 repo.getRepo().getManifest().walk(p2Commit, p2Commit, c2Manifest); | 
| 203 dirstateBuilder.recordUncertain(p); | 205 dirstateBuilder.recordUncertain(p); | 
| 204 } | 206 } | 
| 205 dirstateBuilder.parents(changesetRev, Nodeid.NULL); | 207 dirstateBuilder.parents(changesetRev, Nodeid.NULL); | 
| 206 dirstateBuilder.serialize(); | 208 dirstateBuilder.serialize(); | 
| 207 // update bookmarks | 209 // update bookmarks | 
| 208 Nodeid p1Cset = p1Commit == NO_REVISION ? null : clog.getRevision(p1Commit); | |
| 209 Nodeid p2Cset = p2Commit == NO_REVISION ? null : clog.getRevision(p2Commit); | |
| 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 return changesetRev; | 213 return changesetRev; | 
| 214 } | 214 } | 
