Mercurial > hg4j
annotate src/org/tmatesoft/hg/core/HgAddRemoveCommand.java @ 601:8143c1f77d45
Remove debug timestamps
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Mon, 06 May 2013 17:10:46 +0200 |
parents | 0890628ed51e |
children | f41dd9a3b8af |
rev | line source |
---|---|
529
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
1 /* |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
2 * Copyright (c) 2013 TMate Software Ltd |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
3 * |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
4 * This program is free software; you can redistribute it and/or modify |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
5 * it under the terms of the GNU General Public License as published by |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
6 * the Free Software Foundation; version 2 of the License. |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
7 * |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
8 * This program is distributed in the hope that it will be useful, |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
11 * GNU General Public License for more details. |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
12 * |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
13 * For information on how to redistribute this software under |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
14 * the terms of a license other than GNU General Public License |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
15 * contact TMate Software at support@hg4j.com |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
16 */ |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
17 package org.tmatesoft.hg.core; |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
18 |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
19 import java.util.LinkedHashSet; |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
20 |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
21 import org.tmatesoft.hg.internal.DirstateBuilder; |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
22 import org.tmatesoft.hg.internal.DirstateReader; |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
23 import org.tmatesoft.hg.internal.Experimental; |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
24 import org.tmatesoft.hg.internal.Internals; |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
25 import org.tmatesoft.hg.repo.HgManifest.Flags; |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
26 import org.tmatesoft.hg.repo.HgRepository; |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
27 import org.tmatesoft.hg.repo.HgRuntimeException; |
581
0890628ed51e
Progress/cancel support in new commands
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
529
diff
changeset
|
28 import org.tmatesoft.hg.util.CancelSupport; |
0890628ed51e
Progress/cancel support in new commands
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
529
diff
changeset
|
29 import org.tmatesoft.hg.util.CancelledException; |
529
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
30 import org.tmatesoft.hg.util.Path; |
581
0890628ed51e
Progress/cancel support in new commands
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
529
diff
changeset
|
31 import org.tmatesoft.hg.util.ProgressSupport; |
529
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
32 |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
33 /** |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
34 * WORK IN PROGRESS |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
35 * |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
36 * Schedule files for addition and removal |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
37 * XXX and, perhaps, forget() functionality shall be here as well? |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
38 * |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
39 * @since 1.1 |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
40 * @author Artem Tikhomirov |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
41 * @author TMate Software Ltd. |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
42 */ |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
43 @Experimental(reason="Work in progress") |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
44 public class HgAddRemoveCommand extends HgAbstractCommand<HgAddRemoveCommand> { |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
45 |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
46 private final HgRepository repo; |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
47 private final LinkedHashSet<Path> toAdd, toRemove; |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
48 |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
49 public HgAddRemoveCommand(HgRepository hgRepo) { |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
50 repo = hgRepo; |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
51 toAdd = new LinkedHashSet<Path>(); |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
52 toRemove = new LinkedHashSet<Path>(); |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
53 } |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
54 |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
55 /** |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
56 * Schedule specified files to get listed in dirstate as added |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
57 * |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
58 * @param paths files to mark as added, additive |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
59 * @return <code>this</code> for convenience |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
60 */ |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
61 public HgAddRemoveCommand add(Path... paths) { |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
62 if (paths == null) { |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
63 throw new IllegalArgumentException(); |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
64 } |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
65 for (Path p : paths) { |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
66 toRemove.remove(p); |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
67 toAdd.add(p); |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
68 } |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
69 return this; |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
70 } |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
71 |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
72 /** |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
73 * Schedule specified files to be marked as removed |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
74 * |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
75 * @param paths files to mark as removed, additive |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
76 * @return <code>this</code> for convenience |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
77 */ |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
78 public HgAddRemoveCommand remove(Path... paths) { |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
79 if (paths == null) { |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
80 throw new IllegalArgumentException(); |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
81 } |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
82 for (Path p : paths) { |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
83 toAdd.remove(p); |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
84 toRemove.add(p); |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
85 } |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
86 return this; |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
87 } |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
88 |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
89 public HgAddRemoveCommand addAll() { |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
90 throw Internals.notImplemented(); |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
91 } |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
92 |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
93 public HgAddRemoveCommand forget(Path path) { |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
94 throw Internals.notImplemented(); |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
95 } |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
96 |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
97 /** |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
98 * Perform scheduled addition/removal |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
99 * |
581
0890628ed51e
Progress/cancel support in new commands
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
529
diff
changeset
|
100 * @throws HgException subclass thereof to indicate specific issue with the command arguments or repository state |
0890628ed51e
Progress/cancel support in new commands
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
529
diff
changeset
|
101 * @throws CancelledException if execution of the command was cancelled |
529
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
102 */ |
581
0890628ed51e
Progress/cancel support in new commands
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
529
diff
changeset
|
103 public void execute() throws HgException, CancelledException { |
529
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
104 try { |
581
0890628ed51e
Progress/cancel support in new commands
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
529
diff
changeset
|
105 final ProgressSupport progress = getProgressSupport(null); |
0890628ed51e
Progress/cancel support in new commands
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
529
diff
changeset
|
106 final CancelSupport cancellation = getCancelSupport(null, true); |
0890628ed51e
Progress/cancel support in new commands
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
529
diff
changeset
|
107 cancellation.checkCancelled(); |
0890628ed51e
Progress/cancel support in new commands
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
529
diff
changeset
|
108 progress.start(2 + toAdd.size() + toRemove.size()); |
529
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
109 Internals implRepo = Internals.getInstance(repo); |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
110 final DirstateBuilder dirstateBuilder = new DirstateBuilder(implRepo); |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
111 dirstateBuilder.fillFrom(new DirstateReader(implRepo, new Path.SimpleSource())); |
581
0890628ed51e
Progress/cancel support in new commands
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
529
diff
changeset
|
112 progress.worked(1); |
0890628ed51e
Progress/cancel support in new commands
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
529
diff
changeset
|
113 cancellation.checkCancelled(); |
529
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
114 for (Path p : toAdd) { |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
115 dirstateBuilder.recordAdded(p, Flags.RegularFile, -1); |
581
0890628ed51e
Progress/cancel support in new commands
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
529
diff
changeset
|
116 progress.worked(1); |
0890628ed51e
Progress/cancel support in new commands
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
529
diff
changeset
|
117 cancellation.checkCancelled(); |
529
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
118 } |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
119 for (Path p : toRemove) { |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
120 dirstateBuilder.recordRemoved(p); |
581
0890628ed51e
Progress/cancel support in new commands
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
529
diff
changeset
|
121 progress.worked(1); |
0890628ed51e
Progress/cancel support in new commands
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
529
diff
changeset
|
122 cancellation.checkCancelled(); |
529
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
123 } |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
124 dirstateBuilder.serialize(); |
581
0890628ed51e
Progress/cancel support in new commands
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
529
diff
changeset
|
125 progress.worked(1); |
0890628ed51e
Progress/cancel support in new commands
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
529
diff
changeset
|
126 progress.done(); |
529
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
127 } catch (HgRuntimeException ex) { |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
128 throw new HgLibraryFailureException(ex); |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
129 } |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
130 } |
95bdcf75e71e
Command to schedule addition/removal of repository files
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
131 } |