Mercurial > hg4j
comparison src/org/tmatesoft/hg/core/HgIncomingCommand.java @ 181:cd3371670f0b
Refactor incoming and outgoing code to be shared with RepositoryComparator. Placeholders for in/out commands. Refactor common remote lookup code
| author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
|---|---|
| date | Tue, 12 Apr 2011 19:10:38 +0200 |
| parents | |
| children | e5407b5a586a |
comparison
equal
deleted
inserted
replaced
| 180:42fe9a94b9d0 | 181:cd3371670f0b |
|---|---|
| 1 /* | |
| 2 * Copyright (c) 2011 TMate Software Ltd | |
| 3 * | |
| 4 * This program is free software; you can redistribute it and/or modify | |
| 5 * it under the terms of the GNU General Public License as published by | |
| 6 * the Free Software Foundation; version 2 of the License. | |
| 7 * | |
| 8 * This program is distributed in the hope that it will be useful, | |
| 9 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 11 * GNU General Public License for more details. | |
| 12 * | |
| 13 * For information on how to redistribute this software under | |
| 14 * the terms of a license other than GNU General Public License | |
| 15 * contact TMate Software at support@hg4j.com | |
| 16 */ | |
| 17 package org.tmatesoft.hg.core; | |
| 18 | |
| 19 import java.util.List; | |
| 20 | |
| 21 import org.tmatesoft.hg.repo.HgRepository; | |
| 22 import org.tmatesoft.hg.util.CancelledException; | |
| 23 | |
| 24 /** | |
| 25 * | |
| 26 * @author Artem Tikhomirov | |
| 27 * @author TMate Software Ltd. | |
| 28 */ | |
| 29 public class HgIncomingCommand { | |
| 30 | |
| 31 private final HgRepository repo; | |
| 32 private boolean includeSubrepo; | |
| 33 | |
| 34 public HgIncomingCommand(HgRepository hgRepo) { | |
| 35 repo = hgRepo; | |
| 36 } | |
| 37 | |
| 38 /** | |
| 39 * Select specific branch to pull | |
| 40 * @return <code>this</code> for convenience | |
| 41 */ | |
| 42 public HgIncomingCommand branch(String branch) { | |
| 43 throw HgRepository.notImplemented(); | |
| 44 } | |
| 45 | |
| 46 /** | |
| 47 * Whether to include sub-repositories when collecting changes, default is <code>true</code> XXX or false? | |
| 48 * @return <code>this</code> for convenience | |
| 49 */ | |
| 50 public HgIncomingCommand subrepo(boolean include) { | |
| 51 includeSubrepo = include; | |
| 52 throw HgRepository.notImplemented(); | |
| 53 } | |
| 54 | |
| 55 /** | |
| 56 * Lightweight check for incoming changes, gives only list of revisions to pull. | |
| 57 * | |
| 58 * @param context anything hg4j can use to get progress and/or cancel support | |
| 59 * @return list of nodes present at remote and missing locally | |
| 60 * @throws HgException | |
| 61 * @throws CancelledException | |
| 62 */ | |
| 63 public List<Nodeid> executeLite(Object context) throws HgException, CancelledException { | |
| 64 throw HgRepository.notImplemented(); | |
| 65 } | |
| 66 | |
| 67 /** | |
| 68 * Full information about incoming changes | |
| 69 * | |
| 70 * @throws HgException | |
| 71 * @throws CancelledException | |
| 72 */ | |
| 73 public void executeFull(HgLogCommand.Handler handler) throws HgException, CancelledException { | |
| 74 throw HgRepository.notImplemented(); | |
| 75 } | |
| 76 } |
