You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Jean-Claude Antonio <jc...@arcetis.com> on 2008/09/15 19:11:52 UTC

Set attribute with svnserve protocole

Hello,

I al trying to set an attribute value on a file and this piece of code 
works fine with the http protocole but not the svnserve protocole.
with svnserve protocole the file is created but no attribute was set.

        ISVNEditor editor = 
repository.getCommitEditor("xxxxxxxxxxxchange properties", null);
        editor.openRoot(-1);

        String file = "my.file";
        editor.addFile(file, null, -1);
        editor.applyTextDelta(file, null);

        editor.changeFileProperty(file, "prop", 
SVNPropertyValue.create("value"));
        SVNDeltaGenerator deltaGenerator = new SVNDeltaGenerator();
        String checksum = deltaGenerator.sendDelta(file, new 
ByteArrayInputStream("".getBytes()), editor, true);

        editor.closeFile(file, checksum);
        editor.closeDir();

Kind regards,

JC

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Set attribute with svnserve protocole

Posted by Mark Phippard <ma...@gmail.com>.
On Mon, Sep 15, 2008 at 3:11 PM, Jean-Claude Antonio
<jc...@arcetis.com> wrote:

> I al trying to set an attribute value on a file and this piece of code works
> fine with the http protocole but not the svnserve protocole.
> with svnserve protocole the file is created but no attribute was set.
>
>       ISVNEditor editor = repository.getCommitEditor("xxxxxxxxxxxchange
> properties", null);
>       editor.openRoot(-1);
>
>       String file = "my.file";
>       editor.addFile(file, null, -1);
>       editor.applyTextDelta(file, null);
>
>       editor.changeFileProperty(file, "prop",
> SVNPropertyValue.create("value"));
>       SVNDeltaGenerator deltaGenerator = new SVNDeltaGenerator();
>       String checksum = deltaGenerator.sendDelta(file, new
> ByteArrayInputStream("".getBytes()), editor, true);
>
>       editor.closeFile(file, checksum);
>       editor.closeDir();

It looks like you are using SVNKit, not Subversion.  You should email
support@svnkit.com


-- 
Thanks

Mark Phippard
http://markphip.blogspot.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org