comparison src/org/tmatesoft/hg/internal/CommitFacility.java @ 652:cd77bf51b562

Push: tests. Commit respects phases.new-commit setting. Fix outgoing when changes are not children of common (Issue 47)
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Tue, 02 Jul 2013 23:21:16 +0200
parents ffce73efa2c2
children 12a4f60ea972
comparison
equal deleted inserted replaced
651:6e98d34eaca8 652:cd77bf51b562
40 import org.tmatesoft.hg.core.HgRepositoryLockException; 40 import org.tmatesoft.hg.core.HgRepositoryLockException;
41 import org.tmatesoft.hg.core.Nodeid; 41 import org.tmatesoft.hg.core.Nodeid;
42 import org.tmatesoft.hg.internal.DataSerializer.DataSource; 42 import org.tmatesoft.hg.internal.DataSerializer.DataSource;
43 import org.tmatesoft.hg.repo.HgChangelog; 43 import org.tmatesoft.hg.repo.HgChangelog;
44 import org.tmatesoft.hg.repo.HgDataFile; 44 import org.tmatesoft.hg.repo.HgDataFile;
45 import org.tmatesoft.hg.repo.HgPhase;
45 import org.tmatesoft.hg.repo.HgRuntimeException; 46 import org.tmatesoft.hg.repo.HgRuntimeException;
46 import org.tmatesoft.hg.util.Pair; 47 import org.tmatesoft.hg.util.Pair;
47 import org.tmatesoft.hg.util.Path; 48 import org.tmatesoft.hg.util.Path;
48 49
49 /** 50 /**
232 dirstateBuilder.serialize(transaction); 233 dirstateBuilder.serialize(transaction);
233 // update bookmarks 234 // update bookmarks
234 if (p1Commit != NO_REVISION || p2Commit != NO_REVISION) { 235 if (p1Commit != NO_REVISION || p2Commit != NO_REVISION) {
235 repo.getRepo().getBookmarks().updateActive(p1Cset, p2Cset, changesetRev); 236 repo.getRepo().getBookmarks().updateActive(p1Cset, p2Cset, changesetRev);
236 } 237 }
238 PhasesHelper phaseHelper = new PhasesHelper(repo);
239 HgPhase newCommitPhase = HgPhase.parse(repo.getRepo().getConfiguration().getStringValue("phases", "new-commit", HgPhase.Draft.mercurialString()));
240 phaseHelper.newCommitNode(changesetRev, newCommitPhase);
237 // TODO Revisit: might be reasonable to send out a "Repo changed" notification, to clear 241 // TODO Revisit: might be reasonable to send out a "Repo changed" notification, to clear
238 // e.g. cached branch, tags and so on, not to rely on file change detection methods? 242 // e.g. cached branch, tags and so on, not to rely on file change detection methods?
239 // The same notification might come useful once Pull is implemented 243 // The same notification might come useful once Pull is implemented
240 return changesetRev; 244 return changesetRev;
241 } 245 }