Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Florent Angebault
subversive
Commits
a37a1f86
Commit
a37a1f86
authored
Jan 09, 2017
by
Florent Angebault
Browse files
fixup! Bugfix: Regression: branch comparison ignores local additions.
parent
4e4a77a8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
17 deletions
+15
-17
org.eclipse.team.svn.ui/src/org/eclipse/team/svn/ui/compare/ThreeWayResourceCompareInput.java
...pse/team/svn/ui/compare/ThreeWayResourceCompareInput.java
+15
-17
No files found.
org.eclipse.team.svn.ui/src/org/eclipse/team/svn/ui/compare/ThreeWayResourceCompareInput.java
View file @
a37a1f86
...
...
@@ -17,6 +17,7 @@ import java.io.IOException;
import
java.io.InputStream
;
import
java.util.Collection
;
import
java.util.HashMap
;
import
java.util.HashSet
;
import
java.util.Iterator
;
import
java.util.Map
;
...
...
@@ -238,30 +239,27 @@ public class ThreeWayResourceCompareInput extends ResourceCompareInput implement
public
void
initialize
(
IProgressMonitor
monitor
)
throws
Exception
{
Map
<
String
,
SVNDiffStatus
>
localChanges
=
new
HashMap
<
String
,
SVNDiffStatus
>();
Map
<
String
,
SVNDiffStatus
>
remoteChanges
=
new
HashMap
<
String
,
SVNDiffStatus
>();
Map
<
SVNDiffStatus
,
String
>
allChanges
=
new
HashMap
<
SVNDiffStatus
,
String
>();
HashSet
<
String
>
localOnly
=
new
HashSet
<
String
>();
SVNDiffStatus
[]
rChanges
=
this
.
remoteChanges
.
toArray
(
new
SVNDiffStatus
[
this
.
remoteChanges
.
size
()]);
SVNUtility
.
reorder
(
rChanges
,
true
);
for
(
Iterator
<
SVNDiffStatus
>
it
=
this
.
localChanges
.
iterator
();
it
.
hasNext
()
&&
!
monitor
.
isCanceled
();
)
{
SVNDiffStatus
status
=
it
.
next
();
localChanges
.
put
(
status
.
pathPrev
,
status
);
allChanges
.
put
(
status
,
status
.
pathPrev
);
}
for
(
Iterator
<
SVNDiffStatus
>
it
=
this
.
remoteChanges
.
iterator
();
it
.
hasNext
()
&&
!
monitor
.
isCanceled
();
)
{
SVNDiffStatus
status
=
it
.
next
();
String
localPath
=
this
.
getLocalPath
(
SVNUtility
.
decodeURL
(
status
.
pathPrev
),
this
.
rootAncestor
);
remoteChanges
.
put
(
localPath
,
status
);
allChanges
.
put
(
status
,
localPath
);
localOnly
.
add
(
status
.
pathPrev
);
}
SVNDiffStatus
[]
allChangedStatuses
=
allChanges
.
keySet
().
toArray
(
new
SVNDiffStatus
[
allChanges
.
size
()]);
SVNUtility
.
reorder
(
allChangedStatuses
,
true
);
HashMap
path2node
=
new
HashMap
();
String
message
=
SVNUIMessages
.
ResourceCompareInput_CheckingDelta
;
for
(
int
i
=
0
;
i
<
allChangedStatuses
.
length
&&
!
monitor
.
isCanceled
();
i
++)
{
SVNDiffStatus
status
=
allChangedStatuses
[
i
];
String
changePath
=
allChanges
.
get
(
status
);
monitor
.
subTask
(
BaseMessages
.
format
(
message
,
new
Object
[]
{
changePath
}));
this
.
makeBranch
(
changePath
,
localChanges
.
get
(
changePath
),
remoteChanges
.
get
(
changePath
),
path2node
,
monitor
);
ProgressMonitorUtility
.
progress
(
monitor
,
i
,
allChanges
.
size
());
for
(
int
i
=
0
;
i
<
rChanges
.
length
&&
!
monitor
.
isCanceled
();
i
++)
{
SVNDiffStatus
status
=
rChanges
[
i
];
String
localPath
=
this
.
getLocalPath
(
SVNUtility
.
decodeURL
(
status
.
pathPrev
),
this
.
rootAncestor
);
localOnly
.
remove
(
localPath
);
monitor
.
subTask
(
BaseMessages
.
format
(
message
,
new
Object
[]
{
localPath
}));
this
.
makeBranch
(
localPath
,
localChanges
.
get
(
localPath
),
status
,
path2node
,
monitor
);
ProgressMonitorUtility
.
progress
(
monitor
,
i
,
rChanges
.
length
);
}
for
(
String
localPath
:
localOnly
)
{
this
.
makeBranch
(
localPath
,
localChanges
.
get
(
localPath
),
null
,
path2node
,
monitor
);
}
this
.
findRootNode
(
path2node
,
this
.
rootLeft
,
monitor
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment