Mercurial > hg4j
annotate src/org/tmatesoft/hg/core/HgFileRevision.java @ 354:5f9073eabf06
Propagate errors with exceptions up to a end client
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Thu, 01 Dec 2011 05:21:40 +0100 |
parents | 58725dd511b3 |
children | ac8e1ce67730 |
rev | line source |
---|---|
231
1792b37650f2
Introduced access to conflict resolution information (merge state)
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
1 /* |
1792b37650f2
Introduced access to conflict resolution information (merge state)
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
2 * Copyright (c) 2011 TMate Software Ltd |
1792b37650f2
Introduced access to conflict resolution information (merge state)
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
3 * |
1792b37650f2
Introduced access to conflict resolution information (merge state)
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
4 * This program is free software; you can redistribute it and/or modify |
1792b37650f2
Introduced access to conflict resolution information (merge state)
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
5 * it under the terms of the GNU General Public License as published by |
1792b37650f2
Introduced access to conflict resolution information (merge state)
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
6 * the Free Software Foundation; version 2 of the License. |
1792b37650f2
Introduced access to conflict resolution information (merge state)
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
7 * |
1792b37650f2
Introduced access to conflict resolution information (merge state)
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
8 * This program is distributed in the hope that it will be useful, |
1792b37650f2
Introduced access to conflict resolution information (merge state)
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
1792b37650f2
Introduced access to conflict resolution information (merge state)
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1792b37650f2
Introduced access to conflict resolution information (merge state)
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
11 * GNU General Public License for more details. |
1792b37650f2
Introduced access to conflict resolution information (merge state)
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
12 * |
1792b37650f2
Introduced access to conflict resolution information (merge state)
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
13 * For information on how to redistribute this software under |
1792b37650f2
Introduced access to conflict resolution information (merge state)
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
14 * the terms of a license other than GNU General Public License |
1792b37650f2
Introduced access to conflict resolution information (merge state)
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
15 * contact TMate Software at support@hg4j.com |
1792b37650f2
Introduced access to conflict resolution information (merge state)
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
16 */ |
1792b37650f2
Introduced access to conflict resolution information (merge state)
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
17 package org.tmatesoft.hg.core; |
1792b37650f2
Introduced access to conflict resolution information (merge state)
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
18 |
1792b37650f2
Introduced access to conflict resolution information (merge state)
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
19 import org.tmatesoft.hg.repo.HgDataFile; |
316
ee6b467c1a5f
Supply HGFileRevision with copy information when possible, calculate it otherwise
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
249
diff
changeset
|
20 import org.tmatesoft.hg.repo.HgInternals; |
231
1792b37650f2
Introduced access to conflict resolution information (merge state)
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
21 import org.tmatesoft.hg.repo.HgRepository; |
1792b37650f2
Introduced access to conflict resolution information (merge state)
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
22 import org.tmatesoft.hg.util.ByteChannel; |
1792b37650f2
Introduced access to conflict resolution information (merge state)
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
23 import org.tmatesoft.hg.util.CancelledException; |
345
58725dd511b3
Provide access to revision's origins
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
316
diff
changeset
|
24 import org.tmatesoft.hg.util.Pair; |
231
1792b37650f2
Introduced access to conflict resolution information (merge state)
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
25 import org.tmatesoft.hg.util.Path; |
1792b37650f2
Introduced access to conflict resolution information (merge state)
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
26 |
1792b37650f2
Introduced access to conflict resolution information (merge state)
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
27 /** |
1792b37650f2
Introduced access to conflict resolution information (merge state)
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
28 * Keeps together information about specific file revision |
1792b37650f2
Introduced access to conflict resolution information (merge state)
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
29 * |
1792b37650f2
Introduced access to conflict resolution information (merge state)
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
30 * @author Artem Tikhomirov |
1792b37650f2
Introduced access to conflict resolution information (merge state)
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
31 * @author TMate Software Ltd. |
1792b37650f2
Introduced access to conflict resolution information (merge state)
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
32 */ |
249
4c3b9f679412
Deprecated HgLogCommand.FileRevision gone, top-level HgFileRevision is bright and shiny replacement
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
237
diff
changeset
|
33 public final class HgFileRevision { |
231
1792b37650f2
Introduced access to conflict resolution information (merge state)
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
34 private final HgRepository repo; |
1792b37650f2
Introduced access to conflict resolution information (merge state)
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
35 private final Nodeid revision; |
1792b37650f2
Introduced access to conflict resolution information (merge state)
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
36 private final Path path; |
316
ee6b467c1a5f
Supply HGFileRevision with copy information when possible, calculate it otherwise
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
249
diff
changeset
|
37 private Path origin; |
ee6b467c1a5f
Supply HGFileRevision with copy information when possible, calculate it otherwise
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
249
diff
changeset
|
38 private Boolean isCopy = null; // null means not yet known |
345
58725dd511b3
Provide access to revision's origins
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
316
diff
changeset
|
39 private Pair<Nodeid, Nodeid> parents; |
316
ee6b467c1a5f
Supply HGFileRevision with copy information when possible, calculate it otherwise
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
249
diff
changeset
|
40 |
231
1792b37650f2
Introduced access to conflict resolution information (merge state)
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
41 public HgFileRevision(HgRepository hgRepo, Nodeid rev, Path p) { |
1792b37650f2
Introduced access to conflict resolution information (merge state)
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
42 if (hgRepo == null || rev == null || p == null) { |
1792b37650f2
Introduced access to conflict resolution information (merge state)
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
43 // since it's package local, it is our code to blame for non validated arguments |
316
ee6b467c1a5f
Supply HGFileRevision with copy information when possible, calculate it otherwise
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
249
diff
changeset
|
44 throw new IllegalArgumentException(); |
231
1792b37650f2
Introduced access to conflict resolution information (merge state)
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
45 } |
1792b37650f2
Introduced access to conflict resolution information (merge state)
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
46 repo = hgRepo; |
1792b37650f2
Introduced access to conflict resolution information (merge state)
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
47 revision = rev; |
1792b37650f2
Introduced access to conflict resolution information (merge state)
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
48 path = p; |
1792b37650f2
Introduced access to conflict resolution information (merge state)
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
49 } |
316
ee6b467c1a5f
Supply HGFileRevision with copy information when possible, calculate it otherwise
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
249
diff
changeset
|
50 |
ee6b467c1a5f
Supply HGFileRevision with copy information when possible, calculate it otherwise
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
249
diff
changeset
|
51 // this cons shall be used when we know whether p was a copy. Perhaps, shall pass Map<Path,Path> instead to stress orig argument is not optional |
ee6b467c1a5f
Supply HGFileRevision with copy information when possible, calculate it otherwise
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
249
diff
changeset
|
52 HgFileRevision(HgRepository hgRepo, Nodeid rev, Path p, Path orig) { |
ee6b467c1a5f
Supply HGFileRevision with copy information when possible, calculate it otherwise
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
249
diff
changeset
|
53 this(hgRepo, rev, p); |
ee6b467c1a5f
Supply HGFileRevision with copy information when possible, calculate it otherwise
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
249
diff
changeset
|
54 isCopy = Boolean.valueOf(orig == null); |
ee6b467c1a5f
Supply HGFileRevision with copy information when possible, calculate it otherwise
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
249
diff
changeset
|
55 origin = orig; |
ee6b467c1a5f
Supply HGFileRevision with copy information when possible, calculate it otherwise
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
249
diff
changeset
|
56 } |
231
1792b37650f2
Introduced access to conflict resolution information (merge state)
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
57 |
1792b37650f2
Introduced access to conflict resolution information (merge state)
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
58 public Path getPath() { |
1792b37650f2
Introduced access to conflict resolution information (merge state)
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
59 return path; |
1792b37650f2
Introduced access to conflict resolution information (merge state)
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
60 } |
1792b37650f2
Introduced access to conflict resolution information (merge state)
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
61 public Nodeid getRevision() { |
1792b37650f2
Introduced access to conflict resolution information (merge state)
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
62 return revision; |
1792b37650f2
Introduced access to conflict resolution information (merge state)
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
63 } |
316
ee6b467c1a5f
Supply HGFileRevision with copy information when possible, calculate it otherwise
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
249
diff
changeset
|
64 public boolean wasCopied() { |
ee6b467c1a5f
Supply HGFileRevision with copy information when possible, calculate it otherwise
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
249
diff
changeset
|
65 if (isCopy == null) { |
ee6b467c1a5f
Supply HGFileRevision with copy information when possible, calculate it otherwise
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
249
diff
changeset
|
66 checkCopy(); |
ee6b467c1a5f
Supply HGFileRevision with copy information when possible, calculate it otherwise
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
249
diff
changeset
|
67 } |
ee6b467c1a5f
Supply HGFileRevision with copy information when possible, calculate it otherwise
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
249
diff
changeset
|
68 return isCopy.booleanValue(); |
ee6b467c1a5f
Supply HGFileRevision with copy information when possible, calculate it otherwise
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
249
diff
changeset
|
69 } |
ee6b467c1a5f
Supply HGFileRevision with copy information when possible, calculate it otherwise
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
249
diff
changeset
|
70 /** |
ee6b467c1a5f
Supply HGFileRevision with copy information when possible, calculate it otherwise
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
249
diff
changeset
|
71 * @return <code>null</code> if {@link #wasCopied()} is <code>false</code>, name of the copy source otherwise. |
ee6b467c1a5f
Supply HGFileRevision with copy information when possible, calculate it otherwise
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
249
diff
changeset
|
72 */ |
ee6b467c1a5f
Supply HGFileRevision with copy information when possible, calculate it otherwise
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
249
diff
changeset
|
73 public Path getOriginIfCopy() { |
ee6b467c1a5f
Supply HGFileRevision with copy information when possible, calculate it otherwise
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
249
diff
changeset
|
74 if (wasCopied()) { |
ee6b467c1a5f
Supply HGFileRevision with copy information when possible, calculate it otherwise
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
249
diff
changeset
|
75 return origin; |
ee6b467c1a5f
Supply HGFileRevision with copy information when possible, calculate it otherwise
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
249
diff
changeset
|
76 } |
ee6b467c1a5f
Supply HGFileRevision with copy information when possible, calculate it otherwise
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
249
diff
changeset
|
77 return null; |
ee6b467c1a5f
Supply HGFileRevision with copy information when possible, calculate it otherwise
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
249
diff
changeset
|
78 } |
ee6b467c1a5f
Supply HGFileRevision with copy information when possible, calculate it otherwise
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
249
diff
changeset
|
79 |
345
58725dd511b3
Provide access to revision's origins
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
316
diff
changeset
|
80 /** |
58725dd511b3
Provide access to revision's origins
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
316
diff
changeset
|
81 * Access revisions this file revision originates from. |
58725dd511b3
Provide access to revision's origins
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
316
diff
changeset
|
82 * Note, these revisions are records in the file history, not that of the whole repository (aka changeset revisions) |
58725dd511b3
Provide access to revision's origins
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
316
diff
changeset
|
83 * In most cases, only one parent revision would be present, only for merge revisions one can expect both. |
58725dd511b3
Provide access to revision's origins
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
316
diff
changeset
|
84 * |
58725dd511b3
Provide access to revision's origins
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
316
diff
changeset
|
85 * @return parent revisions of this file revision, with {@link Nodeid#NULL} for missing values. |
58725dd511b3
Provide access to revision's origins
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
316
diff
changeset
|
86 */ |
354
5f9073eabf06
Propagate errors with exceptions up to a end client
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
345
diff
changeset
|
87 public Pair<Nodeid, Nodeid> getParents() throws HgInvalidControlFileException { |
345
58725dd511b3
Provide access to revision's origins
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
316
diff
changeset
|
88 if (parents == null) { |
58725dd511b3
Provide access to revision's origins
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
316
diff
changeset
|
89 HgDataFile fn = repo.getFileNode(path); |
58725dd511b3
Provide access to revision's origins
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
316
diff
changeset
|
90 int localRevision = fn.getLocalRevision(revision); |
58725dd511b3
Provide access to revision's origins
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
316
diff
changeset
|
91 int[] pr = new int[2]; |
58725dd511b3
Provide access to revision's origins
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
316
diff
changeset
|
92 byte[] p1 = new byte[20], p2 = new byte[20]; |
58725dd511b3
Provide access to revision's origins
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
316
diff
changeset
|
93 // XXX Revlog#parents is not the best method to use here |
58725dd511b3
Provide access to revision's origins
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
316
diff
changeset
|
94 // need smth that gives Nodeids (piped through Pool<Nodeid> from repo's context) |
58725dd511b3
Provide access to revision's origins
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
316
diff
changeset
|
95 fn.parents(localRevision, pr, p1, p2); |
58725dd511b3
Provide access to revision's origins
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
316
diff
changeset
|
96 parents = new Pair<Nodeid, Nodeid>(Nodeid.fromBinary(p1, 0), Nodeid.fromBinary(p2, 0)); |
58725dd511b3
Provide access to revision's origins
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
316
diff
changeset
|
97 } |
58725dd511b3
Provide access to revision's origins
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
316
diff
changeset
|
98 return parents; |
58725dd511b3
Provide access to revision's origins
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
316
diff
changeset
|
99 } |
58725dd511b3
Provide access to revision's origins
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
316
diff
changeset
|
100 |
354
5f9073eabf06
Propagate errors with exceptions up to a end client
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
345
diff
changeset
|
101 public void putContentTo(ByteChannel sink) throws HgDataStreamException, HgInvalidControlFileException, CancelledException { |
231
1792b37650f2
Introduced access to conflict resolution information (merge state)
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
102 HgDataFile fn = repo.getFileNode(path); |
1792b37650f2
Introduced access to conflict resolution information (merge state)
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
103 int localRevision = fn.getLocalRevision(revision); |
1792b37650f2
Introduced access to conflict resolution information (merge state)
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
104 fn.contentWithFilters(localRevision, sink); |
1792b37650f2
Introduced access to conflict resolution information (merge state)
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
105 } |
1792b37650f2
Introduced access to conflict resolution information (merge state)
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
106 |
316
ee6b467c1a5f
Supply HGFileRevision with copy information when possible, calculate it otherwise
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
249
diff
changeset
|
107 private void checkCopy() { |
ee6b467c1a5f
Supply HGFileRevision with copy information when possible, calculate it otherwise
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
249
diff
changeset
|
108 HgDataFile fn = repo.getFileNode(path); |
ee6b467c1a5f
Supply HGFileRevision with copy information when possible, calculate it otherwise
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
249
diff
changeset
|
109 try { |
ee6b467c1a5f
Supply HGFileRevision with copy information when possible, calculate it otherwise
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
249
diff
changeset
|
110 if (fn.isCopy()) { |
ee6b467c1a5f
Supply HGFileRevision with copy information when possible, calculate it otherwise
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
249
diff
changeset
|
111 if (fn.getRevision(0).equals(revision)) { |
ee6b467c1a5f
Supply HGFileRevision with copy information when possible, calculate it otherwise
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
249
diff
changeset
|
112 // this HgFileRevision represents first revision of the copy |
ee6b467c1a5f
Supply HGFileRevision with copy information when possible, calculate it otherwise
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
249
diff
changeset
|
113 isCopy = Boolean.TRUE; |
ee6b467c1a5f
Supply HGFileRevision with copy information when possible, calculate it otherwise
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
249
diff
changeset
|
114 origin = fn.getCopySourceName(); |
ee6b467c1a5f
Supply HGFileRevision with copy information when possible, calculate it otherwise
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
249
diff
changeset
|
115 return; |
ee6b467c1a5f
Supply HGFileRevision with copy information when possible, calculate it otherwise
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
249
diff
changeset
|
116 } |
ee6b467c1a5f
Supply HGFileRevision with copy information when possible, calculate it otherwise
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
249
diff
changeset
|
117 } |
ee6b467c1a5f
Supply HGFileRevision with copy information when possible, calculate it otherwise
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
249
diff
changeset
|
118 } catch (HgDataStreamException ex) { |
354
5f9073eabf06
Propagate errors with exceptions up to a end client
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
345
diff
changeset
|
119 // FIXME rather throw an exception than log silently |
5f9073eabf06
Propagate errors with exceptions up to a end client
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
345
diff
changeset
|
120 HgInternals.getContext(repo).getLog().error(getClass(), ex, null); |
5f9073eabf06
Propagate errors with exceptions up to a end client
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
345
diff
changeset
|
121 } catch (HgInvalidControlFileException ex) { |
316
ee6b467c1a5f
Supply HGFileRevision with copy information when possible, calculate it otherwise
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
249
diff
changeset
|
122 HgInternals.getContext(repo).getLog().error(getClass(), ex, null); |
ee6b467c1a5f
Supply HGFileRevision with copy information when possible, calculate it otherwise
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
249
diff
changeset
|
123 } |
ee6b467c1a5f
Supply HGFileRevision with copy information when possible, calculate it otherwise
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
249
diff
changeset
|
124 isCopy = Boolean.FALSE; |
ee6b467c1a5f
Supply HGFileRevision with copy information when possible, calculate it otherwise
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
249
diff
changeset
|
125 } |
231
1792b37650f2
Introduced access to conflict resolution information (merge state)
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
126 } |