diff options
author | Tor Norbye <tnorbye@google.com> | 2014-08-19 22:27:03 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2014-08-19 21:25:05 +0000 |
commit | 4ca751c002784c4bfd349cc5240b045b62277c80 (patch) | |
tree | dfc17b31990e2429535609b85f6d080c4fa0d9fe /plugins/svn4idea/src/org/jetbrains/idea/svn/rollback/SvnRollbackEnvironment.java | |
parent | 890d9a2952301682ffecaed4495f5f65c84c3642 (diff) | |
parent | 060e58b3afea3ea39f5ba1cb5a443ca3ebda28c8 (diff) | |
download | idea-4ca751c002784c4bfd349cc5240b045b62277c80.tar.gz |
Merge "Merge remote-tracking branch 'aosp/upstream-master' into merge"
Diffstat (limited to 'plugins/svn4idea/src/org/jetbrains/idea/svn/rollback/SvnRollbackEnvironment.java')
-rw-r--r-- | plugins/svn4idea/src/org/jetbrains/idea/svn/rollback/SvnRollbackEnvironment.java | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/plugins/svn4idea/src/org/jetbrains/idea/svn/rollback/SvnRollbackEnvironment.java b/plugins/svn4idea/src/org/jetbrains/idea/svn/rollback/SvnRollbackEnvironment.java index 237d05bd5f7a..7b09461b3766 100644 --- a/plugins/svn4idea/src/org/jetbrains/idea/svn/rollback/SvnRollbackEnvironment.java +++ b/plugins/svn4idea/src/org/jetbrains/idea/svn/rollback/SvnRollbackEnvironment.java @@ -34,6 +34,9 @@ import org.jetbrains.idea.svn.api.ProgressEvent; import org.jetbrains.idea.svn.api.ProgressTracker; import org.jetbrains.idea.svn.commandLine.SvnBindException; import org.jetbrains.idea.svn.info.Info; +import org.jetbrains.idea.svn.properties.PropertiesMap; +import org.jetbrains.idea.svn.properties.PropertyConsumer; +import org.jetbrains.idea.svn.properties.PropertyData; import org.tmatesoft.svn.core.*; import org.tmatesoft.svn.core.wc.*; import org.tmatesoft.svn.core.wc2.SvnTarget; @@ -100,7 +103,7 @@ public class SvnRollbackEnvironment extends DefaultRollbackEnvironment { }; final List<CopiedAsideInfo> fromToModified = new ArrayList<CopiedAsideInfo>(); - final Map<File, SVNProperties> properties = ContainerUtil.newHashMap(); + final Map<File, PropertiesMap> properties = ContainerUtil.newHashMap(); moveRenamesToTmp(exceptions, fromToModified, properties, collector); // adds (deletes) // deletes (adds) @@ -123,29 +126,29 @@ public class SvnRollbackEnvironment extends DefaultRollbackEnvironment { private void moveRenamesToTmp(List<VcsException> exceptions, List<CopiedAsideInfo> fromToModified, - final Map<File, SVNProperties> properties, + final Map<File, PropertiesMap> properties, final UnversionedAndNotTouchedFilesGroupCollector collector) { final Map<File, ThroughRenameInfo> fromTo = collector.getFromTo(); try { final File tmp = FileUtil.createTempDirectory("forRename", ""); - final ISVNPropertyHandler handler = new ISVNPropertyHandler() { + final PropertyConsumer handler = new PropertyConsumer() { @Override - public void handleProperty(File path, SVNPropertyData property) throws SVNException { + public void handleProperty(File path, PropertyData property) throws SVNException { final ThroughRenameInfo info = collector.findToFile(new FilePathImpl(path, path.isDirectory()), null); if (info != null) { if (!properties.containsKey(info.getTo())) { - properties.put(info.getTo(), new SVNProperties()); + properties.put(info.getTo(), new PropertiesMap()); } properties.get(info.getTo()).put(property.getName(), property.getValue()); } } @Override - public void handleProperty(SVNURL url, SVNPropertyData property) throws SVNException { + public void handleProperty(SVNURL url, PropertyData property) throws SVNException { } @Override - public void handleProperty(long revision, SVNPropertyData property) throws SVNException { + public void handleProperty(long revision, PropertyData property) throws SVNException { } }; @@ -181,7 +184,7 @@ public class SvnRollbackEnvironment extends DefaultRollbackEnvironment { private void moveGroup(final List<VcsException> exceptions, List<CopiedAsideInfo> fromTo, - Map<File, SVNProperties> properties) { + Map<File, PropertiesMap> properties) { Collections.sort(fromTo, new Comparator<CopiedAsideInfo>() { @Override public int compare(CopiedAsideInfo o1, CopiedAsideInfo o2) { @@ -240,8 +243,8 @@ public class SvnRollbackEnvironment extends DefaultRollbackEnvironment { applyProperties(properties, exceptions); } - private void applyProperties(Map<File, SVNProperties> propertiesMap, final List<VcsException> exceptions) { - for (Map.Entry<File, SVNProperties> entry : propertiesMap.entrySet()) { + private void applyProperties(Map<File, PropertiesMap> propertiesMap, final List<VcsException> exceptions) { + for (Map.Entry<File, PropertiesMap> entry : propertiesMap.entrySet()) { File file = entry.getKey(); try { mySvnVcs.getFactory(file).createPropertyClient().setProperties(file, entry.getValue()); |