You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Davin McCall <da...@deakin.edu.au> on 2008/03/07 00:57:22 UTC
JavaHL bindings - force commit?
Hi,
Am I missing something or do the JavaHL bindings not allow a forced
commit? (A commit of a file which is not up-to-date). Is there any way
to achieve it?
Google / FAQ tell me nothing...
Davin.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: JavaHL bindings - force commit?
Posted by Erik Huelsmann <eh...@gmail.com>.
On 3/7/08, Davin McCall <da...@deakin.edu.au> wrote:
> C. Michael Pilato wrote:
> > Beginning in Subversion 1.5, you'll be able to do this:
> >
> > svn update /path/to/out-of-date/file --accept=mine -r105
> > svn commit /path/to/out-of-date/file
> >
> > In prior versions, you had to run update on the file, let the conflict
> > happen, and then scriptishly swap the .rMINE file atop your working
> > file, run 'svn resolved' on the file, and then commit.
> >
>
> Thanks; but am I correct in thinking this "--accept" option is only for
> merge-conflict resolution? That is, if the "svn update" command performs
> the merge successfully, the "--accept=mine" has no effect and the local
> file now has both the changes between r100 and r105 as well as the local
> changes, which is not what I want. I want to ignore the changes between
> r100 and r105 unconditionally.
Then the only remaining option is to copy your working copy file
aside, update and copy it back on top of the updated file.
HTH,
Erik.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: JavaHL bindings - force commit?
Posted by Davin McCall <da...@deakin.edu.au>.
C. Michael Pilato wrote:
> Beginning in Subversion 1.5, you'll be able to do this:
>
> svn update /path/to/out-of-date/file --accept=mine -r105
> svn commit /path/to/out-of-date/file
>
> In prior versions, you had to run update on the file, let the conflict
> happen, and then scriptishly swap the .rMINE file atop your working
> file, run 'svn resolved' on the file, and then commit.
>
Thanks; but am I correct in thinking this "--accept" option is only for
merge-conflict resolution? That is, if the "svn update" command performs
the merge successfully, the "--accept=mine" has no effect and the local
file now has both the changes between r100 and r105 as well as the local
changes, which is not what I want. I want to ignore the changes between
r100 and r105 unconditionally.
Davin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: JavaHL bindings - force commit?
Posted by "C. Michael Pilato" <cm...@collab.net>.
Davin McCall wrote:
> Surely there is there some way to do this (from the command line)?
> (Ideally, it would involve specifying that I specifically want to
> replace revision 105, so that if there have been subsequent commits that
> I'm not aware of I will still get a conflict; that is, the commit would
> not be totally unconditional).
Beginning in Subversion 1.5, you'll be able to do this:
svn update /path/to/out-of-date/file --accept=mine -r105
svn commit /path/to/out-of-date/file
In prior versions, you had to run update on the file, let the conflict
happen, and then scriptishly swap the .rMINE file atop your working file,
run 'svn resolved' on the file, and then commit.
--
C. Michael Pilato <cm...@collab.net>
CollabNet <> www.collab.net <> Distributed Development On Demand
Re: JavaHL bindings - force commit?
Posted by Davin McCall <da...@deakin.edu.au>.
Mark Phippard wrote:
> This command:
>
> svn ci --force -m "Commit out of date file" FOO
>
> Does not allow you to commit an out of date file. So JavaHL would not
> allow it either. In fact, the above command yields this error:
>
So it does. Why is that? Shouldn't I be able to force a commit? I can
with CVS.
The situation is:
1) I have a file which is out-of-date by virtue that someone else has
committed a new version and I haven't yet updated. Let's say that the
base revision of my file is 100 and revision 105 is the latest in the
repository.
2) My own copy of the file has local changes
3) I want to commit my copy as the new version, without
incorporating/merging any changes
Surely there is there some way to do this (from the command line)?
(Ideally, it would involve specifying that I specifically want to
replace revision 105, so that if there have been subsequent commits that
I'm not aware of I will still get a conflict; that is, the commit would
not be totally unconditional).
I guess I can check out the file to a temporary directory, copy my
changed version over it and then commit it from there. But I thought
that there'd be a better way.
> but JavaHL only exposes libsvn_client by
> design. That is what makes it a "high level" API.
Sure, but what I am talking about really is a "high level" operation.
> If the low level
> Subversion API can do this, then you can probably do it using SVNKit.
>
> http://svnkit.com/
>
I was hoping to avoid using SVNKit-specific functionality. It would be
nice if what I am doing would work with either JavaHL + native bindings
or SVNKit.
Thanks for your response,
Davin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: JavaHL bindings - force commit?
Posted by Mark Phippard <ma...@gmail.com>.
On Thu, Mar 6, 2008 at 7:57 PM, Davin McCall <da...@deakin.edu.au> wrote:
> Am I missing something or do the JavaHL bindings not allow a forced
> commit? (A commit of a file which is not up-to-date). Is there any way
> to achieve it?
The JavaHL bindings basically expose libsvn_client API to Java. Which
also basically makes it the same as what you can do using the CLI.
This command:
svn ci --force -m "Commit out of date file" FOO
Does not allow you to commit an out of date file. So JavaHL would not
allow it either. In fact, the above command yields this error:
Subcommand 'commit' doesn't accept option '--force'
Type 'svn help commit' for usage.
I do not know if at the lower levers of the Subversion API you can
commit an out of date file, but JavaHL only exposes libsvn_client by
design. That is what makes it a "high level" API. If the low level
Subversion API can do this, then you can probably do it using SVNKit.
http://svnkit.com/
--
Thanks
Mark Phippard
http://markphip.blogspot.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org