Mercurial > hg4j
comparison src/org/tmatesoft/hg/repo/ext/MqManager.java @ 624:507602cb4fb3
FIXMEs and TODOs: pay some technical debt
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Mon, 20 May 2013 20:34:33 +0200 |
parents | d2f6ab541330 |
children | 6526d8adbc0f |
comparison
equal
deleted
inserted
replaced
623:fedc54356091 | 624:507602cb4fb3 |
---|---|
37 | 37 |
38 /** | 38 /** |
39 * Mercurial Queues Support. | 39 * Mercurial Queues Support. |
40 * Access to MqExtension functionality. | 40 * Access to MqExtension functionality. |
41 * | 41 * |
42 * FIXME check we don't hold any mq files for too long, close them, use | |
43 * the same lock mechanism as mq does (if any). Check if MQ uses Mercurial's store lock | |
44 * | |
45 * @since 1.1 | 42 * @since 1.1 |
46 * @author Artem Tikhomirov | 43 * @author Artem Tikhomirov |
47 * @author TMate Software Ltd. | 44 * @author TMate Software Ltd. |
48 */ | 45 */ |
49 public class MqManager { | 46 public class MqManager { |
63 /** | 60 /** |
64 * Updates manager with up-to-date state of the mercurial queues. | 61 * Updates manager with up-to-date state of the mercurial queues. |
65 * @return <code>this</code> for convenience | 62 * @return <code>this</code> for convenience |
66 */ | 63 */ |
67 public MqManager refresh() throws HgInvalidControlFileException { | 64 public MqManager refresh() throws HgInvalidControlFileException { |
65 // MQ doesn't seem to use any custom lock mechanism. | |
66 // MQ uses Mercurial's wc/store lock when updating repository (strip/new queue) | |
68 applied = allKnown = Collections.emptyList(); | 67 applied = allKnown = Collections.emptyList(); |
69 queueNames = Collections.emptyList(); | 68 queueNames = Collections.emptyList(); |
70 final LogFacility log = repo.getSessionContext().getLog(); | 69 final LogFacility log = repo.getSessionContext().getLog(); |
71 try { | 70 try { |
72 File queues = repo.getFileFromRepoDir("patches.queues"); | 71 File queues = repo.getFileFromRepoDir("patches.queues"); |