summaryrefslogtreecommitdiff
path: root/plugins/svn4idea
diff options
context:
space:
mode:
authorTor Norbye <tnorbye@google.com>2013-11-27 16:16:46 -0800
committerTor Norbye <tnorbye@google.com>2013-11-27 16:16:53 -0800
commitdabd634b4b52246dc992371eecb7e1e214463cff (patch)
tree172b13333aedc2fd9748ed125f1df96923a01588 /plugins/svn4idea
parent9c6f3112ffe942e4bb0b5d5d8476ce7014499650 (diff)
downloadidea-dabd634b4b52246dc992371eecb7e1e214463cff.tar.gz
Snapshot e2750ea61032f2a041cb012bb7b90cffa0deba73 from idea/133.124 of git://git.jetbrains.org/idea/community.git
e2750ea: plugin advertiser: filtering fixed 1cf8df9: [log] Fix possible race conditions in "Containing branches" 76b348c: [log] Don't display "Loading..." immediately, let a 300ms delay 25089af: [log] Show details panel by default (as it were in the old log) (cherry picked from commit 7ad802c) b1973f8: [log] More clear name for "Go To Ref" action (cherry picked from commit 73ae4b2) 5883fdd: [log] No need in "Copy Hash" action on the toolbar (cherry picked from commit 4d1e0c0) 686274a: [log] Don't hide "Go to ref" action when focus is not in the log 097f3f6: [log] IDEA-116470 Show "Contained in branches:" information in details 2d1d474: [log] extract SequentialLimitedLifoExecutor from DataGetter for reuse (cherry picked from commit 55ad98c) e99b08b: [git] Update the widget content on click. 22c88dc: Merge remote-tracking branch 'origin/133' into 133 8012a5f: svn: Implemented "Integrate Directory" action for command line (cherry picked from commit d86de0f) f3a11c0: svn: Added useAncestry option support to merge client (cherry picked from commit 2539615) 6893301: svn: Implemented "Integrate to Branch" for command line for the case when only some changes of revision are integrated (cherry picked from commit 5fdcd75) 569b12e: svn: Implemented support to copy files from repository to working copy (cherry picked from commit 6abd8f1) 153ae19: svn: Updated merge command for command line - ensured working directory used in output parsing corresponds to process working directory (cherry picked from commit 456ed31) 801bd9a: svn: Added event handler support to delete client (cherry picked from commit ba4ff98) ee2adfa: svn: Added dryRun option support to delete client (cherry picked from commit aacc6af) d71dd88: svn: Implemented "Integrate to Branch" for command line for the case when all changes of revision are integrated (cherry picked from commit 5f0fae5) ac66478: EA-51314 - Throw process start exception right in CommandExecutor.start() (without catching it and rethrowing later) (cherry picked from commit fb27e2c) fa0d29f: svn: @NotNull for client factories in SvnVcs (cherry picked from commit 5b4cb26) db0f895: IDEA-112787 Use peg revision when retrieving file content for given revision (as file url could not exist in repository anymore) (cherry picked from commit 9c46aac) 51ac252: IDEA-113732 Handled https 'certificate issued for a different hostname, issuer is not trusted' error for command line using SVNKit authentication lifecycle (cherry picked from commit ca01868) f071357: IDEA-114717 Combined supported formats for upgrade action from both svnkit and cmd client factories (cherry picked from commit c4af687) 49aa965: IDEA-113533 Combined supported formats for "share directory" from both svnkit and cmd client factories (cherry picked from commit 1ec26a7) dacf95f: IDEA-114718 Combined supported formats for checkout from both svnkit and cmd client factories (cherry picked from commit ccbb1fc) ba55a25: IDEA-113730 Reverted CmdContentClient implementation back - as export could not be used to get contents of scheduled for deletion file (cherry picked from commit 1baa4fa) 5bb0f15: IDEA-113730 Implemented content retrieval using export command (this eliminates encoding issues and correctly handle binary formats) (cherry picked from commit 30efd4e) 2136a71: svn: Unify credentials caching in memory logic for ssh and other protocols (cherry picked from commit 276f65a) 28dce65: IDEA-113860 Display dialog if credentials for certain repository are asked more than one time during single command execution (treat such situation as "previous credentials were wrong") (cherry picked from commit f9904cc) a0637d3: svn: Refactored "svn process finished" logic in CommandRuntime (method extractions) (cherry picked from commit 115f30b) a91376e: Python plugin for IDEA 13 CE 31bdea8: new inference: cache functional type to check a9669b2: respect search scope searching for constructor refs a341be1: new inference: lift containing class type parameters for method references 3a9e65e: IDEA-115275 (bundle compiler migrated from VFS to plain files) fd8ffc5: introduce multi-token nextTokenIs() ecf98a2: introduce boolean empty_element_parsed_guard_() c00e81a: introduce current_position_() 8e353b8: inverse COLLAPSE handling & sync GPUB with GK version a9173e8: new inference: raise a error when function type was not inferred (supposing well-formed type as free from wildcards) 6e88ca6: wildcards inside: fix for intersection types [^roma] 9e70662: new inference: propagate calculated substitutor to use in B3 reduction process bde1932: new inference: do not incorporate during B1 phase; TypeCompatibilityConstraint reduces to true for raw substitution and erase in this case method return type acb87d8: platform: partial refresh fixed a1f2815: temporary tests fix fbc56542: Some html contains wrong width and height for images 3b39cc8: don't let parentheses interfere with the "Redundant 'if' statement" inspection results (cherry picked from commit ea1016c)[CR-IC-3339] fc3a9e3: IDEA-116596 (New inspection: Exception printed using System.out.println()) (cherry picked from commit 6cf0e03)[CR-IC-3341] dc4bae4: fix typo (cherry picked from commit 7951492)[CR-IC-3343] d137dec: EA-50192 (IOOBE: CharArrayCharSequence.<init>) (cherry picked from commit d006433)[CR-IC-3345] 2013518: EA-51155 (IOOBE: CharArrayCharSequence.<init>) (cherry picked from commit 0c6d5f0)[CR-IC-3345] a8cfb98: EA-52004 (NPE: CyclicClassDependencyInspection.checkElement) (cherry picked from commit 148ca98)[CR-IC-3347] 141df67: Do not initialize docks in test mode 0f50ba8: plugins advertiser: ensure that installed plugin is not suggested (IDEA-116927) ddadbb2: plugin advertiser: suggest ultimate edition for bound plugins 4f8711f: NPE c56f91b: quickfix name (IDEA-116639) 48a86f0: new inference: testdata to prevent regression 0ca55f1: IDEA-116497 UI hang during index update [r=Eugene.Zhuravlev] (cherry picked from commit c12b687) 5538a24: IDEA-116929 [regression] Ant: after rewriting to DOM API create target quick fix is missing 1c6e2fa: fix one exception from IDEA-116497 02211ff: Merge remote-tracking branch 'origin/133' into 133 b62b0c7: advance bomb 1eaa394: enable softwraps for the text viewer f231438d3: don't search classes if there is dot in pattern 94066df: check 'idea.java.redist' property set to 'bundled-jdk' to distinguish patch for installation package with jdk from installation package without (cherry picked from commit 24bb6f8) [r=Roman.Shevchenko] 982cf87: Merge remote-tracking branch 'origin/133' into 133 6b7cf43: added idea.java.redist to the Info.plist d5e07c9: add examples to description (cherry picked from commit 239c72d)[CR-IC-3295] 6065680: clarify description (cherry picked from commit d2b8150)[CR-IC-3295] a14e046: clarify problem description (cherry picked from commit 1b9ba24)[CR-IC-3295] ca07b18: replacing an infinite do-while loop with a while loop shouldn't use trickery (cherry picked from commit a4236bf)[CR-IC-3302] e0222e7: tweak search match drawing on retina a little more room at the top for letters like 'l' and 'b' a little less room at the right side so the next letter is not overlapped (cherry picked from commit fc91f19)[CR-IC-3294] 2fe10c3: IDEA-112242 (Improve Suspicious Array Cast) (cherry picked from commit 2aff3c0)[CR-IC-3297] 26bb782: replacing infinite while loop with do-while doesn't need 'if' (cherry picked from commit 4403959)[CR-IC-3292] cee6e05: Retina for toolwindow icons 67ba106: Retina for general icons d390d6a: update threads icons 6aab513: IDEA-116318 Mercurial Log: on very first context menu invocation NewBranch etc actions are available 3dde521: [log] IDEA-116100 Fix Splitter leaks. (cherry picked from commit be23034) 7af7a77: [log] IDEA-116267 files -> items in the structure filter (cherry picked from commit f04ec34) ac02087: IDEA-116862 Added Maven Dependency (via Quick Fix) added with incorrect scope (cherry picked from commit 5ea19b4) +review CR-IC 6e5d827: better colors 261be38: redesign and add checkbox 0885584: NPE fix 0b81ddc: EA-45917 - IAE: RangeMarkerImpl.<init> 3134d93: introduce rawTokenIndex 7cbf6a4: API cleanup: deprecated methods dropped 7bba66d: revert f7b6bf3: do not search usages of removed constant fields in injected PSI b8222b1: Merge remote-tracking branch 'origin/133' into 133 3e2f9b3: FinderRecursivePanel: missing super.dispose() call (cherry picked from commit 3ae7fd7) [Sergey V.] 442ec47: FinderRecursivePanel#hasChildren() -> abstract (cherry picked from commit f61dc40) [Sergey V.] 177e277: NotNull 80f17eb: don't check script inside true html files #WEB-9833 fixed 99e3806: about: scheme handling via web reference #WEB-7451 fixed b674a63: fix inspired by http://crucible.labs.intellij.net/cru/CR-WS-252#c18049 (cherry picked from commit df14eec) CR-WS-252 baf171d: read access (cherry picked from commit d878e93) CR-WS-252 cdaee33: avoid using WolfTheProblemSolver.hasSyntaxErrors is possible, because it isn't designed to be a public API (cherry picked from commit 7459a38) CR-WS-252 723210d: filter out artificial 'documentChanged' events from FileDocumentManager#saveAllDocuments (cherry picked from commit 3538fec) CR-WS-251 8fdc49b: use Set for myEnabledDescriptors instead of List (as a side effect, not-thread-safe Set implementation is used, so there would be fewer locks) (cherry picked from commit 1685ef9) CR-WS-250 87fb9c6: code simplification (cherry picked from commit 7774de8) CR-WS-250 42f3d39: comment about syntax errors checking added (cherry picked from commit d841051) CR-WS-250 ea171ff: AutoTestManager improvements (cherry picked from commit 81e314d) CR-WS-250 70c6d4f: update tips d79089c: new icon be69651: new inference: include containing class params for constructor refs 6f0f160: new inference: testdata 5917752: new inference: incomplete methods ready e1af6d1: new inference: highlight method refs with incompatible inferred bounds aaeafcd: new inference: include lifting constraint when parent call is being investigated 705b136: EA-41668 (diagnostic) ad7d125: RUBY-14570: fixing strings according to proofreading results. (reviewed by Dennis Ushakov) (cherry picked from commit dcbce74) a6fa4dd: revert changes to fix problem with saving settings when WriteExternalException is thrown 16fa8ed: Merge remote-tracking branch 'origin/133' into 133 77fd50d: add FinderRecursivePanel#isEditable() (cherry picked from commit f4edcef) [Sergey V.] 2c05449: add @since (cherry picked from commit c8a0a87) [Sergey V.] 3cac5cd: add @since (cherry picked from commit 54cd711) [Sergey V.] 3a48f18: turn jump lists on 15e1246: IDEA-116833 External System: clear orphan project libraries (cherry picked from commit 2e9d7fa) 818211a: IDEA-116833 External System: clear orphan project libraries (cherry picked from commit 0bd5325) bcb50e2: better method naming, assertion conditions correction; reliably process events posted to debugger manager thread on its termination 0a82e6f: green code [^Cébron] 922ecfc: Search fields: native border visual glitch 6aa231d: Merge remote-tracking branch 'origin/133' into 133 d2ee881: IDEA-111161 Flat tool window design[reviewed by kb] 7058df1: test added e6ca2e3: IDEA-116727: Excluded library directories: removing a root does not removes its excludes [rev by peter] c1dcedd: IDEA-116713: Excluded library directories: it's possible to exclude the same directory twice [rev by peter] 891b1a0: IDEA-116708: Excluded library directories in jar: a) show what is excluded; b) allow to include them back [rev by peter] c9a0bfd: IDEA-115760: Spring: create class intentions should not create class in 'generated sources' roots [rev by Yann] d7d7c8b: disable 'mark directory as resource root' action for Flex modules (IDEA-114866) [rev by A. Doroshko] fbb9c55: improved layout of 'setup detected frameworks' dialog (IDEA-73513) [rev by kb] 837fc35: new inference: skip null subtypes f764e69: new inference: avoid one type parameter inference 47474aa: method refs: take ref type arguments into account e631676: new inference: accept Object/null type argument equivalence ff73c51: new inference: do not instantiate vars with upper bounds mix when incomplete substitutor is supposed b8f99ce: remove unnecessary setting (cherry picked from commit b2f25d8)[CR-IC-3280] ffaafcd: IDEA-116328 (Method can be variable arity method inspection should not highlight for @Nullable parameters) (cherry picked from commit 1522798)[CR-IC-3280] bac0808: fit value rectangle 219fda3: simplify visitors (cherry picked from commit eeba354)[CR-IC-3296] 62bb0b6: IDEA-116393 ("java.lang.Error not rethrown" false negative for multi-catch) (cherry picked from commit 13f480a)[CR-IC-3296] e7a53d8: platform: detect case-only name changes in case-insensitive FS only b3e535c: Merge remote-tracking branch 'origin/133' into 133 4670ddf: intersection types for PsiTypeVisitor; do not convert intersection type to class type even when no actual substitution is needed a290c35: lambda: break/continue inside lambda body checks e94cddb: new inference: temp solution for inexact method refs 04056c0: new inference: infer from thrown exceptions in lambda body 179dfcf: FinderRecursivePanel*Test: split, fix broken commit (cherry picked from commit 62cbb8c) CR-IC-3275 eaeb011: FinderRecursivePanel: cleanup, @Nullable (cherry picked from commit 875ccbd) CR-IC-3276 1898456: test names (cherry picked from commit e90eef2) CR-IC-3275 02fa61b: FinderRecursivePanel*Test: split (cherry picked from commit 62cbb8c) CR-IC-3275 2612e6d: cleanup, assertions (cherry picked from commit a54ff04) CR-IC-3275 426f2cc: IDEA-116731 IntelliJ theme: Database Connections dialog: Scope combobox is too narrow IDEA-116768 IntelliJ theme: text end is too close to combobox button 3061aac: IDEA-116343 IntelliJ theme: selected radio button is misplaced bd0a4cc: IDEA-116346 IntelliJ theme: comboboxes have darker background 52df353: Gradle: basic detection of test resource folders added (cherry picked from commit 40a3f43) d00ec91: IDEA-116097 Gradle: Code Completion for dependencies doesn't work inside brackets (cherry picked from commit 874cc0e) 984cdfb: IDEA-97696 Custom tool windows layout is lost on exiting IDE with closed projects 76bab4d: lambda: void-compatibility check for expression's lambda void type conditional 057bd4d: new inference: lift type params from referenced method c21ac7a: new inference: accept all inexact refs during overload resolution 17ac3a2: consider variable prefixes from code style settings (cherry picked from commit dd2be1e) ce3afc6: Classes moved c965483: EA-52111 (diagnostic) dd54952: unbalanced markers fix and also some sqlite grammar cleanup cf6d247: Merge remote-tracking branch 'origin/133' into 133 ccacf897: new inference: overload resolution: check return types when method refs are exact 2bbd45e: new inference: overload resolution: check SAM specific withing common specific check a127d80: constructor refs: forbid raw constructor references with explicit new type args 72a410e: new inference: refinement on generics array creation/forbid wildcards in ClassType qualifier 04d138d: fix user completion popup dimensions + add empty border 2e9decb: turn logging on c3ba0da: fix color 01322ad: remove border 9311e96: IDEA-116701 ISE at com.intellij.psi.impl.PsiToDocumentSynchronizer.a (cherry picked from commit d7a0fe6) +review CR-IC 586c431: IDEA-116350 IntelliJ theme: file settings tree views colors are misplaced f025467: don't get compiled file text to diagnose stub-psi mismatch (IDEA-115736) (cherry picked from commit 1ac6cf0) c9ad9cb: Email info parsing fixed 218e6fc: GitIntegrationEnablerTest changed to java test 7ae0a7f: Show branch name only once in case of multiple heads ( in status bar widget and log branch filter). (cherry picked from commit eb5911c) 2b1dc24: IDEA-116241 filtering by structure supported in Mercurial log (cherry picked from commit 2155e52) b656970: Annotation for HgRepoInfo changed (cherry picked from commit 88ad884) 3f1adbe: Parse username and user email if it is possible. (cherry picked from commit 35597e5) f94b1f7: Problem with annotation user fixed b799f63: Gradle: update to Gradle 1.9 (cherry picked from commit 8975b3d) 12f4526: External system: project import builder fix (cherry picked from commit 5b01566) df6f25d: simplify by extending ActionsTopHitProvider 613c358: + private static final 238d1ba: vcs top hits ccb7628: bae class for action hits 3ca8354: External system: not serializable com.intellij.util.containers.ContainerUtilRt$EmptyList replaced with Collections.emptyList (cherry picked from commit cb7367d) 7186665: External system: not serializable com.intellij.util.containers.ContainerUtilRt$EmptyList replaced with Collections.emptyList (cherry picked from commit 890c7d0) 742ea95: unchecked generics array creation for method references c59e6be: lambda: void-compatibility check for expression's lambda refined aca9abc: new inference: forget old instantiations before reduction (need for incorporation) 983f865: Merge branch '133' of git.labs.intellij.net:idea/community into 133 13dc257: IDEA-115689 - IU-132.844. Heroku AS web app deployment link (cherry picked from commit aad94bb) 40d9d1e: show indexed file names in progress for internal mode 199fb40: IDEA-115702 DomAnchorImpl exception: reverted 37471fd: Merge remote-tracking branch 'origin/133' into 133 83a7df9: Gradle: IDEA-116166 Cannot re-import or refresh gradle project (cherry picked from commit 10dc037) 74e1d12: External system: prepare data in project import builder for import (cherry picked from commit 6880758) a5479a6b: Gradle: basic codeinsight for Gradle IdeaPlugin script block (cherry picked from commit 95e6103) 2e58f53: Gradle: IDEA-115169 EAP Cardea Gradle Integration does not detect additional source folders (cherry picked from commit 07b62d0) 7b7ef8a: Hides "Use auto-import" checkbox in the "Import Project" dialog. cc47de8: Gradle: fix issue with Gradle Tooling API classpath inferer (cherry picked from commit 0529611) cd7f5c9: Gradle: fixed IndexNotReadyException for MavenProjectIndicesManager usage in startup activity (cherry picked from commit d65b254) 029d63b: Gradle: war artifact configuration IDEA-109369 External system: Correct WAR artifact setup on external system config change (cherry picked from commit 9249c20) 7f7ef8c: [log] Improve javadoc (cherry picked from commit 2f3154a) 9ee02d2: [log] Fix one more commit/author time mixture in commit details panel (cherry picked from commit 3611dc0) e816830: [log] Use commit time instead of author time. Step 4. Update the filter (cherry picked from commit a673c02) 4fdcc92: [log] Use commit time instead of author time. Step 3. Actual change. f9b1ead: [log] Use commit time instead of author time. Step 2. Renaming. ea7d884: [log] Using commit time instead of author time. Step 1. Renaming. deefd68: wait for user input out of read action (IDEA-115944, consequence of IDEA-115258) (cherry picked from commit 7035aa0) [r=Peter.Gromov, Alexey.Kudravtsev, Denis.Fokin] 5e160e1: another fix for EA-49431 - PEBCE: PersistentEnumeratorBase.<init> (cherry picked from commit 5b09102) [r=Peter.Gromov] c07ba66: EA-51558 - assert: PersistentHashMap.updateValueId (cherry picked from commit f679ad3) 4a52b94: IDEA-115702 DomAnchorImpl exception b26fd32: avoided using JobLauncher for file downloading (CR-IC-3079) [rev by cdr] a29c466: IDEA-114804 File types mapped to text are not remapped when corresponding plugin is installed 4a74f25: IDEA-115702 DomAnchorImpl exception: element stubs indexed 90551b1: IDEA-111020 Status bar changes its height when progress is shown 61d37cc: frameworks step removed for Groovy modules e8700ce: Merge remote-tracking branch 'origin/133' into 133 9c41270: new inference: reject methrefs with inconsistent number of parameters 4869294: eliminate SOE 88a05f0: fix SOE 10eae5d: Merge branch '133' of git.labs.intellij.net:idea/community into 133 7f0473c: IDEA-116521 - Heroku deployment facet: application by sample creation doesn't work (cherry picked from commit 65520cb) 32ab75d: replace obsolete myFileType/lexer-highlighting with ConsoleViewUtil.printAsFileType 58ba5b9: replace obsolete myFileType/lexer-highlighting with ConsoleViewUtil.printAsFileType 849b0ee: Merge remote-tracking branch 'origin/133' into 133 bb08b50: check bounds should ignore recursive substitution also when wildcard is captured 52bf5c3: new inference: raise a conflict for 2 captured wildcards as equality constraints 76727c7: new inference: javac bug registration (JDK-8028503) 7dc1d22: new inference: cleanup ff37a13: new inference: accept unbounded wildcards 058d446: remove external annotation root duplicates resulting by several modules using the same sdk (cherry picked from commit 5e48524) d152a96: no completion variants after class name and dot in javadoc (IDEA-116520) (cherry picked from commit 3b6995e) 0de6266: catch unexpected exception e60df2d: LiveTemplates: Fix broken API (cherry-picked from 496e519) d6de864: Templates: add diagnostic info (cherry-picked from 01525be) 97ffb4a: IDEA-116271 groovy autocomplete tries to complete in /* */ comments (cherry picked from commit 973fd26) [reviewer=Peter] 3cc8b99: IDEA-115699 Groovy: "Convert to Singleline Literal" intention shouldn't be shown for single-line slashy and dollar-slashy string literals (cherry picked from commit 80755bd) [reviewer=Peter] 3b575e0: IDEA-113152 Groovy: In-Place Introduce Refactoring: PIEAE at GrCodeReferenceElementImpl.multiResolve() (cherry picked from commit f81d6b8) [reviewer=Peter] b347c77: disable tracing for the release [r=Peter.Gromov] 9e5789e: return back custom maven index restoration upon corruption, only avoid logging exception when persistent enumerator version was upgraded (cherry picked from commit c88b649) [r=Peter.Gromov] ec5ba24: throw VersionUpdatedException if existing enumerator wasn't dirty, there is no need to report it for example (cherry picked from commit 28e3c0d) [r=Peter.Gromov] 403f9a5: fix NPE [^Ann] 0270a8b: [^peter] simple testdata (cherry picked from commit ab04a9d) 5cba3bf: disposed check e2be35a: IDEA-116348 IDEA 13 starts with toolbar and Project structure toolbar hidden fc628f7: remove stack trace 20382de: exception fix 79c1443: extract vars to find NPE 755fa4d: EA-47212 (cherry picked from commit 715d14c) e0a08ba: cleanup (cherry picked from commit 036e287) b4cf9ff: EA-51728 (cherry picked from commit 6f31031) b0465b7: cleanup (cherry picked from commit 50501f2) e3ac306: import new .iml file into community project (cherry picked from commit 22f4b6a) 0e25bde: switch off content cache (low hit rate) to save some memory dc1b25b: new inference: array creation notional method; testdata 67c4f18: IDEA-116503 (some improvements to Unix shell scripts) dbc986a: new inference: method constructor array reference processing 03f17f1: Cleanup (misplaced test data) 47c5ecb: IDEA-115580 (path selector for idea-CE.zip build as part of UE) 8fe7d44: Cleanup (code reuse) f07bb28: Cleanup (overspecified class) ba46610: new inference: use policy to pass that params should be lifted without Object assignment 74040e6: Use Condition instead of a BooleanFunction. 7d156be: [git] IDEA-109511 Quick-fix of "Git Add" for tracked files. 034dffc: [log] Remove unused methods & fields 9203746: [log] Better approach to details filtering 259a953: NPE [^roman] 3d028a8: new inference: isValueCompatible check during reduce (IDEA-116548) d4939f7: extend testdata for IDEA-93587 78c98d7: testdata for IDEA-106670 bd1ca68: testdata for IDEA-116359 263652d: testdata for IDEA-116252 df5240e: IDEA-116503 (line separators in inspect.sh in Mac distributions fixed) f8ab566: enable new inference for 1.8 d2cbf3f: switch tests on new inference 0f6538f: new inference: array constructor refs are always exact (IDEA-115725) 18c175e: new inference: process type arguments withing bounds 0bce395: lambda: catch exception by SAM method substitution (IDEA-116441) 9270256: testdata for IDEA-116493 d83860b: new inference: preserve the order 34e2bd9: by default use breakpoint location filtering in java files with "java" language only: (IDEA-116518 AspectJ support. Add breakpoint handling) e4d940a: IDEA-116415 Event log: all notifications before its opening get the timestamp of the opening 9cfb433: set timeout to 30 secs a2f8611: fixed "enterprise view" providers 80cc211: new inference: unintended raw substitutor ad536ed: disable tests for a while 1ae5a89: new inference: reject wrong overloaded methods earlier 3a660f4: new inference: merge equals constraints before rejection a2d6c53: new inference: skip wildcards in SAM return types f971c6f: new inference: include constraint without input variables first 3624126: new inference: simplify check for call expression 8ce52d2: new inference: do not skip contradicted bounds 7a69368: new inference: input/output variables strictly after spec a66cfe3: new inference: is poly expression strictly after spec d157345: new inference: is pertinent to applicability strictly after spec c1c6e16: new inference: equals/hashcode for final fields only da23c9e: CR-IC-2986 MessageBuilder (cherry picked from commit dfef0e3) 88d62d0: module util must not depends on Guava (incorrect usage was moved to platform-impl UriUtil) +review (cherry picked from commit c161577) 62c8def: cleanup (cherry picked from commit fcddb47) 6e5e574: continue "open actual script source" extract common code to XSourcePositionWrapper (cherry picked from commit e452798) 715476e: Merge remote-tracking branch 'origin/133' into 133 fa7a25b: fix hardcoded completion popup bg c3728ef: EA-51231 (diagnostic) 47919e5: Fix broken Grails debug. (cherry picked from commit 778380c) +review CR-IU @gromopetr 141c8d9: IDEA-116324 IDEA 13 compiler uses some old xmx setting 012ef05: Made Run-configuration-related keys public. 1deeedd: [^ann] faster simple accessor folding check (cherry picked from commit d0dbf33) 705ea0c: EA-51924 (log corrupted .jar files) 0bb3b89: IDEA-116422 Tweak "Drag'n'Drop" wording (cherry picked from commit 821627d) e3e9641: [^jeka] ant create property cosmetics (cherry picked from commit 8d6e8b8) c5c7aa0: edit contract for the compiled element, not its source (cherry picked from commit ec0ee95) 4c6a3a4: avoid using CharBuffer.subSequence() because its signature is different in jdk6/7 (cherry picked from commit 6516b9a) 628b5e6: test: utility method extracted cede033: retina support for tips images a0790d2: move to resources-en dc27602: make 'No matches' bold (cherry picked from commit baff9f0) 3fc5b39: installer fixes (cherry picked from commit 323d9b1) 06fa0f4: ignore width and height in img tag (cherry picked from commit f39c910) 42de439: fix installer (cherry picked from commit 5222ad0) 684b890: inference testdata fixed 88a43e9: CCE in scala f8981f9: IDEA-116445 IntelliJ laf: Menu bar is hardly visible on Linux 53c9455: merge AntMissingPropertyInspection into more general AntResolveInspection c54a1ff: fix typo that broke GeneralCodeFormatterTest 7017ba9: new inference: check all overload methods during return type constraint detection a14b996: new inference: capture return type to emulate method call expression type d8c3c25: plugins advertiser: ensure before open files 72dcb6d: new inference: process mutual dependencies 84fe967: IDEA-116362 ignore extension does not work e7e85da: [by the patch from opticyclic] quick fix to create a property from unresolved property reference (IDEA-57875) 2be66db: IDEA-116431 IntelliJ laf: menu shortcuts are invisible 908d8bb: Merge branch '133' of git.labs.intellij.net:idea/community into 133 0190407: correctly handle inner classes removal ec424bc: update tips resources 1c1ae34: update camel case in goto tips 4bc25fc: update camel completion tips 96c7ada: update annotations tips 48b5cc7: support for retina and darcula images 4ad79a0: IDEA-116371 (NPE in BrowserUtil fixed) a83a74a: platform: prematurely deprecated API returned 47bd36d: 133 branch 4496371: testdata 864e969: new inference: infer till B1 d7b4a43: new inference: proper type subtyping c1bb35e: new inference: extract B1 step af47d9b: new inference: use type arguments during reduction 8a5dfad: new inference: accept methods in lambda return statements as standalone when they do not depend on lambda params 90580d9: new inference: fair reject Object 95b1490: Cleanup (extra spaces) 2812059: test: FS refresh on Unicode paths 5ab0c45: catch invalid lookup elements early 0d6bff8: consider call & chain elements invalid when substitutor is invalid (EA-47282 - PIEAE: PsiUtilCore.ensureValid) 82791bd: don't display quick doc for invalid lookup element (EA-51188) 98ed246: don't create lookup elements for invalid PSI (EA-49434) fc45519: cosmetics 80becf8: Merge branch 'svn_18_2' 0645f01: svn: Force checking if command was cancelled before repeating it once again (in case some auth failure) 9134cc6: Merge remote-tracking branch 'origin/master' 0f655ea: Merge remote-tracking branch 'origin/master' 3592fec: Merge branch 'svn_18_2' 0605480: Fix windows path detection for remote files (PY-11303). 5c14653: moving ant-related icons under ant plugin; IDEA-34889 Provide dedicated icon for ANT build.xml files 3c69bd1: disposed check dad581f: possible NPE fix 1aa7c11: unsupported operation notification 4b56193: add diagnostics for PIEAE in StubBasedPsiElementBase.getContainingFile (EA-48734) 2851c2b: OpenShift integration - logs 8c751be: svn: Do not handle possible authentication errors (from process output) if command was manually cancelled 9fe9708: IDEA-115978 Removed repository url from CommonProxy.myNoProxy when retrieving proxy for command line commands 547d5b7: svn: Added logging for proxy logic (when repository url is null for command) 8c6e9ba: new inference: forget about captured variables 68ca073: logging 3198533: IDEA-116121 Split user name and email 0975a20: test: filter for parasitic events caused by overflow 10e37f5: Merge remote-tracking branch 'origin/master' c6bc240: correctly attach leading comment to statement list (PY-1909) 03fe0f4: if there happens to be a line break inside a qualified reference, make sure we add an indent (PY-6359) 0ac83c3: Merge branch 'svn_18_2' 2d07493: don't indent comments following a statement list (PY-9542) 330dfc0: "remove trailing blank lines" quickfix (PY-9008) 952f1b8: IDEA-116164 Wrong groovy's formatting for label indents with strings bfc761d: allow wrapping in imports (PY-9163) 4a8a702: StringBuffer -> StringBuilder 7251fe9: extract method 624729a: WI-14476 When hovering over variable, Expression Evaluation tooltip disappears before I can click the + icon (move ignore_mouse_tracking constant to EditorImpl) 28109ef: test using DocumentFormattingModel fdfb56f: pass ASTNode at caret to WhiteSpaceFormattingStrategy.adjustWhiteSpaceIfNecessary(); use that to correctly insert \ when a line break is inserted via the document formatting model (PY-10319) c773e81: IDEA-116240 filtering by date supported in Mercurial Log edfe3bb: IDEA-116162 Wrong groovy's formatting for Spaces with Regular Expression Operators 1974e82: find file in read action d19e9dc: WEB-6569 Hide internal Chrome scripts 37ee1dd: Exception: additional logging ade3e46: PythonEnterHandler walks AST instead of offsets to check if it needs to insert backslash 678ffa7: correct place for formatter tests 8409dd6: IDEA-115703 Groovy: reference to $this is not resolved inside slashy and dollar slashy strings 9b02d5a: test: diagnostic b5165ed: scrolling by keyboard should work as usual in lookups (IDEA-115199) 7050e7b: java: inspection UI moved to platform 45014ca: Dictionary extended 163e8e9: IDEA-116291 New Mercurial log: Details not correct and garbled 5622082: java: deprecated APIs dropped 32d3d6d: util: deprecated APIs dropped bc6f090: java: deprecated APIs dropped 1efaeea: platform: deprecated APIs dropped 40e3be3: Disabling menu until resolution of IDEA-116284. 96eff49: IDEA-115877 Pasting code which needs to be imported isn't imported 6c72ccc: IDEA-116161 Wrong groovy's formatting for Blank Lines with Javadoc 0bd5835: prefer tag own attributes over common ones #WEB-9900 fixed 3fb7f32: allow to ignore usages from generated file in 'Safe Delete' (IDEA-97579) c3f7b37: option not to reformat created groovy file c3de0e6: option not to reformat created groovy file 95e5095: create new file of groovy file type 66a1e22: GrClassInitializer is a class member db58121: GroovyPsiElementFactory: create field 7f5b300: introduce DelegatingFormattingModel class; use it for XSLT formatting 020e3eb: svn: Implemented "save authentication" for ssh protocol bd58f4f: svn: Removed implemented TODO items a2bfb77: svn: Basic cancel behavior for command line commands 7fe4ee0: svn: Refactored TerminalProcessHandler - method extractions 1749911: svn: terminal: Filter process output before passing it to prompt handlers (mainly for windows platform) faab75c: svn: terminal: Apply escape codes and \r chars filtering only for windows platform fae4c58: svn: terminal: Remove only unnecessary \r chars and not all whitespace chars (while processing terminal escape codes) 2146067: svn: Simplified InfoCommandRepositoryProvider implementation - get info only for file targets 36edb63: svn: Fixed exception if repository url is null when executing command under terminal Change-Id: I93b5894ac792fd3267327870ab50b4503359b5e9
Diffstat (limited to 'plugins/svn4idea')
-rw-r--r--plugins/svn4idea/src/org/jetbrains/idea/svn/SvnConfiguration.java1
-rw-r--r--plugins/svn4idea/src/org/jetbrains/idea/svn/SvnFileSystemListener.java2
-rw-r--r--plugins/svn4idea/src/org/jetbrains/idea/svn/SvnVcs.java14
-rw-r--r--plugins/svn4idea/src/org/jetbrains/idea/svn/actions/ShareProjectAction.java2
-rw-r--r--plugins/svn4idea/src/org/jetbrains/idea/svn/api/InfoCommandRepositoryProvider.java21
-rw-r--r--plugins/svn4idea/src/org/jetbrains/idea/svn/checkin/IdeaSvnkitBasedAuthenticationCallback.java108
-rw-r--r--plugins/svn4idea/src/org/jetbrains/idea/svn/checkin/SvnCheckinEnvironment.java2
-rw-r--r--plugins/svn4idea/src/org/jetbrains/idea/svn/checkout/SvnCheckoutProvider.java30
-rw-r--r--plugins/svn4idea/src/org/jetbrains/idea/svn/commandLine/AuthenticationCallback.java6
-rw-r--r--plugins/svn4idea/src/org/jetbrains/idea/svn/commandLine/CertificateCallbackCase.java5
-rw-r--r--plugins/svn4idea/src/org/jetbrains/idea/svn/commandLine/Command.java12
-rw-r--r--plugins/svn4idea/src/org/jetbrains/idea/svn/commandLine/CommandExecutor.java39
-rw-r--r--plugins/svn4idea/src/org/jetbrains/idea/svn/commandLine/CommandRuntime.java96
-rw-r--r--plugins/svn4idea/src/org/jetbrains/idea/svn/commandLine/ProxyCallback.java5
-rw-r--r--plugins/svn4idea/src/org/jetbrains/idea/svn/commandLine/ProxyModule.java5
-rw-r--r--plugins/svn4idea/src/org/jetbrains/idea/svn/commandLine/TerminalProcessHandler.java31
-rw-r--r--plugins/svn4idea/src/org/jetbrains/idea/svn/commandLine/TerminalSshModule.java32
-rw-r--r--plugins/svn4idea/src/org/jetbrains/idea/svn/content/CmdContentClient.java2
-rw-r--r--plugins/svn4idea/src/org/jetbrains/idea/svn/copy/CmdCopyMoveClient.java22
-rw-r--r--plugins/svn4idea/src/org/jetbrains/idea/svn/copy/CopyMoveClient.java7
-rw-r--r--plugins/svn4idea/src/org/jetbrains/idea/svn/copy/SvnKitCopyMoveClient.java19
-rw-r--r--plugins/svn4idea/src/org/jetbrains/idea/svn/delete/CmdDeleteClient.java24
-rw-r--r--plugins/svn4idea/src/org/jetbrains/idea/svn/delete/DeleteClient.java4
-rw-r--r--plugins/svn4idea/src/org/jetbrains/idea/svn/delete/SvnKitDeleteClient.java10
-rw-r--r--plugins/svn4idea/src/org/jetbrains/idea/svn/dialogs/BranchMerger.java4
-rw-r--r--plugins/svn4idea/src/org/jetbrains/idea/svn/dialogs/CopiesPanel.java9
-rw-r--r--plugins/svn4idea/src/org/jetbrains/idea/svn/dialogs/SvnFormatWorker.java13
-rw-r--r--plugins/svn4idea/src/org/jetbrains/idea/svn/history/SvnRepositoryContentRevision.java5
-rw-r--r--plugins/svn4idea/src/org/jetbrains/idea/svn/integrate/CmdMergeClient.java4
-rw-r--r--plugins/svn4idea/src/org/jetbrains/idea/svn/integrate/MergeClient.java1
-rw-r--r--plugins/svn4idea/src/org/jetbrains/idea/svn/integrate/Merger.java25
-rw-r--r--plugins/svn4idea/src/org/jetbrains/idea/svn/integrate/PointMerger.java43
-rw-r--r--plugins/svn4idea/src/org/jetbrains/idea/svn/integrate/SvnKitMergeClient.java3
-rw-r--r--plugins/svn4idea/src/org/jetbrains/idea/svn/treeConflict/MergeFromTheirsResolver.java18
-rw-r--r--plugins/svn4idea/src/org/jetbrains/idea/svn/update/AbstractUpdateIntegrateCrawler.java6
-rw-r--r--plugins/svn4idea/src/org/jetbrains/idea/svn/update/SvnIntegrateEnvironment.java16
36 files changed, 448 insertions, 198 deletions
diff --git a/plugins/svn4idea/src/org/jetbrains/idea/svn/SvnConfiguration.java b/plugins/svn4idea/src/org/jetbrains/idea/svn/SvnConfiguration.java
index f9940f7dfefa..e4eb988bad22 100644
--- a/plugins/svn4idea/src/org/jetbrains/idea/svn/SvnConfiguration.java
+++ b/plugins/svn4idea/src/org/jetbrains/idea/svn/SvnConfiguration.java
@@ -607,6 +607,7 @@ public class SvnConfiguration implements PersistentStateComponent<Element> {
myIsUseDefaultProxy = isUseDefaultProxy;
}
+ // TODO: Rewrite AutoStorage to use MemoryPasswordSafe at least
public static class AuthStorage implements ISVNAuthenticationStorage {
private final Map<String, Object> myStorage = Collections.synchronizedMap(new HashMap<String, Object>());
diff --git a/plugins/svn4idea/src/org/jetbrains/idea/svn/SvnFileSystemListener.java b/plugins/svn4idea/src/org/jetbrains/idea/svn/SvnFileSystemListener.java
index f637d9be4d70..5727458ad9d9 100644
--- a/plugins/svn4idea/src/org/jetbrains/idea/svn/SvnFileSystemListener.java
+++ b/plugins/svn4idea/src/org/jetbrains/idea/svn/SvnFileSystemListener.java
@@ -544,7 +544,7 @@ public class SvnFileSystemListener extends CommandAdapter implements LocalFileOp
@Override
protected void executeImpl() throws SVNException {
try {
- vcs.getFactory(file).createDeleteClient().delete(file, force);
+ vcs.getFactory(file).createDeleteClient().delete(file, force, false, null);
}
catch (VcsException e) {
wrapAndThrow(e);
diff --git a/plugins/svn4idea/src/org/jetbrains/idea/svn/SvnVcs.java b/plugins/svn4idea/src/org/jetbrains/idea/svn/SvnVcs.java
index ccf779121799..f92ad158e025 100644
--- a/plugins/svn4idea/src/org/jetbrains/idea/svn/SvnVcs.java
+++ b/plugins/svn4idea/src/org/jetbrains/idea/svn/SvnVcs.java
@@ -203,8 +203,8 @@ public class SvnVcs extends AbstractVcs<CommittedChangeList> {
};
private SvnCheckoutProvider myCheckoutProvider;
- private final ClientFactory cmdClientFactory;
- private final ClientFactory svnKitClientFactory;
+ @NotNull private final ClientFactory cmdClientFactory;
+ @NotNull private final ClientFactory svnKitClientFactory;
private final boolean myLogExceptions;
@@ -1415,6 +1415,16 @@ public class SvnVcs extends AbstractVcs<CommittedChangeList> {
}
@NotNull
+ public ClientFactory getOtherFactory() {
+ return myConfiguration.isCommandLine() ? svnKitClientFactory : cmdClientFactory;
+ }
+
+ @NotNull
+ public ClientFactory getOtherFactory(@NotNull ClientFactory factory) {
+ return factory.equals(cmdClientFactory) ? svnKitClientFactory : cmdClientFactory;
+ }
+
+ @NotNull
public ClientFactory getCommandLineFactory() {
return cmdClientFactory;
}
diff --git a/plugins/svn4idea/src/org/jetbrains/idea/svn/actions/ShareProjectAction.java b/plugins/svn4idea/src/org/jetbrains/idea/svn/actions/ShareProjectAction.java
index e4c14693f6eb..c8779c512331 100644
--- a/plugins/svn4idea/src/org/jetbrains/idea/svn/actions/ShareProjectAction.java
+++ b/plugins/svn4idea/src/org/jetbrains/idea/svn/actions/ShareProjectAction.java
@@ -167,7 +167,7 @@ public class ShareProjectAction extends BasicAction {
indicator.setText(SvnBundle.message("share.directory.checkout.back.progress.text", checkoutUrl.toString()));
}
- final ClientFactory factory = activeVcs.getFactoryFromSettings();
+ final ClientFactory factory = SvnCheckoutProvider.getFactory(activeVcs, format);
factory.createCheckoutClient()
.checkout(SvnTarget.fromURL(checkoutUrl), path, revision, SVNDepth.INFINITY, false, false, format, null);
diff --git a/plugins/svn4idea/src/org/jetbrains/idea/svn/api/InfoCommandRepositoryProvider.java b/plugins/svn4idea/src/org/jetbrains/idea/svn/api/InfoCommandRepositoryProvider.java
index c257d6c8ad0b..9c119223aa9e 100644
--- a/plugins/svn4idea/src/org/jetbrains/idea/svn/api/InfoCommandRepositoryProvider.java
+++ b/plugins/svn4idea/src/org/jetbrains/idea/svn/api/InfoCommandRepositoryProvider.java
@@ -15,11 +15,9 @@
*/
package org.jetbrains.idea.svn.api;
-import com.intellij.openapi.diagnostic.Logger;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.idea.svn.SvnVcs;
-import org.tmatesoft.svn.core.SVNException;
import org.tmatesoft.svn.core.wc.SVNInfo;
import org.tmatesoft.svn.core.wc2.SvnTarget;
@@ -28,8 +26,6 @@ import org.tmatesoft.svn.core.wc2.SvnTarget;
*/
public class InfoCommandRepositoryProvider extends BaseRepositoryProvider {
- private static final Logger LOG = Logger.getInstance(InfoCommandRepositoryProvider.class);
-
public InfoCommandRepositoryProvider(@NotNull SvnVcs vcs, @NotNull SvnTarget target) {
super(vcs, target);
}
@@ -45,25 +41,10 @@ public class InfoCommandRepositoryProvider extends BaseRepositoryProvider {
result = new Repository(myTarget.getURL());
}
else {
- SVNInfo info = getInfo();
+ SVNInfo info = myVcs.getInfo(myTarget.getFile());
result = info != null ? new Repository(info.getRepositoryRootURL()) : null;
}
return result;
}
-
- @Nullable
- private SVNInfo getInfo() {
- SVNInfo result = null;
-
- try {
- result = myTarget.isFile() ? myVcs.getInfo(myTarget.getFile()) : myVcs.getInfo(myTarget.getURL(), null);
- }
- catch (SVNException e) {
- // TODO: Update this to more precise handling of exception codes
- LOG.debug(e);
- }
-
- return result;
- }
}
diff --git a/plugins/svn4idea/src/org/jetbrains/idea/svn/checkin/IdeaSvnkitBasedAuthenticationCallback.java b/plugins/svn4idea/src/org/jetbrains/idea/svn/checkin/IdeaSvnkitBasedAuthenticationCallback.java
index f6ff09a8dfa7..57daf70de1fd 100644
--- a/plugins/svn4idea/src/org/jetbrains/idea/svn/checkin/IdeaSvnkitBasedAuthenticationCallback.java
+++ b/plugins/svn4idea/src/org/jetbrains/idea/svn/checkin/IdeaSvnkitBasedAuthenticationCallback.java
@@ -19,19 +19,26 @@ import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.ui.MessageType;
import com.intellij.openapi.ui.popup.util.PopupUtil;
+import com.intellij.openapi.util.Getter;
+import com.intellij.openapi.util.Pair;
+import com.intellij.openapi.util.Ref;
import com.intellij.openapi.util.io.FileUtil;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.openapi.vcs.ui.VcsBalloonProblemNotifier;
import com.intellij.util.ThrowableRunnable;
+import com.intellij.util.WaitForProgressToShow;
+import com.intellij.util.containers.ContainerUtil;
import com.intellij.util.messages.MessageBusConnection;
import com.intellij.util.net.HttpConfigurable;
import com.intellij.util.proxy.CommonProxy;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.idea.svn.SvnAuthenticationManager;
+import org.jetbrains.idea.svn.SvnBundle;
import org.jetbrains.idea.svn.SvnConfiguration;
import org.jetbrains.idea.svn.SvnVcs;
import org.jetbrains.idea.svn.commandLine.AuthenticationCallback;
+import org.jetbrains.idea.svn.dialogs.SimpleCredentialsDialog;
import org.tmatesoft.svn.core.*;
import org.tmatesoft.svn.core.auth.*;
import org.tmatesoft.svn.core.internal.util.SVNBase64;
@@ -52,6 +59,7 @@ import java.security.cert.X509Certificate;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
+import java.util.Set;
/**
* Created with IntelliJ IDEA.
@@ -65,10 +73,12 @@ public class IdeaSvnkitBasedAuthenticationCallback implements AuthenticationCall
private File myTempDirectory;
private boolean myProxyCredentialsWereReturned;
private SvnConfiguration myConfiguration;
+ private final Set<String> myRequestedCredentials;
public IdeaSvnkitBasedAuthenticationCallback(SvnVcs vcs) {
myVcs = vcs;
myConfiguration = SvnConfiguration.getInstance(myVcs.getProject());
+ myRequestedCredentials = ContainerUtil.newHashSet();
}
@Override
@@ -81,26 +91,21 @@ public class IdeaSvnkitBasedAuthenticationCallback implements AuthenticationCall
@Nullable
@Override
- public SVNAuthentication requestCredentials(SVNURL repositoryUrl, String type) {
+ public SVNAuthentication requestCredentials(final SVNURL repositoryUrl, final String type) {
SVNAuthentication authentication = null;
if (repositoryUrl != null) {
- String realm = repositoryUrl.toDecodedString();
- Object data = SvnConfiguration.RUNTIME_AUTH_CACHE.getData(type, realm);
+ final String realm = repositoryUrl.toDecodedString();
- if (data != null && data instanceof SVNAuthentication) {
- // we already have credentials in memory cache
- authentication = (SVNAuthentication)data;
- } else {
- // ask user for credentials
- authentication = myVcs.getSvnConfiguration().getInteractiveManager(myVcs).getInnerProvider()
- .requestClientAuthentication(type, repositoryUrl, realm, null, null, true);
+ authentication = requestCredentials(realm, type, new Getter<Pair<SVNAuthentication, Boolean>>() {
+ @Override
+ public Pair<SVNAuthentication, Boolean> get() {
+ SVNAuthentication result = myVcs.getSvnConfiguration().getInteractiveManager(myVcs).getInnerProvider()
+ .requestClientAuthentication(type, repositoryUrl, realm, null, null, true);
- if (authentication != null) {
- // save user credentials to memory cache
- myVcs.getSvnConfiguration().acknowledge(type, realm, authentication);
+ return new Pair<SVNAuthentication, Boolean>(result, true);
}
- }
+ });
}
if (authentication == null) {
@@ -110,6 +115,69 @@ public class IdeaSvnkitBasedAuthenticationCallback implements AuthenticationCall
return authentication;
}
+ @Nullable
+ private <T> T requestCredentials(@NotNull String realm, @NotNull String type, @NotNull Getter<Pair<T, Boolean>> fromUserProvider) {
+ T result;
+ Object data = SvnConfiguration.RUNTIME_AUTH_CACHE.getData(type, realm);
+
+ // we return credentials from cache if they are asked for the first time during command execution, otherwise - user is asked
+ if (data != null && !myRequestedCredentials.contains(getKey(realm, type))) {
+ // we already have credentials in memory cache
+ result = (T) data;
+ myRequestedCredentials.add(getKey(realm, type));
+ }
+ else {
+ // ask user for credentials
+ Pair<T, Boolean> userData = fromUserProvider.get();
+ result = userData.first;
+
+ if (result != null && userData.second) {
+ // save user credentials to memory cache
+ myVcs.getSvnConfiguration().acknowledge(type, realm, result);
+ myRequestedCredentials.add(getKey(realm, type));
+ }
+ }
+
+ return result;
+ }
+
+ @NotNull
+ private static String getKey(@NotNull String realm, @NotNull String type) {
+ return type + "$" + realm;
+ }
+
+ @Override
+ @Nullable
+ public String requestSshCredentials(@NotNull final String realm,
+ @NotNull final SimpleCredentialsDialog.Mode mode,
+ @NotNull final String key) {
+ return requestCredentials(realm, ISVNAuthenticationManager.SSH, new Getter<Pair<String, Boolean>>() {
+ @Override
+ public Pair<String, Boolean> get() {
+ final Ref<String> answer = new Ref<String>();
+ final Ref<Boolean> save = new Ref<Boolean>();
+
+ Runnable command = new Runnable() {
+ public void run() {
+ SimpleCredentialsDialog dialog = new SimpleCredentialsDialog(myVcs.getProject());
+
+ dialog.setup(mode, realm, key, true);
+ dialog.setTitle(SvnBundle.message("dialog.title.authentication.required"));
+ dialog.show();
+ if (dialog.isOK()) {
+ answer.set(dialog.getPassword());
+ save.set(dialog.isSaveAllowed());
+ }
+ }
+ };
+
+ WaitForProgressToShow.runOrInvokeAndWaitAboveProgress(command);
+
+ return new Pair<String, Boolean>(answer.get(), !save.isNull() && save.get());
+ }
+ });
+ }
+
@Override
public boolean acceptSSLServerCertificate(final SVNURL repositoryUrl, final String realm) {
if (repositoryUrl == null) {
@@ -140,6 +208,7 @@ public class IdeaSvnkitBasedAuthenticationCallback implements AuthenticationCall
(instance.USE_HTTP_PROXY || instance.USE_PROXY_PAC);
}
+ // TODO: not used - should be removed.
@Override
public boolean persistDataToTmpConfig(final SVNURL repositoryUrl) throws IOException {
// TODO: Make repositoryUrl @NotNull after SvnLineCommand.runWithAuthenticationAttempt refactored
@@ -159,6 +228,16 @@ public class IdeaSvnkitBasedAuthenticationCallback implements AuthenticationCall
@Nullable
public static Proxy getIdeaDefinedProxy(@NotNull final SVNURL url) {
+ // SVNKit authentication implementation sets repositories as noProxy() to provide custom proxy authentication logic - see for instance,
+ // SvnAuthenticationManager.getProxyManager(). But noProxy() setting is not cleared correctly in all cases - so if svn command
+ // (for command line) is executed on thread where repository url was added as noProxy() => proxies are not retrieved for such commands
+ // and execution logic is incorrect.
+
+ // To prevent such behavior repositoryUrl is manually removed from noProxy() list (for current thread).
+ // NOTE, that current method is only called from code flows for executing commands through command line client and should not be called
+ // from SVNKit code flows.
+ CommonProxy.getInstance().removeNoProxy(url.getProtocol(), url.getHost(), url.getPort());
+
final List<Proxy> proxies = CommonProxy.getInstance().select(URI.create(url.toString()));
if (proxies != null && ! proxies.isEmpty()) {
for (Proxy proxy : proxies) {
@@ -204,6 +283,7 @@ public class IdeaSvnkitBasedAuthenticationCallback implements AuthenticationCall
return authentication;
}
+ // TODO: not used - should be removed.
@Override
public boolean askProxyCredentials(SVNURL repositoryUrl) {
if (repositoryUrl == null) {
diff --git a/plugins/svn4idea/src/org/jetbrains/idea/svn/checkin/SvnCheckinEnvironment.java b/plugins/svn4idea/src/org/jetbrains/idea/svn/checkin/SvnCheckinEnvironment.java
index c1f3edeafdc3..c296cb25b8b7 100644
--- a/plugins/svn4idea/src/org/jetbrains/idea/svn/checkin/SvnCheckinEnvironment.java
+++ b/plugins/svn4idea/src/org/jetbrains/idea/svn/checkin/SvnCheckinEnvironment.java
@@ -431,7 +431,7 @@ public class SvnCheckinEnvironment implements CheckinEnvironment {
for (File file : files) {
try {
- mySvnVcs.getFactory(file).createDeleteClient().delete(file, true);
+ mySvnVcs.getFactory(file).createDeleteClient().delete(file, true, false, null);
}
catch (VcsException e) {
exceptions.add(e);
diff --git a/plugins/svn4idea/src/org/jetbrains/idea/svn/checkout/SvnCheckoutProvider.java b/plugins/svn4idea/src/org/jetbrains/idea/svn/checkout/SvnCheckoutProvider.java
index 891471e291c1..d060ea2d8f50 100644
--- a/plugins/svn4idea/src/org/jetbrains/idea/svn/checkout/SvnCheckoutProvider.java
+++ b/plugins/svn4idea/src/org/jetbrains/idea/svn/checkout/SvnCheckoutProvider.java
@@ -18,6 +18,7 @@ package org.jetbrains.idea.svn.checkout;
import com.intellij.lifecycle.PeriodicalTasksCloser;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.application.ModalityState;
+import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.progress.ProgressIndicator;
import com.intellij.openapi.progress.ProgressManager;
import com.intellij.openapi.progress.Task;
@@ -43,6 +44,7 @@ import org.jetbrains.annotations.Nullable;
import org.jetbrains.idea.svn.*;
import org.jetbrains.idea.svn.actions.ExclusiveBackgroundVcsAction;
import org.jetbrains.idea.svn.actions.SvnExcludingIgnoredOperation;
+import org.jetbrains.idea.svn.api.ClientFactory;
import org.jetbrains.idea.svn.checkin.IdeaCommitHandler;
import org.jetbrains.idea.svn.commandLine.CommitEventHandler;
import org.jetbrains.idea.svn.dialogs.CheckoutDialog;
@@ -81,6 +83,16 @@ public class SvnCheckoutProvider implements CheckoutProvider {
}
}
+ @NotNull
+ public static ClientFactory getFactory(@NotNull SvnVcs vcs, @NotNull WorkingCopyFormat format) throws VcsException {
+ ClientFactory settingsFactory = vcs.getFactoryFromSettings();
+ ClientFactory otherFactory = vcs.getOtherFactory();
+ List<WorkingCopyFormat> settingsFactoryFormats = settingsFactory.createCheckoutClient().getSupportedFormats();
+ List<WorkingCopyFormat> otherFactoryFormats = otherFactory.createCheckoutClient().getSupportedFormats();
+
+ return settingsFactoryFormats.contains(format) || !otherFactoryFormats.contains(format) ? settingsFactory : otherFactory;
+ }
+
public static void checkout(final Project project,
final File target,
final String url,
@@ -101,7 +113,7 @@ public class SvnCheckoutProvider implements CheckoutProvider {
ISVNEventHandler handler = new CheckoutEventHandler(vcs, false, ProgressManager.getInstance().getProgressIndicator());
ProgressManager.progress(SvnBundle.message("progress.text.checking.out", target.getAbsolutePath()));
try {
- vcs.getFactoryFromSettings().createCheckoutClient()
+ getFactory(vcs, format).createCheckoutClient()
.checkout(SvnTarget.fromURL(SVNURL.parseURIEncoded(url)), target, revision, depth, ignoreExternals, true, format, handler);
ProgressManager.checkCanceled();
checkoutSuccessful.set(Boolean.TRUE);
@@ -282,6 +294,8 @@ public class SvnCheckoutProvider implements CheckoutProvider {
public static class CheckoutFormatFromUserProvider {
+ private static final Logger LOG = Logger.getInstance(CheckoutFormatFromUserProvider.class);
+
@NotNull private final Project myProject;
@NotNull private final SvnVcs myVcs;
@NotNull private final File myPath;
@@ -343,16 +357,24 @@ public class SvnCheckoutProvider implements CheckoutProvider {
}
private List<WorkingCopyFormat> loadSupportedFormats() {
- List<WorkingCopyFormat> result;
+ List<WorkingCopyFormat> result = ContainerUtil.newArrayList();
try {
- result = myVcs.getFactoryFromSettings().createCheckoutClient().getSupportedFormats();
+ result.addAll(myVcs.getFactoryFromSettings().createCheckoutClient().getSupportedFormats());
}
catch (VcsException e) {
- result = Collections.emptyList();
error.set(e.getMessage());
}
+ try {
+ result.addAll(myVcs.getOtherFactory().createCheckoutClient().getSupportedFormats());
+ }
+ catch (VcsException e) {
+ // do not add error as it is just usability fix and "other factory" could be incorrectly configured (for instance, invalid
+ // executable path)
+ LOG.info("Failed to get checkout formats from other factory", e);
+ }
+
return result;
}
}
diff --git a/plugins/svn4idea/src/org/jetbrains/idea/svn/commandLine/AuthenticationCallback.java b/plugins/svn4idea/src/org/jetbrains/idea/svn/commandLine/AuthenticationCallback.java
index 4f4918f04301..ba6099aae955 100644
--- a/plugins/svn4idea/src/org/jetbrains/idea/svn/commandLine/AuthenticationCallback.java
+++ b/plugins/svn4idea/src/org/jetbrains/idea/svn/commandLine/AuthenticationCallback.java
@@ -17,6 +17,7 @@ package org.jetbrains.idea.svn.commandLine;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
+import org.jetbrains.idea.svn.dialogs.SimpleCredentialsDialog;
import org.tmatesoft.svn.core.SVNURL;
import org.tmatesoft.svn.core.auth.SVNAuthentication;
@@ -70,6 +71,11 @@ public interface AuthenticationCallback {
@Nullable
File getSpecialConfigDir();
+ @Nullable
+ String requestSshCredentials(@NotNull String realm,
+ @NotNull SimpleCredentialsDialog.Mode mode,
+ @NotNull String key);
+
/**
* Ask user or read from memory storage whether server certificate should be accepted
*
diff --git a/plugins/svn4idea/src/org/jetbrains/idea/svn/commandLine/CertificateCallbackCase.java b/plugins/svn4idea/src/org/jetbrains/idea/svn/commandLine/CertificateCallbackCase.java
index a089e9ee8556..a63d4544a5f5 100644
--- a/plugins/svn4idea/src/org/jetbrains/idea/svn/commandLine/CertificateCallbackCase.java
+++ b/plugins/svn4idea/src/org/jetbrains/idea/svn/commandLine/CertificateCallbackCase.java
@@ -27,6 +27,7 @@ public class CertificateCallbackCase extends AuthCallbackCase {
private static final String CERTIFICATE_ERROR = "Error validating server certificate for";
private static final String UNTRUSTED_SERVER_CERTIFICATE = "Server SSL certificate untrusted";
+ private static final String CERTIFICATE_VERIFICATION_FAILED = "certificate verification failed";
private boolean accepted;
@@ -38,7 +39,9 @@ public class CertificateCallbackCase extends AuthCallbackCase {
public boolean canHandle(String error) {
return error.startsWith(CERTIFICATE_ERROR) ||
// https one-way protocol untrusted server certificate
- error.contains(UNTRUSTED_SERVER_CERTIFICATE);
+ error.contains(UNTRUSTED_SERVER_CERTIFICATE) ||
+ // for instance, certificate issued for a different hostname, issuer is not trusted - for both 1.7 and 1.8
+ error.contains(CERTIFICATE_VERIFICATION_FAILED);
}
@Override
diff --git a/plugins/svn4idea/src/org/jetbrains/idea/svn/commandLine/Command.java b/plugins/svn4idea/src/org/jetbrains/idea/svn/commandLine/Command.java
index ea623f4d8050..7b0ae47ee9db 100644
--- a/plugins/svn4idea/src/org/jetbrains/idea/svn/commandLine/Command.java
+++ b/plugins/svn4idea/src/org/jetbrains/idea/svn/commandLine/Command.java
@@ -5,6 +5,7 @@ import com.intellij.util.containers.ContainerUtil;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
+import org.tmatesoft.svn.core.ISVNCanceller;
import org.tmatesoft.svn.core.SVNURL;
import org.tmatesoft.svn.core.wc2.SvnTarget;
@@ -29,6 +30,8 @@ public class Command {
@Nullable private SVNURL myRepositoryUrl;
@NotNull private SvnTarget myTarget;
+ @Nullable private ISVNCanceller myCanceller;
+
public Command(@NotNull SvnCommandName name) {
myName = name;
}
@@ -48,6 +51,15 @@ public class Command {
}
@Nullable
+ public ISVNCanceller getCanceller() {
+ return myCanceller;
+ }
+
+ public void setCanceller(@Nullable ISVNCanceller canceller) {
+ myCanceller = canceller;
+ }
+
+ @Nullable
public File getConfigDir() {
return myConfigDir;
}
diff --git a/plugins/svn4idea/src/org/jetbrains/idea/svn/commandLine/CommandExecutor.java b/plugins/svn4idea/src/org/jetbrains/idea/svn/commandLine/CommandExecutor.java
index 5779ee4a86fb..556691a06c6f 100644
--- a/plugins/svn4idea/src/org/jetbrains/idea/svn/commandLine/CommandExecutor.java
+++ b/plugins/svn4idea/src/org/jetbrains/idea/svn/commandLine/CommandExecutor.java
@@ -25,6 +25,7 @@ import com.intellij.util.EventDispatcher;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
+import org.tmatesoft.svn.core.SVNCancelException;
import java.io.IOException;
import java.io.OutputStreamWriter;
@@ -44,6 +45,7 @@ public class CommandExecutor {
private boolean myIsDestroyed;
private boolean myNeedsDestroy;
private volatile String myDestroyReason;
+ private volatile boolean myWasCancelled;
protected final GeneralCommandLine myCommandLine;
protected Process myProcess;
protected OSProcessHandler myHandler;
@@ -56,7 +58,6 @@ public class CommandExecutor {
private final EventDispatcher<LineCommandListener> myListeners = EventDispatcher.create(LineCommandListener.class);
private final AtomicBoolean myWasError = new AtomicBoolean(false);
- @NotNull private final AtomicReference<Throwable> myExceptionRef;
@Nullable private final LineCommandListener myResultBuilder;
@NotNull private final Command myCommand;
@@ -79,7 +80,6 @@ public class CommandExecutor {
myCommandLine.addParameter(command.getName().getName());
myCommandLine.addParameters(command.getParameters());
myExitCodeReference = new AtomicReference<Integer>();
- myExceptionRef = new AtomicReference<Throwable>();
}
/**
@@ -95,7 +95,7 @@ public class CommandExecutor {
return myDestroyReason;
}
- public void start() {
+ public void start() throws SvnBindException {
synchronized (myLock) {
checkNotStarted();
@@ -107,9 +107,10 @@ public class CommandExecutor {
myHandler = createProcessHandler();
myProcessWriter = new OutputStreamWriter(myHandler.getProcessInput());
startHandlingStreams();
- } catch (Throwable t) {
- listeners().startFailed(t);
- myExceptionRef.set(t);
+ } catch (ExecutionException e) {
+ // TODO: currently startFailed() is not used for some real logic in svn4idea plugin
+ listeners().startFailed(e);
+ throw new SvnBindException(e);
}
}
}
@@ -180,15 +181,13 @@ public class CommandExecutor {
boolean finished;
do {
finished = waitFor(500);
- if (!finished && (wasError() || needsDestroy())) {
+ if (!finished && (wasError() || needsDestroy() || checkCancelled())) {
waitFor(1000);
doDestroyProcess();
break;
}
}
while (!finished);
-
- throwIfError();
}
public void addListener(final LineCommandListener listener) {
@@ -203,6 +202,20 @@ public class CommandExecutor {
}
}
+ public boolean checkCancelled() {
+ if (!myWasCancelled && myCommand.getCanceller() != null) {
+ try {
+ myCommand.getCanceller().checkCancelled();
+ }
+ catch (SVNCancelException e) {
+ // indicates command should be cancelled
+ myWasCancelled = true;
+ }
+ }
+
+ return myWasCancelled;
+ }
+
public void destroyProcess() {
synchronized (myLock) {
myNeedsDestroy = true;
@@ -290,14 +303,6 @@ public class CommandExecutor {
return myWasError.get();
}
- public void throwIfError() throws SvnBindException {
- Throwable error = myExceptionRef.get();
-
- if (error != null) {
- throw new SvnBindException(error);
- }
- }
-
public void write(String value) throws SvnBindException {
try {
synchronized (myLock) {
diff --git a/plugins/svn4idea/src/org/jetbrains/idea/svn/commandLine/CommandRuntime.java b/plugins/svn4idea/src/org/jetbrains/idea/svn/commandLine/CommandRuntime.java
index 67867eab36c0..e2742463cd16 100644
--- a/plugins/svn4idea/src/org/jetbrains/idea/svn/commandLine/CommandRuntime.java
+++ b/plugins/svn4idea/src/org/jetbrains/idea/svn/commandLine/CommandRuntime.java
@@ -23,6 +23,7 @@ import com.intellij.util.containers.ContainerUtil;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.idea.svn.SvnApplicationSettings;
+import org.jetbrains.idea.svn.SvnProgressCanceller;
import org.jetbrains.idea.svn.SvnUtil;
import org.jetbrains.idea.svn.SvnVcs;
import org.tmatesoft.svn.core.SVNURL;
@@ -71,6 +72,10 @@ public class CommandRuntime {
}
private void onStart(@NotNull Command command) throws SvnBindException {
+ // TODO: Actually command handler should be used as canceller, but currently all handlers use same cancel logic -
+ // TODO: - just check progress indicator
+ command.setCanceller(new SvnProgressCanceller());
+
for (CommandRuntimeModule module : myModules) {
module.onStart(command);
}
@@ -79,56 +84,73 @@ public class CommandRuntime {
private boolean onAfterCommand(@NotNull CommandExecutor executor, @NotNull Command command) throws SvnBindException {
boolean repeat = false;
- // could be situations when exit code = 0, but there is info "warning" in error stream for instance, for "svn status"
- // on non-working copy folder
// TODO: synchronization does not work well in all cases - sometimes exit code is not yet set and null returned - fix synchronization
// here we treat null exit code as some non-zero exit code
final Integer exitCode = executor.getExitCodeReference();
if (exitCode == null || exitCode != 0) {
logNullExitCode(executor, exitCode);
+ cleanupManualDestroy(executor, command);
+ repeat = !StringUtil.isEmpty(executor.getErrorOutput()) ? handleErrorText(executor, command) : handleErrorCode(executor);
+ }
+ else {
+ handleSuccess(executor);
+ }
- if (executor.isManuallyDestroyed()) {
- cleanup(executor, command.getWorkingDirectory());
+ return repeat;
+ }
- String destroyReason = executor.getDestroyReason();
- if (!StringUtil.isEmpty(destroyReason)) {
- throw new SvnBindException(destroyReason);
- }
- }
+ private static void handleSuccess(CommandExecutor executor) {
+ // could be situations when exit code = 0, but there is info "warning" in error stream for instance, for "svn status"
+ // on non-working copy folder
+ if (executor.getErrorOutput().length() > 0) {
+ // here exitCode == 0, but some warnings are in error stream
+ LOG.info("Detected warning - " + executor.getErrorOutput());
+ }
+ }
- if (executor.getErrorOutput().length() > 0) {
- // handle authentication
- final String errText = executor.getErrorOutput().trim();
- final AuthCallbackCase callback = executor instanceof TerminalExecutor ? null : createCallback(errText, command.getRepositoryUrl());
- if (callback != null) {
- if (callback.getCredentials(errText)) {
- if (myAuthCallback.getSpecialConfigDir() != null) {
- command.setConfigDir(myAuthCallback.getSpecialConfigDir());
- }
- callback.updateParameters(command);
- repeat = true;
- } else {
- throw new SvnBindException(errText);
- }
- } else {
- throw new SvnBindException(errText);
- }
- } else {
- // no errors found in error stream => we treat null exitCode as successful, otherwise exception is thrown
- if (exitCode != null) {
- // here exitCode != null && exitCode != 0
- LOG.info("Command - " + executor.getCommandText());
- LOG.info("Command output - " + executor.getOutput());
+ private static boolean handleErrorCode(CommandExecutor executor) throws SvnBindException {
+ // no errors found in error stream => we treat null exitCode as successful, otherwise exception is thrown
+ Integer exitCode = executor.getExitCodeReference();
+ if (exitCode != null) {
+ // here exitCode != null && exitCode != 0
+ LOG.info("Command - " + executor.getCommandText());
+ LOG.info("Command output - " + executor.getOutput());
+
+ throw new SvnBindException("Svn process exited with error code: " + exitCode);
+ }
+
+ return false;
+ }
- throw new SvnBindException("Svn process exited with error code: " + exitCode);
+ private boolean handleErrorText(CommandExecutor executor, Command command) throws SvnBindException {
+ final String errText = executor.getErrorOutput().trim();
+ final AuthCallbackCase callback = executor instanceof TerminalExecutor ? null : createCallback(errText, command.getRepositoryUrl());
+ // do not handle possible authentication errors if command was manually cancelled
+ // force checking if command is cancelled and not just use corresponding value from executor - as there could be cases when command
+ // finishes quickly but with some auth error - this way checkCancelled() is not called by executor itself and so command is repeated
+ // "infinite" times despite it was cancelled.
+ if (!executor.checkCancelled() && callback != null) {
+ if (callback.getCredentials(errText)) {
+ if (myAuthCallback.getSpecialConfigDir() != null) {
+ command.setConfigDir(myAuthCallback.getSpecialConfigDir());
}
+ callback.updateParameters(command);
+ return true;
}
- } else if (executor.getErrorOutput().length() > 0) {
- // here exitCode == 0, but some warnings are in error stream
- LOG.info("Detected warning - " + executor.getErrorOutput());
}
- return repeat;
+ throw new SvnBindException(errText);
+ }
+
+ private void cleanupManualDestroy(CommandExecutor executor, Command command) throws SvnBindException {
+ if (executor.isManuallyDestroyed()) {
+ cleanup(executor, command.getWorkingDirectory());
+
+ String destroyReason = executor.getDestroyReason();
+ if (!StringUtil.isEmpty(destroyReason)) {
+ throw new SvnBindException(destroyReason);
+ }
+ }
}
private void onFinish() {
diff --git a/plugins/svn4idea/src/org/jetbrains/idea/svn/commandLine/ProxyCallback.java b/plugins/svn4idea/src/org/jetbrains/idea/svn/commandLine/ProxyCallback.java
index 508205c83b19..340100dcb3a6 100644
--- a/plugins/svn4idea/src/org/jetbrains/idea/svn/commandLine/ProxyCallback.java
+++ b/plugins/svn4idea/src/org/jetbrains/idea/svn/commandLine/ProxyCallback.java
@@ -15,6 +15,7 @@
*/
package org.jetbrains.idea.svn.commandLine;
+import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.util.Condition;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.util.containers.ContainerUtil;
@@ -28,6 +29,8 @@ import java.net.PasswordAuthentication;
*/
public class ProxyCallback extends AuthCallbackCase {
+ private static final Logger LOG = Logger.getInstance(ProxyCallback.class);
+
private static final String CANNOT_AUTHENTICATE_TO_PROXY = "Could not authenticate to proxy server";
private static final String PROXY_AUTHENTICATION_FAILED = "Proxy authentication failed";
@@ -53,6 +56,8 @@ public class ProxyCallback extends AuthCallbackCase {
if (myUrl == null) {
// TODO: We assume that if repository url is null - command is local and do not require repository access
// TODO: Check if this is correct for all cases
+ LOG.info("Proxy callback could handle error text, but repository url is null", new Throwable());
+
result = true;
// explicit check if proxies are configured in IDEA is used here not to perform "proxy authentication" for proxies manually
// specified by users in svn "servers" file
diff --git a/plugins/svn4idea/src/org/jetbrains/idea/svn/commandLine/ProxyModule.java b/plugins/svn4idea/src/org/jetbrains/idea/svn/commandLine/ProxyModule.java
index 45097befa516..9e28696829dc 100644
--- a/plugins/svn4idea/src/org/jetbrains/idea/svn/commandLine/ProxyModule.java
+++ b/plugins/svn4idea/src/org/jetbrains/idea/svn/commandLine/ProxyModule.java
@@ -15,6 +15,7 @@
*/
package org.jetbrains.idea.svn.commandLine;
+import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.util.text.StringUtil;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.idea.svn.IdeaSVNConfigFile;
@@ -31,6 +32,8 @@ import java.net.Proxy;
*/
public class ProxyModule extends BaseCommandRuntimeModule {
+ private static final Logger LOG = Logger.getInstance(ProxyModule.class);
+
public ProxyModule(@NotNull CommandRuntime runtime) {
super(runtime);
}
@@ -59,6 +62,8 @@ public class ProxyModule extends BaseCommandRuntimeModule {
command.put("--config-option");
command.put(String.format("servers:%s:http-proxy-port=%s", hostGroup, address.getPort()));
}
+ } else {
+ LOG.info("Configured proxy should be used, but repository url is null for command - " + command.getText());
}
}
diff --git a/plugins/svn4idea/src/org/jetbrains/idea/svn/commandLine/TerminalProcessHandler.java b/plugins/svn4idea/src/org/jetbrains/idea/svn/commandLine/TerminalProcessHandler.java
index 86fd039ea43c..96d6543c74e2 100644
--- a/plugins/svn4idea/src/org/jetbrains/idea/svn/commandLine/TerminalProcessHandler.java
+++ b/plugins/svn4idea/src/org/jetbrains/idea/svn/commandLine/TerminalProcessHandler.java
@@ -20,6 +20,7 @@ import com.intellij.execution.process.OSProcessHandler;
import com.intellij.execution.process.ProcessEvent;
import com.intellij.execution.process.ProcessOutputTypes;
import com.intellij.openapi.util.Key;
+import com.intellij.openapi.util.SystemInfo;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.util.containers.ContainerUtil;
import org.jetbrains.annotations.NotNull;
@@ -66,16 +67,15 @@ public class TerminalProcessHandler extends OSProcessHandler {
public void notifyTextAvailable(String text, Key outputType) {
terminalOutputCapturer.onTextAvailable(new ProcessEvent(this, text), outputType);
- // filter terminal escape codes - they are presented in the output for windows platform
- String filteredText = text.replaceAll(CSI_ESCAPE_CODE, "").replaceAll(NON_CSI_ESCAPE_CODE, "");
- // trim leading '\r' symbols - as they break xml parsing logic
- filteredText = StringUtil.trimLeading(filteredText);
+ text = filterText(text);
- if (!StringUtil.isEmpty(filteredText)) {
+ if (!StringUtil.isEmpty(text)) {
StringBuilder lastLine = getLastLineFor(outputType);
- String currentLine = lastLine.append(filteredText).toString();
+ String currentLine = lastLine.append(text).toString();
lastLine.setLength(0);
+ currentLine = filterCombinedText(currentLine);
+
// check if current line presents some interactive output
boolean handled = false;
for (InteractiveCommandListener listener : myInteractiveListeners) {
@@ -88,13 +88,28 @@ public class TerminalProcessHandler extends OSProcessHandler {
}
}
- private void notify(@NotNull String text, @NotNull Key outputType, @NotNull StringBuilder lastLine) {
+ private static String filterCombinedText(@NotNull String currentLine) {
// for windows platform output is assumed in format suitable for terminal emulator
// for instance, same text could be returned twice with '\r' symbol in between (so in emulator output we'll still see correct
// text without duplication)
// because of this we manually process '\r' occurrences to get correct output
- text = removeAllBeforeCaretReturn(text);
+ if (SystemInfo.isWindows) {
+ currentLine = removeAllBeforeCaretReturn(currentLine);
+ }
+ return currentLine;
+ }
+ private static String filterText(@NotNull String text) {
+ if (SystemInfo.isWindows) {
+ // filter terminal escape codes - they are presented in the output for windows platform
+ text = text.replaceAll(CSI_ESCAPE_CODE, "").replaceAll(NON_CSI_ESCAPE_CODE, "");
+ // trim leading '\r' symbols - as they break xml parsing logic
+ text = StringUtil.trimLeading(text, '\r');
+ }
+ return text;
+ }
+
+ private void notify(@NotNull String text, @NotNull Key outputType, @NotNull StringBuilder lastLine) {
// text is not more than one line - either one line or part of the line
if (StringUtil.endsWith(text, "\n")) {
// we have full line - notify listeners
diff --git a/plugins/svn4idea/src/org/jetbrains/idea/svn/commandLine/TerminalSshModule.java b/plugins/svn4idea/src/org/jetbrains/idea/svn/commandLine/TerminalSshModule.java
index b957b9ad8004..a2ea3c7cecc6 100644
--- a/plugins/svn4idea/src/org/jetbrains/idea/svn/commandLine/TerminalSshModule.java
+++ b/plugins/svn4idea/src/org/jetbrains/idea/svn/commandLine/TerminalSshModule.java
@@ -19,9 +19,9 @@ import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.Key;
import com.intellij.openapi.util.Ref;
+import com.intellij.openapi.util.text.StringUtil;
import com.intellij.util.WaitForProgressToShow;
import org.jetbrains.annotations.NotNull;
-import org.jetbrains.idea.svn.SvnBundle;
import org.jetbrains.idea.svn.dialogs.ServerSSHDialog;
import org.jetbrains.idea.svn.dialogs.SimpleCredentialsDialog;
import org.tmatesoft.svn.core.SVNURL;
@@ -121,33 +121,21 @@ public class TerminalSshModule extends LineCommandAdapter implements CommandRunt
}
private boolean handleAuthPrompt(@NotNull final SimpleCredentialsDialog.Mode mode, @NotNull final String key) {
- @NotNull final SVNURL repositoryUrl = myExecutor.getCommand().getRepositoryUrl();
- final Project project = myRuntime.getVcs().getProject();
- final Ref<String> answer = new Ref<String>();
-
- Runnable command = new Runnable() {
- public void run() {
- SimpleCredentialsDialog dialog = new SimpleCredentialsDialog(project);
- dialog.setup(mode, repositoryUrl.toDecodedString(), key, true);
- dialog.setTitle(SvnBundle.message("dialog.title.authentication.required"));
- dialog.show();
- if (dialog.isOK()) {
- answer.set(dialog.getPassword());
- }
- // TODO: Correctly handle "cancel" - kill the process
- // TODO: and perform "cleanup" on working copy
- }
- };
+ final SVNURL repositoryUrl = myExecutor.getCommand().getRepositoryUrl();
- WaitForProgressToShow.runOrInvokeAndWaitAboveProgress(command);
+ // TODO: repositoryUrl could be null for some cases, for instance for info command for file is invoked that requires
+ // TODO: authentication (like "svn info <file> -r HEAD"), if it is invoked before all working copy roots are resolved.
+ // TODO: resolving repositoryUrl logic should be updated so that repositoryUrl is not null here.
+ String auth =
+ myRuntime.getAuthCallback().requestSshCredentials(repositoryUrl != null ? repositoryUrl.toDecodedString() : "", mode, key);
- if (!answer.isNull()) {
- sendAnswer(answer.get());
+ if (!StringUtil.isEmpty(auth)) {
+ sendAnswer(auth);
} else {
myExecutor.destroyProcess("Authentication canceled for repository: " + repositoryUrl);
}
- return !answer.isNull();
+ return !StringUtil.isEmpty(auth);
}
private boolean sendAnswer(@NotNull String answer) {
diff --git a/plugins/svn4idea/src/org/jetbrains/idea/svn/content/CmdContentClient.java b/plugins/svn4idea/src/org/jetbrains/idea/svn/content/CmdContentClient.java
index 41ce037a8ab7..2b1c22ee5c1a 100644
--- a/plugins/svn4idea/src/org/jetbrains/idea/svn/content/CmdContentClient.java
+++ b/plugins/svn4idea/src/org/jetbrains/idea/svn/content/CmdContentClient.java
@@ -24,6 +24,8 @@ public class CmdContentClient extends BaseSvnClient implements ContentClient {
// TODO: rewrite this to provide output as Stream
// TODO: rewrite without conversion from String to byte[]
// TODO: Also implement max size constraint like in SvnKitContentClient
+ // TODO: Could not use export to get content of scheduled for deletion file - use cat command, but write special binary handler
+
List<String> parameters = new ArrayList<String>();
CommandUtil.put(parameters, target.getPathOrUrlString(), pegRevision);
CommandUtil.put(parameters, revision);
diff --git a/plugins/svn4idea/src/org/jetbrains/idea/svn/copy/CmdCopyMoveClient.java b/plugins/svn4idea/src/org/jetbrains/idea/svn/copy/CmdCopyMoveClient.java
index 379830f8cdaf..9680346173b4 100644
--- a/plugins/svn4idea/src/org/jetbrains/idea/svn/copy/CmdCopyMoveClient.java
+++ b/plugins/svn4idea/src/org/jetbrains/idea/svn/copy/CmdCopyMoveClient.java
@@ -5,6 +5,7 @@ import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.idea.svn.api.BaseSvnClient;
import org.jetbrains.idea.svn.commandLine.*;
+import org.tmatesoft.svn.core.wc.ISVNEventHandler;
import org.tmatesoft.svn.core.wc.SVNRevision;
import org.tmatesoft.svn.core.wc2.SvnTarget;
@@ -65,4 +66,25 @@ public class CmdCopyMoveClient extends BaseSvnClient implements CopyMoveClient {
return listener.getCommittedRevision();
}
+
+ @Override
+ public void copy(@NotNull SvnTarget source,
+ @NotNull File destination,
+ @Nullable SVNRevision revision,
+ boolean makeParents,
+ @Nullable ISVNEventHandler handler) throws VcsException {
+ List<String> parameters = new ArrayList<String>();
+
+ CommandUtil.put(parameters, source);
+ CommandUtil.put(parameters, destination);
+ CommandUtil.put(parameters, revision);
+ CommandUtil.put(parameters, makeParents, "--parents");
+
+ File workingDirectory = CommandUtil.getHomeDirectory();
+ BaseUpdateCommandListener listener = new BaseUpdateCommandListener(workingDirectory, handler);
+
+ CommandUtil.execute(myVcs, source, workingDirectory, SvnCommandName.copy, parameters, listener);
+
+ listener.throwWrappedIfException();
+ }
}
diff --git a/plugins/svn4idea/src/org/jetbrains/idea/svn/copy/CopyMoveClient.java b/plugins/svn4idea/src/org/jetbrains/idea/svn/copy/CopyMoveClient.java
index c974bf082de2..e8f49d869ba4 100644
--- a/plugins/svn4idea/src/org/jetbrains/idea/svn/copy/CopyMoveClient.java
+++ b/plugins/svn4idea/src/org/jetbrains/idea/svn/copy/CopyMoveClient.java
@@ -5,6 +5,7 @@ import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.idea.svn.api.SvnClient;
import org.jetbrains.idea.svn.commandLine.CommitEventHandler;
+import org.tmatesoft.svn.core.wc.ISVNEventHandler;
import org.tmatesoft.svn.core.wc.SVNRevision;
import org.tmatesoft.svn.core.wc2.SvnTarget;
@@ -33,4 +34,10 @@ public interface CopyMoveClient extends SvnClient {
boolean makeParents,
@NotNull String message,
@Nullable CommitEventHandler handler) throws VcsException;
+
+ void copy(@NotNull SvnTarget source,
+ @NotNull File destination,
+ @Nullable SVNRevision revision,
+ boolean makeParents,
+ @Nullable ISVNEventHandler handler) throws VcsException;
}
diff --git a/plugins/svn4idea/src/org/jetbrains/idea/svn/copy/SvnKitCopyMoveClient.java b/plugins/svn4idea/src/org/jetbrains/idea/svn/copy/SvnKitCopyMoveClient.java
index 96d47ee146b1..1f9f7d9b8fe1 100644
--- a/plugins/svn4idea/src/org/jetbrains/idea/svn/copy/SvnKitCopyMoveClient.java
+++ b/plugins/svn4idea/src/org/jetbrains/idea/svn/copy/SvnKitCopyMoveClient.java
@@ -5,8 +5,10 @@ import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.idea.svn.api.BaseSvnClient;
import org.jetbrains.idea.svn.commandLine.CommitEventHandler;
+import org.jetbrains.idea.svn.commandLine.SvnBindException;
import org.tmatesoft.svn.core.SVNCommitInfo;
import org.tmatesoft.svn.core.SVNException;
+import org.tmatesoft.svn.core.wc.ISVNEventHandler;
import org.tmatesoft.svn.core.wc.SVNCopyClient;
import org.tmatesoft.svn.core.wc.SVNCopySource;
import org.tmatesoft.svn.core.wc.SVNRevision;
@@ -60,6 +62,23 @@ public class SvnKitCopyMoveClient extends BaseSvnClient implements CopyMoveClien
return info != null ? info.getNewRevision() : INVALID_REVISION;
}
+ @Override
+ public void copy(@NotNull SvnTarget source,
+ @NotNull File destination,
+ @Nullable SVNRevision revision,
+ boolean makeParents,
+ @Nullable ISVNEventHandler handler) throws VcsException {
+ SVNCopyClient client = myVcs.createCopyClient();
+ client.setEventHandler(handler);
+
+ try {
+ client.doCopy(new SVNCopySource[]{createCopySource(source, revision)}, destination, false, makeParents, true);
+ }
+ catch (SVNException e) {
+ throw new SvnBindException(e);
+ }
+ }
+
@NotNull
private static SVNCopySource createCopySource(@NotNull SvnTarget source, @Nullable SVNRevision revision) {
return source.isFile()
diff --git a/plugins/svn4idea/src/org/jetbrains/idea/svn/delete/CmdDeleteClient.java b/plugins/svn4idea/src/org/jetbrains/idea/svn/delete/CmdDeleteClient.java
index a80a7dc539ec..b0d2eae487be 100644
--- a/plugins/svn4idea/src/org/jetbrains/idea/svn/delete/CmdDeleteClient.java
+++ b/plugins/svn4idea/src/org/jetbrains/idea/svn/delete/CmdDeleteClient.java
@@ -2,9 +2,12 @@ package org.jetbrains.idea.svn.delete;
import com.intellij.openapi.vcs.VcsException;
import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
import org.jetbrains.idea.svn.api.BaseSvnClient;
+import org.jetbrains.idea.svn.commandLine.BaseUpdateCommandListener;
import org.jetbrains.idea.svn.commandLine.CommandUtil;
import org.jetbrains.idea.svn.commandLine.SvnCommandName;
+import org.tmatesoft.svn.core.wc.ISVNEventHandler;
import org.tmatesoft.svn.core.wc2.SvnTarget;
import java.io.File;
@@ -17,14 +20,21 @@ import java.util.List;
public class CmdDeleteClient extends BaseSvnClient implements DeleteClient {
@Override
- public void delete(@NotNull File path, boolean force) throws VcsException {
- List<String> parameters = new ArrayList<String>();
+ public void delete(@NotNull File path, boolean force, boolean dryRun, @Nullable ISVNEventHandler handler) throws VcsException {
+ // TODO: no actual support for dryRun in 'svn delete', SvnKit performs certain validation on file status and svn:externals property
+ // TODO: probably add some widespread checks for dryRun delete - but most likely this should be placed upper - in merge logic
+ if (!dryRun) {
+ List<String> parameters = new ArrayList<String>();
- CommandUtil.put(parameters, path);
- CommandUtil.put(parameters, force, "--force");
+ CommandUtil.put(parameters, path);
+ CommandUtil.put(parameters, force, "--force");
- // for now parsing of the output is not required as command is executed only for one file
- // and will be either successful or exception will be thrown
- CommandUtil.execute(myVcs, SvnTarget.fromFile(path), CommandUtil.getHomeDirectory(), SvnCommandName.delete, parameters, null);
+ File workingDirectory = CommandUtil.getHomeDirectory();
+ BaseUpdateCommandListener listener = new BaseUpdateCommandListener(workingDirectory, handler);
+
+ CommandUtil.execute(myVcs, SvnTarget.fromFile(path), workingDirectory, SvnCommandName.delete, parameters, listener);
+
+ listener.throwWrappedIfException();
+ }
}
}
diff --git a/plugins/svn4idea/src/org/jetbrains/idea/svn/delete/DeleteClient.java b/plugins/svn4idea/src/org/jetbrains/idea/svn/delete/DeleteClient.java
index 23a1cf97cb31..013696e2cf6c 100644
--- a/plugins/svn4idea/src/org/jetbrains/idea/svn/delete/DeleteClient.java
+++ b/plugins/svn4idea/src/org/jetbrains/idea/svn/delete/DeleteClient.java
@@ -2,7 +2,9 @@ package org.jetbrains.idea.svn.delete;
import com.intellij.openapi.vcs.VcsException;
import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
import org.jetbrains.idea.svn.api.SvnClient;
+import org.tmatesoft.svn.core.wc.ISVNEventHandler;
import java.io.File;
@@ -11,5 +13,5 @@ import java.io.File;
*/
public interface DeleteClient extends SvnClient {
- void delete(@NotNull File path, boolean force) throws VcsException;
+ void delete(@NotNull File path, boolean force, boolean dryRun, @Nullable ISVNEventHandler handler) throws VcsException;
}
diff --git a/plugins/svn4idea/src/org/jetbrains/idea/svn/delete/SvnKitDeleteClient.java b/plugins/svn4idea/src/org/jetbrains/idea/svn/delete/SvnKitDeleteClient.java
index c97cfd2a44bb..c433b970215d 100644
--- a/plugins/svn4idea/src/org/jetbrains/idea/svn/delete/SvnKitDeleteClient.java
+++ b/plugins/svn4idea/src/org/jetbrains/idea/svn/delete/SvnKitDeleteClient.java
@@ -2,8 +2,11 @@ package org.jetbrains.idea.svn.delete;
import com.intellij.openapi.vcs.VcsException;
import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
import org.jetbrains.idea.svn.api.BaseSvnClient;
import org.tmatesoft.svn.core.SVNException;
+import org.tmatesoft.svn.core.wc.ISVNEventHandler;
+import org.tmatesoft.svn.core.wc.SVNWCClient;
import java.io.File;
@@ -13,9 +16,12 @@ import java.io.File;
public class SvnKitDeleteClient extends BaseSvnClient implements DeleteClient {
@Override
- public void delete(@NotNull File path, boolean force) throws VcsException {
+ public void delete(@NotNull File path, boolean force, boolean dryRun, @Nullable ISVNEventHandler handler) throws VcsException {
+ SVNWCClient client = myVcs.createWCClient();
+ client.setEventHandler(handler);
+
try {
- myVcs.createWCClient().doDelete(path, force, false);
+ client.doDelete(path, force, dryRun);
}
catch (SVNException e) {
throw new VcsException(e);
diff --git a/plugins/svn4idea/src/org/jetbrains/idea/svn/dialogs/BranchMerger.java b/plugins/svn4idea/src/org/jetbrains/idea/svn/dialogs/BranchMerger.java
index 29dd1530032d..c9874fd6f68d 100644
--- a/plugins/svn4idea/src/org/jetbrains/idea/svn/dialogs/BranchMerger.java
+++ b/plugins/svn4idea/src/org/jetbrains/idea/svn/dialogs/BranchMerger.java
@@ -91,8 +91,8 @@ public class BranchMerger implements IMerger {
client.merge(SvnTarget.fromURL(mySourceUrl), destination, false, createDiffOptions(), myHandler);
} else {
client.merge(SvnTarget.fromURL(mySourceUrl, SVNRevision.create(mySourceCopyRevision)),
- SvnTarget.fromURL(mySourceUrl, SVNRevision.create(mySourceLatestRevision)), destination, SVNDepth.INFINITY, false, false,
- true, createDiffOptions(), myHandler);
+ SvnTarget.fromURL(mySourceUrl, SVNRevision.create(mySourceLatestRevision)), destination, SVNDepth.INFINITY, true, false,
+ false, true, createDiffOptions(), myHandler);
}
}
diff --git a/plugins/svn4idea/src/org/jetbrains/idea/svn/dialogs/CopiesPanel.java b/plugins/svn4idea/src/org/jetbrains/idea/svn/dialogs/CopiesPanel.java
index 586f9888eb60..143d8f6cdfae 100644
--- a/plugins/svn4idea/src/org/jetbrains/idea/svn/dialogs/CopiesPanel.java
+++ b/plugins/svn4idea/src/org/jetbrains/idea/svn/dialogs/CopiesPanel.java
@@ -36,6 +36,7 @@ import com.intellij.ui.ScrollPaneFactory;
import com.intellij.ui.components.labels.LinkLabel;
import com.intellij.ui.components.labels.LinkListener;
import com.intellij.util.Consumer;
+import com.intellij.util.containers.ContainerUtil;
import com.intellij.util.containers.Convertor;
import com.intellij.util.io.EqualityPolicy;
import com.intellij.util.messages.MessageBusConnection;
@@ -45,6 +46,7 @@ import org.jetbrains.annotations.Nullable;
import org.jetbrains.idea.svn.*;
import org.jetbrains.idea.svn.actions.CleanupWorker;
import org.jetbrains.idea.svn.actions.SelectBranchPopup;
+import org.jetbrains.idea.svn.api.ClientFactory;
import org.jetbrains.idea.svn.branchConfig.SvnBranchConfigurationNew;
import org.jetbrains.idea.svn.checkout.SvnCheckoutProvider;
import org.jetbrains.idea.svn.integrate.QuickMergeInteractionImpl;
@@ -323,10 +325,13 @@ public class CopiesPanel {
@NotNull
private List<WorkingCopyFormat> getSupportedFormats() {
- List<WorkingCopyFormat> result = Collections.emptyList();
+ List<WorkingCopyFormat> result = ContainerUtil.newArrayList();
+ ClientFactory factory = myVcs.getFactory();
+ ClientFactory otherFactory = myVcs.getOtherFactory(factory);
try {
- result = myVcs.getFactory().createUpgradeClient().getSupportedFormats();
+ result.addAll(factory.createUpgradeClient().getSupportedFormats());
+ result.addAll(otherFactory.createUpgradeClient().getSupportedFormats());
}
catch (VcsException e) {
LOG.info(e);
diff --git a/plugins/svn4idea/src/org/jetbrains/idea/svn/dialogs/SvnFormatWorker.java b/plugins/svn4idea/src/org/jetbrains/idea/svn/dialogs/SvnFormatWorker.java
index d6ccdcf13e7d..dc67e8983454 100644
--- a/plugins/svn4idea/src/org/jetbrains/idea/svn/dialogs/SvnFormatWorker.java
+++ b/plugins/svn4idea/src/org/jetbrains/idea/svn/dialogs/SvnFormatWorker.java
@@ -32,6 +32,7 @@ import org.jetbrains.idea.svn.SvnBundle;
import org.jetbrains.idea.svn.SvnUtil;
import org.jetbrains.idea.svn.SvnVcs;
import org.jetbrains.idea.svn.WorkingCopyFormat;
+import org.jetbrains.idea.svn.api.ClientFactory;
import org.tmatesoft.svn.core.SVNCancelException;
import org.tmatesoft.svn.core.SVNException;
import org.tmatesoft.svn.core.wc.ISVNEventHandler;
@@ -135,7 +136,7 @@ public class SvnFormatWorker extends Task.Backgroundable {
SvnUtil.formatRepresentation(myNewFormat));
ISVNEventHandler handler = createUpgradeHandler(indicator, cleanupMessage, upgradeMessage);
- myVcs.getFactory(path).createUpgradeClient().upgrade(path, myNewFormat, handler);
+ getFactory(path, myNewFormat).createUpgradeClient().upgrade(path, myNewFormat, handler);
} catch (Throwable e) {
myExceptions.add(e);
}
@@ -153,6 +154,16 @@ public class SvnFormatWorker extends Task.Backgroundable {
}
}
+ @NotNull
+ private ClientFactory getFactory(@NotNull File path, @NotNull WorkingCopyFormat format) throws VcsException {
+ ClientFactory factory = myVcs.getFactory(path);
+ ClientFactory otherFactory = myVcs.getOtherFactory(factory);
+ List<WorkingCopyFormat> factoryFormats = factory.createUpgradeClient().getSupportedFormats();
+ List<WorkingCopyFormat> otherFactoryFormats = otherFactory.createUpgradeClient().getSupportedFormats();
+
+ return factoryFormats.contains(format) || !otherFactoryFormats.contains(format) ? factory : otherFactory;
+ }
+
private static ISVNEventHandler createUpgradeHandler(@NotNull final ProgressIndicator indicator,
@NotNull final String cleanupMessage,
@NotNull final String upgradeMessage) {
diff --git a/plugins/svn4idea/src/org/jetbrains/idea/svn/history/SvnRepositoryContentRevision.java b/plugins/svn4idea/src/org/jetbrains/idea/svn/history/SvnRepositoryContentRevision.java
index b01308f76c13..b7a0bb9329b0 100644
--- a/plugins/svn4idea/src/org/jetbrains/idea/svn/history/SvnRepositoryContentRevision.java
+++ b/plugins/svn4idea/src/org/jetbrains/idea/svn/history/SvnRepositoryContentRevision.java
@@ -165,8 +165,9 @@ public class SvnRepositoryContentRevision implements ContentRevision, MarkerVcsC
}
try {
- byte[] contents = SvnUtil.getFileContents(myVcs, SvnTarget.fromURL(SvnUtil.parseUrl(getFullPath())), SVNRevision.create(myRevision),
- SVNRevision.UNDEFINED);
+ // TODO: Local path could also be used here
+ SVNRevision revision = SVNRevision.create(myRevision);
+ byte[] contents = SvnUtil.getFileContents(myVcs, SvnTarget.fromURL(SvnUtil.parseUrl(getFullPath())), revision, revision);
myDst.write(contents);
}
catch (VcsException e) {
diff --git a/plugins/svn4idea/src/org/jetbrains/idea/svn/integrate/CmdMergeClient.java b/plugins/svn4idea/src/org/jetbrains/idea/svn/integrate/CmdMergeClient.java
index 485f939f2d77..adba7fa2fa6c 100644
--- a/plugins/svn4idea/src/org/jetbrains/idea/svn/integrate/CmdMergeClient.java
+++ b/plugins/svn4idea/src/org/jetbrains/idea/svn/integrate/CmdMergeClient.java
@@ -61,6 +61,7 @@ public class CmdMergeClient extends BaseSvnClient implements MergeClient {
@NotNull SvnTarget source2,
@NotNull File destination,
@Nullable SVNDepth depth,
+ boolean useAncestry,
boolean dryRun,
boolean recordOnly,
boolean force,
@@ -74,6 +75,7 @@ public class CmdMergeClient extends BaseSvnClient implements MergeClient {
CommandUtil.put(parameters, source1);
CommandUtil.put(parameters, source2);
fillParameters(parameters, destination, depth, dryRun, recordOnly, force, false, diffOptions);
+ CommandUtil.put(parameters, !useAncestry, "--ignore-ancestry");
run(destination, handler, parameters);
}
@@ -101,7 +103,7 @@ public class CmdMergeClient extends BaseSvnClient implements MergeClient {
}
private void run(File destination, ISVNEventHandler handler, List<String> parameters) throws VcsException {
- BaseUpdateCommandListener listener = new BaseUpdateCommandListener(destination, handler);
+ BaseUpdateCommandListener listener = new BaseUpdateCommandListener(CommandUtil.correctUpToExistingParent(destination), handler);
CommandUtil.execute(myVcs, SvnTarget.fromFile(destination), SvnCommandName.merge, parameters, listener);
diff --git a/plugins/svn4idea/src/org/jetbrains/idea/svn/integrate/MergeClient.java b/plugins/svn4idea/src/org/jetbrains/idea/svn/integrate/MergeClient.java
index 07da82f6c6de..94e4c9cece38 100644
--- a/plugins/svn4idea/src/org/jetbrains/idea/svn/integrate/MergeClient.java
+++ b/plugins/svn4idea/src/org/jetbrains/idea/svn/integrate/MergeClient.java
@@ -37,6 +37,7 @@ public interface MergeClient extends SvnClient {
@NotNull SvnTarget source2,
@NotNull File destination,
@Nullable SVNDepth depth,
+ boolean useAncestry,
boolean dryRun,
boolean recordOnly,
boolean force,
diff --git a/plugins/svn4idea/src/org/jetbrains/idea/svn/integrate/Merger.java b/plugins/svn4idea/src/org/jetbrains/idea/svn/integrate/Merger.java
index d1e038d369d7..1c50dde706c1 100644
--- a/plugins/svn4idea/src/org/jetbrains/idea/svn/integrate/Merger.java
+++ b/plugins/svn4idea/src/org/jetbrains/idea/svn/integrate/Merger.java
@@ -23,6 +23,7 @@ import com.intellij.openapi.vcs.versionBrowser.CommittedChangeList;
import com.intellij.util.Consumer;
import com.intellij.util.messages.Topic;
import org.jetbrains.annotations.NonNls;
+import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.idea.svn.SvnBundle;
import org.jetbrains.idea.svn.SvnConfiguration;
@@ -31,10 +32,8 @@ import org.jetbrains.idea.svn.update.UpdateEventHandler;
import org.tmatesoft.svn.core.SVNDepth;
import org.tmatesoft.svn.core.SVNException;
import org.tmatesoft.svn.core.SVNURL;
-import org.tmatesoft.svn.core.wc.SVNDiffClient;
-import org.tmatesoft.svn.core.wc.SVNDiffOptions;
-import org.tmatesoft.svn.core.wc.SVNRevision;
-import org.tmatesoft.svn.core.wc.SVNRevisionRange;
+import org.tmatesoft.svn.core.wc.*;
+import org.tmatesoft.svn.core.wc2.SvnTarget;
import java.io.File;
import java.util.ArrayList;
@@ -45,7 +44,7 @@ import java.util.List;
public class Merger implements IMerger {
protected final List<CommittedChangeList> myChangeLists;
protected final File myTarget;
- protected final SVNDiffClient myDiffClient;
+ @Nullable private final ISVNEventHandler myHandler;
protected int myCount;
private final ProgressIndicator myProgressIndicator;
protected CommittedChangeList myLatestProcessed;
@@ -53,6 +52,7 @@ public class Merger implements IMerger {
private final StringBuilder myCommitMessage;
protected final SvnConfiguration mySvnConfig;
private final Project myProject;
+ @NotNull private final SvnVcs myVcs;
private final String myBranchName;
public Merger(final SvnVcs vcs,
@@ -62,10 +62,10 @@ public class Merger implements IMerger {
final SVNURL currentBranchUrl,
String branchName) {
myBranchName = branchName;
+ myVcs = vcs;
myProject = vcs.getProject();
mySvnConfig = SvnConfiguration.getInstance(vcs.getProject());
myCurrentBranchUrl = currentBranchUrl;
- myDiffClient = vcs.createDiffClient();
myChangeLists = changeLists;
Collections.sort(myChangeLists, ByNumberChangeListComparator.getInstance());
@@ -73,9 +73,7 @@ public class Merger implements IMerger {
myTarget = target;
myCount = 0;
myProgressIndicator = ProgressManager.getInstance().getProgressIndicator();
- myDiffClient.setEventHandler(handler);
- myDiffClient.setMergeOptions(new SVNDiffOptions(mySvnConfig.IGNORE_SPACES_IN_MERGE, mySvnConfig.IGNORE_SPACES_IN_MERGE,
- mySvnConfig.IGNORE_SPACES_IN_MERGE));
+ myHandler = handler;
myCommitMessage = new StringBuilder();
}
@@ -126,9 +124,12 @@ public class Merger implements IMerger {
return false;
}
- protected void doMerge() throws SVNException {
- myDiffClient.doMerge(myCurrentBranchUrl, SVNRevision.UNDEFINED, Collections.singletonList(createRange()),
- myTarget, SVNDepth.INFINITY, true, true, mySvnConfig.MERGE_DRY_RUN, isRecordOnly());
+ protected void doMerge() throws SVNException, VcsException {
+ SvnTarget source = SvnTarget.fromURL(myCurrentBranchUrl);
+ MergeClient client = myVcs.getFactory(myTarget).createMergeClient();
+
+ client.merge(source, createRange(), myTarget, SVNDepth.INFINITY, mySvnConfig.MERGE_DRY_RUN, isRecordOnly(), true,
+ mySvnConfig.getMergeOptions(), myHandler);
}
@NonNls
diff --git a/plugins/svn4idea/src/org/jetbrains/idea/svn/integrate/PointMerger.java b/plugins/svn4idea/src/org/jetbrains/idea/svn/integrate/PointMerger.java
index 443e812b748e..78b8e866129f 100644
--- a/plugins/svn4idea/src/org/jetbrains/idea/svn/integrate/PointMerger.java
+++ b/plugins/svn4idea/src/org/jetbrains/idea/svn/integrate/PointMerger.java
@@ -15,29 +15,30 @@
*/
package org.jetbrains.idea.svn.integrate;
+import com.intellij.openapi.vcs.VcsException;
import com.intellij.openapi.vcs.changes.Change;
import com.intellij.openapi.vcs.versionBrowser.CommittedChangeList;
+import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.idea.svn.SvnRevisionNumber;
import org.jetbrains.idea.svn.SvnUtil;
import org.jetbrains.idea.svn.SvnVcs;
+import org.jetbrains.idea.svn.copy.CopyMoveClient;
+import org.jetbrains.idea.svn.delete.DeleteClient;
import org.jetbrains.idea.svn.history.SvnRepositoryContentRevision;
import org.jetbrains.idea.svn.update.UpdateEventHandler;
+import org.tmatesoft.svn.core.SVNDepth;
import org.tmatesoft.svn.core.SVNException;
import org.tmatesoft.svn.core.SVNURL;
import org.tmatesoft.svn.core.internal.util.SVNPathUtil;
-import org.tmatesoft.svn.core.wc.SVNCopyClient;
-import org.tmatesoft.svn.core.wc.SVNCopySource;
import org.tmatesoft.svn.core.wc.SVNRevision;
-import org.tmatesoft.svn.core.wc.SVNWCClient;
+import org.tmatesoft.svn.core.wc2.SvnTarget;
import java.io.File;
import java.util.*;
public class PointMerger extends Merger {
private final List<Change> mySelectedChanges;
- private SVNWCClient myWcClient;
- private SVNCopyClient myCopyClient;
private final SvnVcs myVcs;
private final UpdateEventHandler myHandler;
@@ -61,7 +62,7 @@ public class PointMerger extends Merger {
return myCount == 0;
}
- protected void doMerge() throws SVNException {
+ protected void doMerge() throws SVNException, VcsException {
for (Change change : mySelectedChanges) {
if (change.getBeforeRevision() == null) {
add(change);
@@ -73,7 +74,7 @@ public class PointMerger extends Merger {
}
}
- private void merge(final Change change) throws SVNException {
+ private void merge(final Change change) throws SVNException, VcsException {
final SvnRepositoryContentRevision before = (SvnRepositoryContentRevision) change.getBeforeRevision();
final SvnRepositoryContentRevision after = (SvnRepositoryContentRevision) change.getAfterRevision();
@@ -83,38 +84,34 @@ public class PointMerger extends Merger {
final File afterPath = SvnUtil.fileFromUrl(myTarget, path, afterUrl);
- myDiffClient.doMerge(SVNURL.parseURIEncoded(beforeUrl), ((SvnRevisionNumber) before.getRevisionNumber()).getRevision(),
- SVNURL.parseURIEncoded(afterUrl), ((SvnRevisionNumber) after.getRevisionNumber()).getRevision(),
- afterPath, false, true, false, mySvnConfig.MERGE_DRY_RUN);
+ MergeClient client = myVcs.getFactory(myTarget).createMergeClient();
+ SvnTarget source1 = SvnTarget.fromURL(SVNURL.parseURIEncoded(beforeUrl), ((SvnRevisionNumber)before.getRevisionNumber()).getRevision());
+ SvnTarget source2 = SvnTarget.fromURL(SVNURL.parseURIEncoded(afterUrl), ((SvnRevisionNumber) after.getRevisionNumber()).getRevision());
+
+ client.merge(source1, source2, afterPath, SVNDepth.FILES, true, mySvnConfig.MERGE_DRY_RUN, false, false, mySvnConfig.getMergeOptions(),
+ myHandler);
}
- private void delete(final Change change) throws SVNException {
- if (myWcClient == null) {
- myWcClient = myVcs.createWCClient();
- myWcClient.setEventHandler(myHandler);
- }
+ private void delete(final Change change) throws SVNException, VcsException {
final SvnRepositoryContentRevision before = (SvnRepositoryContentRevision) change.getBeforeRevision();
final String path = myCurrentBranchUrl.toString();
final String beforeUrl = before.getFullPath();
final File beforePath = SvnUtil.fileFromUrl(myTarget, path, beforeUrl);
- myWcClient.doDelete(beforePath, false, mySvnConfig.MERGE_DRY_RUN);
+ DeleteClient client = myVcs.getFactory(myTarget).createDeleteClient();
+ client.delete(beforePath, false, mySvnConfig.MERGE_DRY_RUN, myHandler);
}
- private void add(final Change change) throws SVNException {
- if (myCopyClient == null) {
- myCopyClient = myVcs.createCopyClient();
- myCopyClient.setEventHandler(myHandler);
- }
+ private void add(final Change change) throws SVNException, VcsException {
final SvnRepositoryContentRevision after = (SvnRepositoryContentRevision) change.getAfterRevision();
final String path = myCurrentBranchUrl.toString();
final String afterUrl = after.getFullPath();
final File afterPath = SvnUtil.fileFromUrl(myTarget, path, afterUrl);
final SVNRevision revision = ((SvnRevisionNumber)after.getRevisionNumber()).getRevision();
- final SVNCopySource[] copySource = new SVNCopySource[]{new SVNCopySource(revision, revision, SVNURL.parseURIEncoded(afterUrl))};
// todo dry run
- myCopyClient.doCopy(copySource, afterPath, false, true, true);
+ CopyMoveClient client = myVcs.getFactory(myTarget).createCopyMoveClient();
+ client.copy(SvnTarget.fromURL(SVNURL.parseURIEncoded(afterUrl), revision), afterPath, revision, true, myHandler);
}
private static class ChangesComparator implements Comparator<Change> {
diff --git a/plugins/svn4idea/src/org/jetbrains/idea/svn/integrate/SvnKitMergeClient.java b/plugins/svn4idea/src/org/jetbrains/idea/svn/integrate/SvnKitMergeClient.java
index 59514f795a66..a3e79d8acc0f 100644
--- a/plugins/svn4idea/src/org/jetbrains/idea/svn/integrate/SvnKitMergeClient.java
+++ b/plugins/svn4idea/src/org/jetbrains/idea/svn/integrate/SvnKitMergeClient.java
@@ -61,6 +61,7 @@ public class SvnKitMergeClient extends BaseSvnClient implements MergeClient {
@NotNull SvnTarget source2,
@NotNull File destination,
@Nullable SVNDepth depth,
+ boolean useAncestry,
boolean dryRun,
boolean recordOnly,
boolean force,
@@ -71,7 +72,7 @@ public class SvnKitMergeClient extends BaseSvnClient implements MergeClient {
try {
createClient(diffOptions, handler).doMerge(source1.getURL(), source1.getPegRevision(), source2.getURL(), source2.getPegRevision(),
- destination, depth, true, force, dryRun, recordOnly);
+ destination, depth, useAncestry, force, dryRun, recordOnly);
}
catch (SVNException e) {
throw new VcsException(e);
diff --git a/plugins/svn4idea/src/org/jetbrains/idea/svn/treeConflict/MergeFromTheirsResolver.java b/plugins/svn4idea/src/org/jetbrains/idea/svn/treeConflict/MergeFromTheirsResolver.java
index 39279614a8e4..112208830668 100644
--- a/plugins/svn4idea/src/org/jetbrains/idea/svn/treeConflict/MergeFromTheirsResolver.java
+++ b/plugins/svn4idea/src/org/jetbrains/idea/svn/treeConflict/MergeFromTheirsResolver.java
@@ -23,6 +23,7 @@ import com.intellij.openapi.diff.impl.patch.formove.PatchApplier;
import com.intellij.openapi.fileEditor.FileDocumentManager;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.ui.DialogWrapper;
+import com.intellij.openapi.ui.MessageBuilder;
import com.intellij.openapi.ui.MessageType;
import com.intellij.openapi.ui.Messages;
import com.intellij.openapi.util.Comparing;
@@ -587,10 +588,14 @@ public class MergeFromTheirsResolver {
private boolean getAddedFilesPlaceOption() {
final SvnConfiguration configuration = SvnConfiguration.getInstance(myVcs.getProject());
boolean add = Boolean.TRUE.equals(configuration.TREE_CONFLICT_MERGE_THEIRS_NEW_INTO_OLD_PLACE);
- if (configuration.TREE_CONFLICT_MERGE_THEIRS_NEW_INTO_OLD_PLACE == null) {
- if (! containAdditions(myTheirsChanges) && ! containAdditions(myTheirsBinaryChanges)) return false;
- final int i = Messages.showYesNoDialog("Keep newly created file(s) in their original place?", TreeConflictRefreshablePanel.TITLE, "Keep", "Move",
- Messages.getQuestionIcon(), new DialogWrapper.DoNotAskOption() {
+ if (configuration.TREE_CONFLICT_MERGE_THEIRS_NEW_INTO_OLD_PLACE != null) {
+ return add;
+ }
+ if (!containAdditions(myTheirsChanges) && !containAdditions(myTheirsBinaryChanges)) {
+ return false;
+ }
+ return Messages.YES == MessageBuilder.yesNo(TreeConflictRefreshablePanel.TITLE, "Keep newly created file(s) in their original place?").yesText("Keep").noText("Move").doNotAsk(
+ new DialogWrapper.DoNotAskOption() {
@Override
public boolean isToBeShown() {
return true;
@@ -623,10 +628,7 @@ public class MergeFromTheirsResolver {
public String getDoNotShowMessage() {
return CommonBundle.message("dialog.options.do.not.ask");
}
- });
- add = Messages.YES == i;
- }
- return add;
+ }).show();
}
private boolean containAdditions(final List<Change> changes) {
diff --git a/plugins/svn4idea/src/org/jetbrains/idea/svn/update/AbstractUpdateIntegrateCrawler.java b/plugins/svn4idea/src/org/jetbrains/idea/svn/update/AbstractUpdateIntegrateCrawler.java
index 826f7532b3a0..f0de01f1e9b9 100644
--- a/plugins/svn4idea/src/org/jetbrains/idea/svn/update/AbstractUpdateIntegrateCrawler.java
+++ b/plugins/svn4idea/src/org/jetbrains/idea/svn/update/AbstractUpdateIntegrateCrawler.java
@@ -69,11 +69,15 @@ public abstract class AbstractUpdateIntegrateCrawler implements SvnWCRootCrawler
LOG.info(e);
myExceptions.add(new VcsException(e));
}
+ catch (VcsException e) {
+ LOG.info(e);
+ myExceptions.add(e);
+ }
}
protected abstract void showProgressMessage(ProgressIndicator progress, File root);
- protected abstract long doUpdate(File root) throws SVNException;
+ protected abstract long doUpdate(File root) throws SVNException, VcsException;
protected abstract boolean isMerge();
}
diff --git a/plugins/svn4idea/src/org/jetbrains/idea/svn/update/SvnIntegrateEnvironment.java b/plugins/svn4idea/src/org/jetbrains/idea/svn/update/SvnIntegrateEnvironment.java
index eac1bf899bff..7627b1ecc048 100644
--- a/plugins/svn4idea/src/org/jetbrains/idea/svn/update/SvnIntegrateEnvironment.java
+++ b/plugins/svn4idea/src/org/jetbrains/idea/svn/update/SvnIntegrateEnvironment.java
@@ -24,11 +24,12 @@ import org.jetbrains.annotations.Nullable;
import org.jetbrains.idea.svn.SvnBundle;
import org.jetbrains.idea.svn.SvnConfiguration;
import org.jetbrains.idea.svn.SvnVcs;
+import org.jetbrains.idea.svn.integrate.MergeClient;
import org.tmatesoft.svn.core.SVNException;
import org.tmatesoft.svn.core.SVNURL;
import org.tmatesoft.svn.core.io.SVNRepository;
-import org.tmatesoft.svn.core.wc.SVNDiffClient;
import org.tmatesoft.svn.core.wc.SVNRevision;
+import org.tmatesoft.svn.core.wc2.SvnTarget;
import java.io.File;
import java.util.ArrayList;
@@ -90,7 +91,7 @@ public class SvnIntegrateEnvironment extends AbstractSvnUpdateIntegrateEnvironme
}
}
- protected long doUpdate(final File root) throws SVNException {
+ protected long doUpdate(final File root) throws VcsException {
final SvnConfiguration svnConfig = SvnConfiguration.getInstance(myVcs.getProject());
MergeRootInfo info = svnConfig.getMergeRootInfo(root, myVcs);
@@ -99,12 +100,12 @@ public class SvnIntegrateEnvironment extends AbstractSvnUpdateIntegrateEnvironme
return 0;
}
- SVNDiffClient diffClient = myVcs.createDiffClient();
- diffClient.setEventHandler(myHandler);
- diffClient.doMerge(info.getUrl1(), info.getRevision1(),
- info.getUrl2(), info.getRevision2(), root,
- svnConfig.UPDATE_DEPTH, svnConfig.MERGE_DIFF_USE_ANCESTRY, false, svnConfig.MERGE_DRY_RUN, false);
+ MergeClient client = myVcs.getFactory(root).createMergeClient();
+ SvnTarget source1 = SvnTarget.fromURL(info.getUrl1(), info.getRevision1());
+ SvnTarget source2 = SvnTarget.fromURL(info.getUrl2(), info.getRevision2());
+ client.merge(source1, source2, root, svnConfig.UPDATE_DEPTH, svnConfig.MERGE_DIFF_USE_ANCESTRY, svnConfig.MERGE_DRY_RUN, false, false,
+ svnConfig.getMergeOptions(), myHandler);
svnConfig.LAST_MERGED_REVISION = getLastMergedRevision(info.getRevision2(), info.getUrl2());
return info.getResultRevision();
}
@@ -126,6 +127,7 @@ public class SvnIntegrateEnvironment extends AbstractSvnUpdateIntegrateEnvironme
}
else {
+ // TODO: Rewrite with command line implementation
SVNRepository repos = null;
try {
repos = myVcs.createRepository(svnURL2.toString());