Mercurial > jhg
annotate src/org/tmatesoft/hg/core/HgOutgoingCommand.java @ 192:e5407b5a586a
Incoming and Outgoing commands are alive
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Fri, 15 Apr 2011 03:17:03 +0200 |
parents | cd3371670f0b |
children | 344e8d7e4d6e |
rev | line source |
---|---|
181
cd3371670f0b
Refactor incoming and outgoing code to be shared with RepositoryComparator. Placeholders for in/out commands. Refactor common remote lookup code
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
1 /* |
cd3371670f0b
Refactor incoming and outgoing code to be shared with RepositoryComparator. Placeholders for in/out commands. Refactor common remote lookup code
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
2 * Copyright (c) 2011 TMate Software Ltd |
cd3371670f0b
Refactor incoming and outgoing code to be shared with RepositoryComparator. Placeholders for in/out commands. Refactor common remote lookup code
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
3 * |
cd3371670f0b
Refactor incoming and outgoing code to be shared with RepositoryComparator. Placeholders for in/out commands. Refactor common remote lookup code
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
4 * This program is free software; you can redistribute it and/or modify |
cd3371670f0b
Refactor incoming and outgoing code to be shared with RepositoryComparator. Placeholders for in/out commands. Refactor common remote lookup code
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
5 * it under the terms of the GNU General Public License as published by |
cd3371670f0b
Refactor incoming and outgoing code to be shared with RepositoryComparator. Placeholders for in/out commands. Refactor common remote lookup code
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
6 * the Free Software Foundation; version 2 of the License. |
cd3371670f0b
Refactor incoming and outgoing code to be shared with RepositoryComparator. Placeholders for in/out commands. Refactor common remote lookup code
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
7 * |
cd3371670f0b
Refactor incoming and outgoing code to be shared with RepositoryComparator. Placeholders for in/out commands. Refactor common remote lookup code
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
8 * This program is distributed in the hope that it will be useful, |
cd3371670f0b
Refactor incoming and outgoing code to be shared with RepositoryComparator. Placeholders for in/out commands. Refactor common remote lookup code
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
cd3371670f0b
Refactor incoming and outgoing code to be shared with RepositoryComparator. Placeholders for in/out commands. Refactor common remote lookup code
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
cd3371670f0b
Refactor incoming and outgoing code to be shared with RepositoryComparator. Placeholders for in/out commands. Refactor common remote lookup code
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
11 * GNU General Public License for more details. |
cd3371670f0b
Refactor incoming and outgoing code to be shared with RepositoryComparator. Placeholders for in/out commands. Refactor common remote lookup code
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
12 * |
cd3371670f0b
Refactor incoming and outgoing code to be shared with RepositoryComparator. Placeholders for in/out commands. Refactor common remote lookup code
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
13 * For information on how to redistribute this software under |
cd3371670f0b
Refactor incoming and outgoing code to be shared with RepositoryComparator. Placeholders for in/out commands. Refactor common remote lookup code
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
14 * the terms of a license other than GNU General Public License |
cd3371670f0b
Refactor incoming and outgoing code to be shared with RepositoryComparator. Placeholders for in/out commands. Refactor common remote lookup code
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
15 * contact TMate Software at support@hg4j.com |
cd3371670f0b
Refactor incoming and outgoing code to be shared with RepositoryComparator. Placeholders for in/out commands. Refactor common remote lookup code
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
16 */ |
cd3371670f0b
Refactor incoming and outgoing code to be shared with RepositoryComparator. Placeholders for in/out commands. Refactor common remote lookup code
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
17 package org.tmatesoft.hg.core; |
cd3371670f0b
Refactor incoming and outgoing code to be shared with RepositoryComparator. Placeholders for in/out commands. Refactor common remote lookup code
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
18 |
cd3371670f0b
Refactor incoming and outgoing code to be shared with RepositoryComparator. Placeholders for in/out commands. Refactor common remote lookup code
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
19 import java.util.List; |
cd3371670f0b
Refactor incoming and outgoing code to be shared with RepositoryComparator. Placeholders for in/out commands. Refactor common remote lookup code
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
20 |
192
e5407b5a586a
Incoming and Outgoing commands are alive
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
181
diff
changeset
|
21 import org.tmatesoft.hg.internal.RepositoryComparator; |
e5407b5a586a
Incoming and Outgoing commands are alive
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
181
diff
changeset
|
22 import org.tmatesoft.hg.repo.HgChangelog; |
e5407b5a586a
Incoming and Outgoing commands are alive
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
181
diff
changeset
|
23 import org.tmatesoft.hg.repo.HgRemoteRepository; |
181
cd3371670f0b
Refactor incoming and outgoing code to be shared with RepositoryComparator. Placeholders for in/out commands. Refactor common remote lookup code
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
24 import org.tmatesoft.hg.repo.HgRepository; |
cd3371670f0b
Refactor incoming and outgoing code to be shared with RepositoryComparator. Placeholders for in/out commands. Refactor common remote lookup code
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
25 import org.tmatesoft.hg.util.CancelledException; |
cd3371670f0b
Refactor incoming and outgoing code to be shared with RepositoryComparator. Placeholders for in/out commands. Refactor common remote lookup code
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
26 |
cd3371670f0b
Refactor incoming and outgoing code to be shared with RepositoryComparator. Placeholders for in/out commands. Refactor common remote lookup code
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
27 /** |
192
e5407b5a586a
Incoming and Outgoing commands are alive
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
181
diff
changeset
|
28 * Command to find out changes made in a local repository and missing at remote repository. |
e5407b5a586a
Incoming and Outgoing commands are alive
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
181
diff
changeset
|
29 * |
181
cd3371670f0b
Refactor incoming and outgoing code to be shared with RepositoryComparator. Placeholders for in/out commands. Refactor common remote lookup code
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
30 * @author Artem Tikhomirov |
cd3371670f0b
Refactor incoming and outgoing code to be shared with RepositoryComparator. Placeholders for in/out commands. Refactor common remote lookup code
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
31 * @author TMate Software Ltd. |
cd3371670f0b
Refactor incoming and outgoing code to be shared with RepositoryComparator. Placeholders for in/out commands. Refactor common remote lookup code
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
32 */ |
cd3371670f0b
Refactor incoming and outgoing code to be shared with RepositoryComparator. Placeholders for in/out commands. Refactor common remote lookup code
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
33 public class HgOutgoingCommand { |
192
e5407b5a586a
Incoming and Outgoing commands are alive
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
181
diff
changeset
|
34 |
e5407b5a586a
Incoming and Outgoing commands are alive
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
181
diff
changeset
|
35 private final HgRepository localRepo; |
e5407b5a586a
Incoming and Outgoing commands are alive
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
181
diff
changeset
|
36 private HgRemoteRepository remoteRepo; |
181
cd3371670f0b
Refactor incoming and outgoing code to be shared with RepositoryComparator. Placeholders for in/out commands. Refactor common remote lookup code
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
37 private boolean includeSubrepo; |
192
e5407b5a586a
Incoming and Outgoing commands are alive
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
181
diff
changeset
|
38 private RepositoryComparator comparator; |
181
cd3371670f0b
Refactor incoming and outgoing code to be shared with RepositoryComparator. Placeholders for in/out commands. Refactor common remote lookup code
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
39 |
cd3371670f0b
Refactor incoming and outgoing code to be shared with RepositoryComparator. Placeholders for in/out commands. Refactor common remote lookup code
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
40 public HgOutgoingCommand(HgRepository hgRepo) { |
192
e5407b5a586a
Incoming and Outgoing commands are alive
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
181
diff
changeset
|
41 localRepo = hgRepo; |
181
cd3371670f0b
Refactor incoming and outgoing code to be shared with RepositoryComparator. Placeholders for in/out commands. Refactor common remote lookup code
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
42 } |
cd3371670f0b
Refactor incoming and outgoing code to be shared with RepositoryComparator. Placeholders for in/out commands. Refactor common remote lookup code
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
43 |
cd3371670f0b
Refactor incoming and outgoing code to be shared with RepositoryComparator. Placeholders for in/out commands. Refactor common remote lookup code
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
44 /** |
192
e5407b5a586a
Incoming and Outgoing commands are alive
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
181
diff
changeset
|
45 * @param hgRemote remoteRepository to compare against |
e5407b5a586a
Incoming and Outgoing commands are alive
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
181
diff
changeset
|
46 * @return <code>this</code> for convenience |
e5407b5a586a
Incoming and Outgoing commands are alive
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
181
diff
changeset
|
47 */ |
e5407b5a586a
Incoming and Outgoing commands are alive
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
181
diff
changeset
|
48 public HgOutgoingCommand against(HgRemoteRepository hgRemote) { |
e5407b5a586a
Incoming and Outgoing commands are alive
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
181
diff
changeset
|
49 remoteRepo = hgRemote; |
e5407b5a586a
Incoming and Outgoing commands are alive
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
181
diff
changeset
|
50 comparator = null; |
e5407b5a586a
Incoming and Outgoing commands are alive
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
181
diff
changeset
|
51 return this; |
e5407b5a586a
Incoming and Outgoing commands are alive
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
181
diff
changeset
|
52 } |
e5407b5a586a
Incoming and Outgoing commands are alive
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
181
diff
changeset
|
53 |
e5407b5a586a
Incoming and Outgoing commands are alive
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
181
diff
changeset
|
54 /** |
e5407b5a586a
Incoming and Outgoing commands are alive
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
181
diff
changeset
|
55 * PLACEHOLDER, NOT IMPLEMENTED YET. |
e5407b5a586a
Incoming and Outgoing commands are alive
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
181
diff
changeset
|
56 * |
181
cd3371670f0b
Refactor incoming and outgoing code to be shared with RepositoryComparator. Placeholders for in/out commands. Refactor common remote lookup code
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
57 * Select specific branch to pull |
cd3371670f0b
Refactor incoming and outgoing code to be shared with RepositoryComparator. Placeholders for in/out commands. Refactor common remote lookup code
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
58 * @return <code>this</code> for convenience |
cd3371670f0b
Refactor incoming and outgoing code to be shared with RepositoryComparator. Placeholders for in/out commands. Refactor common remote lookup code
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
59 */ |
cd3371670f0b
Refactor incoming and outgoing code to be shared with RepositoryComparator. Placeholders for in/out commands. Refactor common remote lookup code
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
60 public HgOutgoingCommand branch(String branch) { |
cd3371670f0b
Refactor incoming and outgoing code to be shared with RepositoryComparator. Placeholders for in/out commands. Refactor common remote lookup code
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
61 throw HgRepository.notImplemented(); |
cd3371670f0b
Refactor incoming and outgoing code to be shared with RepositoryComparator. Placeholders for in/out commands. Refactor common remote lookup code
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
62 } |
cd3371670f0b
Refactor incoming and outgoing code to be shared with RepositoryComparator. Placeholders for in/out commands. Refactor common remote lookup code
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
63 |
cd3371670f0b
Refactor incoming and outgoing code to be shared with RepositoryComparator. Placeholders for in/out commands. Refactor common remote lookup code
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
64 /** |
192
e5407b5a586a
Incoming and Outgoing commands are alive
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
181
diff
changeset
|
65 * PLACEHOLDER, NOT IMPLEMENTED YET. |
181
cd3371670f0b
Refactor incoming and outgoing code to be shared with RepositoryComparator. Placeholders for in/out commands. Refactor common remote lookup code
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
66 * |
cd3371670f0b
Refactor incoming and outgoing code to be shared with RepositoryComparator. Placeholders for in/out commands. Refactor common remote lookup code
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
67 * @return <code>this</code> for convenience |
cd3371670f0b
Refactor incoming and outgoing code to be shared with RepositoryComparator. Placeholders for in/out commands. Refactor common remote lookup code
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
68 */ |
cd3371670f0b
Refactor incoming and outgoing code to be shared with RepositoryComparator. Placeholders for in/out commands. Refactor common remote lookup code
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
69 public HgOutgoingCommand subrepo(boolean include) { |
cd3371670f0b
Refactor incoming and outgoing code to be shared with RepositoryComparator. Placeholders for in/out commands. Refactor common remote lookup code
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
70 includeSubrepo = include; |
cd3371670f0b
Refactor incoming and outgoing code to be shared with RepositoryComparator. Placeholders for in/out commands. Refactor common remote lookup code
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
71 throw HgRepository.notImplemented(); |
cd3371670f0b
Refactor incoming and outgoing code to be shared with RepositoryComparator. Placeholders for in/out commands. Refactor common remote lookup code
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
72 } |
cd3371670f0b
Refactor incoming and outgoing code to be shared with RepositoryComparator. Placeholders for in/out commands. Refactor common remote lookup code
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
73 |
192
e5407b5a586a
Incoming and Outgoing commands are alive
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
181
diff
changeset
|
74 /** |
e5407b5a586a
Incoming and Outgoing commands are alive
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
181
diff
changeset
|
75 * Lightweight check for outgoing changes. |
e5407b5a586a
Incoming and Outgoing commands are alive
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
181
diff
changeset
|
76 * |
e5407b5a586a
Incoming and Outgoing commands are alive
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
181
diff
changeset
|
77 * @param context |
e5407b5a586a
Incoming and Outgoing commands are alive
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
181
diff
changeset
|
78 * @return list on local nodes known to be missing at remote server |
e5407b5a586a
Incoming and Outgoing commands are alive
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
181
diff
changeset
|
79 */ |
181
cd3371670f0b
Refactor incoming and outgoing code to be shared with RepositoryComparator. Placeholders for in/out commands. Refactor common remote lookup code
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
80 public List<Nodeid> executeLite(Object context) throws HgException, CancelledException { |
192
e5407b5a586a
Incoming and Outgoing commands are alive
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
181
diff
changeset
|
81 return getComparator(context).getLocalOnlyRevisions(); |
181
cd3371670f0b
Refactor incoming and outgoing code to be shared with RepositoryComparator. Placeholders for in/out commands. Refactor common remote lookup code
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
82 } |
cd3371670f0b
Refactor incoming and outgoing code to be shared with RepositoryComparator. Placeholders for in/out commands. Refactor common remote lookup code
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
83 |
192
e5407b5a586a
Incoming and Outgoing commands are alive
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
181
diff
changeset
|
84 /** |
e5407b5a586a
Incoming and Outgoing commands are alive
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
181
diff
changeset
|
85 * Complete information about outgoing changes |
e5407b5a586a
Incoming and Outgoing commands are alive
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
181
diff
changeset
|
86 * |
e5407b5a586a
Incoming and Outgoing commands are alive
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
181
diff
changeset
|
87 * @param handler delegate to process changes |
e5407b5a586a
Incoming and Outgoing commands are alive
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
181
diff
changeset
|
88 */ |
e5407b5a586a
Incoming and Outgoing commands are alive
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
181
diff
changeset
|
89 public void executeFull(final HgLogCommand.Handler handler) throws HgException, CancelledException { |
e5407b5a586a
Incoming and Outgoing commands are alive
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
181
diff
changeset
|
90 if (handler == null) { |
e5407b5a586a
Incoming and Outgoing commands are alive
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
181
diff
changeset
|
91 throw new IllegalArgumentException("Delegate can't be null"); |
e5407b5a586a
Incoming and Outgoing commands are alive
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
181
diff
changeset
|
92 } |
e5407b5a586a
Incoming and Outgoing commands are alive
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
181
diff
changeset
|
93 getComparator(handler).visitLocalOnlyRevisions(new ChangesetTransformer(localRepo, handler)); |
e5407b5a586a
Incoming and Outgoing commands are alive
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
181
diff
changeset
|
94 } |
e5407b5a586a
Incoming and Outgoing commands are alive
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
181
diff
changeset
|
95 |
e5407b5a586a
Incoming and Outgoing commands are alive
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
181
diff
changeset
|
96 private RepositoryComparator getComparator(Object context) throws HgException, CancelledException { |
e5407b5a586a
Incoming and Outgoing commands are alive
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
181
diff
changeset
|
97 if (remoteRepo == null) { |
e5407b5a586a
Incoming and Outgoing commands are alive
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
181
diff
changeset
|
98 throw new IllegalArgumentException("Shall specify remote repository to compare against"); |
e5407b5a586a
Incoming and Outgoing commands are alive
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
181
diff
changeset
|
99 } |
e5407b5a586a
Incoming and Outgoing commands are alive
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
181
diff
changeset
|
100 if (comparator == null) { |
e5407b5a586a
Incoming and Outgoing commands are alive
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
181
diff
changeset
|
101 HgChangelog.ParentWalker pw = localRepo.getChangelog().new ParentWalker(); |
e5407b5a586a
Incoming and Outgoing commands are alive
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
181
diff
changeset
|
102 pw.init(); |
e5407b5a586a
Incoming and Outgoing commands are alive
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
181
diff
changeset
|
103 comparator = new RepositoryComparator(pw, remoteRepo); |
e5407b5a586a
Incoming and Outgoing commands are alive
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
181
diff
changeset
|
104 comparator.compare(context); |
e5407b5a586a
Incoming and Outgoing commands are alive
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
181
diff
changeset
|
105 } |
e5407b5a586a
Incoming and Outgoing commands are alive
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
181
diff
changeset
|
106 return comparator; |
181
cd3371670f0b
Refactor incoming and outgoing code to be shared with RepositoryComparator. Placeholders for in/out commands. Refactor common remote lookup code
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
107 } |
cd3371670f0b
Refactor incoming and outgoing code to be shared with RepositoryComparator. Placeholders for in/out commands. Refactor common remote lookup code
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
108 } |