2 * Copyright 2000-2009 JetBrains s.r.o.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
16 package org
.jetbrains
.idea
.svn
.update
;
18 import org
.tmatesoft
.svn
.core
.wc
.SVNRevision
;
19 import org
.tmatesoft
.svn
.core
.wc
.SVNWCClient
;
20 import org
.tmatesoft
.svn
.core
.SVNURL
;
21 import org
.tmatesoft
.svn
.core
.SVNException
;
22 import org
.jetbrains
.idea
.svn
.SvnVcs
;
26 public class MergeRootInfo
{
27 private String myUrl1
;
28 private SVNRevision myRevision1
;
29 private String myUrl2
;
30 private SVNRevision myRevision2
;
32 public MergeRootInfo(File file
, SvnVcs vcs
) {
33 myRevision1
= SVNRevision
.HEAD
;
34 myRevision2
= SVNRevision
.HEAD
;
37 SVNWCClient wcClient
= vcs
.createWCClient();
38 final SVNURL url
= wcClient
.doInfo(file
, SVNRevision
.WORKING
).getURL();
39 myUrl1
= url
.toString();
40 myUrl2
= url
.toString();
42 catch (SVNException e
) {
49 public SVNURL
getUrl1() {
51 return SVNURL
.parseURIDecoded(myUrl1
);
53 catch (SVNException e
) {
58 public SVNURL
getUrl2() {
60 return SVNURL
.parseURIDecoded(myUrl2
);
62 catch (SVNException e
) {
67 public SVNRevision
getRevision2() {
71 public SVNRevision
getRevision1() {
75 public long getResultRevision() {
76 return myRevision2
.getNumber();
79 public void setUrl1(final String text
) {
83 public void setUrl2(final String text
) {
87 public void setRevision1(final SVNRevision rev
) {
91 public void setRevision2(final SVNRevision rev
) {
95 public String
getUrlString1() {
99 public String
getUrlString2() {