diff 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
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/internal/CommitFacility.java	Tue May 07 14:16:35 2013 +0200
+++ b/src/org/tmatesoft/hg/internal/CommitFacility.java	Tue May 07 16:52:46 2013 +0200
@@ -98,6 +98,8 @@
 		final int clogRevisionIndex = clog.getRevisionCount();
 		ManifestRevision c1Manifest = new ManifestRevision(null, null);
 		ManifestRevision c2Manifest = new ManifestRevision(null, null);
+		final Nodeid p1Cset = p1Commit == NO_REVISION ? null : clog.getRevision(p1Commit);
+		final Nodeid p2Cset = p2Commit == NO_REVISION ? null : clog.getRevision(p2Commit);
 		if (p1Commit != NO_REVISION) {
 			repo.getRepo().getManifest().walk(p1Commit, p1Commit, c1Manifest);
 		}
@@ -205,8 +207,6 @@
 		dirstateBuilder.parents(changesetRev, Nodeid.NULL);
 		dirstateBuilder.serialize();
 		// update bookmarks
-		Nodeid p1Cset = p1Commit == NO_REVISION ? null : clog.getRevision(p1Commit);
-		Nodeid p2Cset = p2Commit == NO_REVISION ? null : clog.getRevision(p2Commit);
 		if (p1Commit != NO_REVISION || p2Commit != NO_REVISION) {
 			repo.getRepo().getBookmarks().updateActive(p1Cset, p2Cset, changesetRev);
 		}