List Info

Thread: SVNKit w/o Native IO




SVNKit w/o Native IO
user name
2007-10-26 12:53:44
One of the applications in which I'd like to use SVNKit is
running 
unavoidably under JDK 1.3.1.  Though I was (surprisingly)
unable to find 
an explicit statement to this effect, it appears that SVNKit
requires 
java.nio, hence JDK 1.4+.  Is it possible to use SVNKit
without 
java.nio?  Would it be feasible to modify the source to
abstract away 
this dependency?  Has anyone done so?

------------------------------------------------------------
---------
To unsubscribe, e-mail: svnkit-users-unsubscribesvnkit.com
For additional commands, e-mail: svnkit-users-helpsvnkit.com


Re: SVNKit w/o Native IO
user name
2007-10-29 04:05:10
Hello Sam,

Unfortunately, SVNKit's minimal requirement for JDK is 1.4.
I think my 
colleague Alex Kitaev will consult you on whether it's 
possible to 
abstract from 1.4 dependencies.
----
Alexander Sinyushkin,
TMate Software,
http://svnkit.com/ - Java
[Sub]Versioning Library!

Sam Neth wrote:
> One of the applications in which I'd like to use SVNKit
is running 
> unavoidably under JDK 1.3.1.  Though I was
(surprisingly) unable to find 
> an explicit statement to this effect, it appears that
SVNKit requires 
> java.nio, hence JDK 1.4+.  Is it possible to use SVNKit
without 
> java.nio?  Would it be feasible to modify the source to
abstract away 
> this dependency?  Has anyone done so?
> 
>
------------------------------------------------------------
---------
> To unsubscribe, e-mail: svnkit-users-unsubscribesvnkit.com
> For additional commands, e-mail: svnkit-users-helpsvnkit.com
> 
> 
> 

------------------------------------------------------------
---------
To unsubscribe, e-mail: svnkit-users-unsubscribesvnkit.com
For additional commands, e-mail: svnkit-users-helpsvnkit.com


usage of merge interfaces
user name
2007-10-29 09:50:06
Hi,
I need to perform some additional file checks before merging
binary
files in my program. Based on the checks  it will continue
merge or skip
merge for that particular file. The following is my code
snippet,

class MyMergerFactory implements ISVNMergerFactory
    {
        public ISVNMerger createMerger(byte[] arg0, byte[]
arg1, byte[]
arg2)
        {           
            return new MyMerger(arg0,arg1,arg2);
        }       
    }
   
    class MyMerger implements ISVNMerger
    {   
        private ISVNMergerFactory defaultfactory =
SVNWCUtil.createDefaultOptions(true).getMergerFactory();
        private ISVNMerger merger = null;
        public MyMerger(byte[] arg0, byte[] arg1, byte[]
arg2)
        {
            merger =
defaultfactory.createMerger(arg0,arg1,arg2);
        }
       
        public SVNStatusType mergeText(File arg0, File arg1,
File arg2,
boolean arg3, SVNDiffOptions arg4, OutputStream arg5) throws
SVNException
        {           
            return merger.mergeText(arg0, arg1, arg2, arg3,
arg4, arg5);
        }

        public SVNStatusType mergeBinary(File arg0, File
localfile, File
latestfile, boolean arg3, OutputStream arg4) throws
SVNException
        {
           //logic to decide whether to skip or continue
          //if(skip)
          //return SVNStatusType.UNCHANGED;
                      
           return merger.mergeBinary(arg0,
localfile,latestfile,arg3, arg4);
        }      
    }
I am trying to use the default merger and the merge factory
for text
files.  For binary files I am checking my conditions to skip
, otherwise
using the default implementation of svnkit to merge. If I
identify , I
need to skip merging a particular file, my method simply
returns
SVNStatusType.UNCHANGED.

This works fine. But, does my implementation honor all the
rules?  Am I
using the interfaces correctly?

Thanks in advance,
Prem.

------------------------------------------------------------
---------
To unsubscribe, e-mail: svnkit-users-unsubscribesvnkit.com
For additional commands, e-mail: svnkit-users-helpsvnkit.com


Re: usage of merge interfaces
user name
2007-10-29 11:01:58
Hello Premshaw,

Your implementation looks correctly.. though I did believe
that we had 
an option in SVNKit to make it merge binary files. But now
all I see is 
that DefaultSVNMerger.mergeBinary() always returns 
SVNStatusType.CONFLICTED.
----
Alexander Sinyushkin,
TMate Software,
http://svnkit.com/ - Java
[Sub]Versioning Library!

Premshaw wrote:
> Hi,
> I need to perform some additional file checks before
merging binary
> files in my program. Based on the checks  it will
continue merge or skip
> merge for that particular file. The following is my
code snippet,
> 
> class MyMergerFactory implements ISVNMergerFactory
>     {
>         public ISVNMerger createMerger(byte[] arg0,
byte[] arg1, byte[]
> arg2)
>         {           
>             return new MyMerger(arg0,arg1,arg2);
>         }       
>     }
>    
>     class MyMerger implements ISVNMerger
>     {   
>         private ISVNMergerFactory defaultfactory =
>
SVNWCUtil.createDefaultOptions(true).getMergerFactory();
>         private ISVNMerger merger = null;
>         public MyMerger(byte[] arg0, byte[] arg1,
byte[] arg2)
>         {
>             merger =
defaultfactory.createMerger(arg0,arg1,arg2);
>         }
>        
>         public SVNStatusType mergeText(File arg0, File
arg1, File arg2,
> boolean arg3, SVNDiffOptions arg4, OutputStream arg5)
throws SVNException
>         {           
>             return merger.mergeText(arg0, arg1, arg2,
arg3, arg4, arg5);
>         }
> 
>         public SVNStatusType mergeBinary(File arg0,
File localfile, File
> latestfile, boolean arg3, OutputStream arg4) throws
SVNException
>         {
>            //logic to decide whether to skip or
continue
>           //if(skip)
>           //return SVNStatusType.UNCHANGED;
>                       
>            return merger.mergeBinary(arg0,
localfile,latestfile,arg3, arg4);
>         }      
>     }
> I am trying to use the default merger and the merge
factory for text
> files.  For binary files I am checking my conditions to
skip , otherwise
> using the default implementation of svnkit to merge. If
I identify , I
> need to skip merging a particular file, my method
simply returns
> SVNStatusType.UNCHANGED.
> 
> This works fine. But, does my implementation honor all
the rules?  Am I
> using the interfaces correctly?
> 
> Thanks in advance,
> Prem.
> 
>
------------------------------------------------------------
---------
> To unsubscribe, e-mail: svnkit-users-unsubscribesvnkit.com
> For additional commands, e-mail: svnkit-users-helpsvnkit.com
> 
> 
> 

------------------------------------------------------------
---------
To unsubscribe, e-mail: svnkit-users-unsubscribesvnkit.com
For additional commands, e-mail: svnkit-users-helpsvnkit.com


[1-4]

about | contact  Other archives ( Real Estate discussion Medical topics )