Merging file to file requires specifying source file by its URL

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Merging file to file requires specifying source file by its URL

Daniel Shahaf-2
I'm trying to merge trunk/CHANGES into branches/1.9.x/CHANGES.  I have
two separate working copies: the current directory (./) is a working
copy of branches/1.9.x and ../wc-of-trunk is a working copy of /trunk.
When I try the sync merge syntax with file targets, I get an error:
.
    $ svn merge ../wc-of-trunk/CHANGES@HEAD CHANGES
    subversion/svn/merge-cmd.c:407,
    subversion/svn/merge-cmd.c:54: (apr_err=SVN_ERR_CLIENT_BAD_REVISION)
    svn: E195002: Invalid merge source 'CHANGES'; a working copy path can only be used with a repository revision (a number, a date, or head)
.
I get that error whether or not I pass the @HEAD peg revision on the
source argument.

If I pass -r HEAD, I get a different error:
.
    $ svn merge -r HEAD ^/subversion/trunk/CHANGES CHANGES
    subversion/svn/svn.c:3097: (apr_err=SVN_ERR_CL_INSUFFICIENT_ARGS)
    svn: E205001: Try 'svn help merge' for more information
    subversion/svn/merge-cmd.c:357: (apr_err=SVN_ERR_CL_INSUFFICIENT_ARGS)
    svn: E205001: Second revision required
.
I get that error even if I change the source argument to a local path.

The odd thing is that if I take the original command, and replace the
source argument by its URL, it works:
.
    $ svn merge ^/subversion/trunk/CHANGES CHANGES
    --- Merging r1771273 through r1800349 into 'CHANGES':
    U    CHANGES
    --- Recording mergeinfo for merge of r1771273 through r1800349 into 'CHANGES':
     U   CHANGES

So: how can I do a sync merge of file targets without specifying the
full URL of the source?

I'm using a 1.10-dev client.

Cheers,

Daniel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Merging file to file requires specifying source file by its URL

Branko Čibej
On 30.06.2017 06:04, Daniel Shahaf wrote:
> I'm trying to merge trunk/CHANGES into branches/1.9.x/CHANGES.  I have
> two separate working copies: the current directory (./) is a working
> copy of branches/1.9.x and ../wc-of-trunk is a working copy of /trunk.
> When I try the sync merge syntax with file targets, I get an error:
> .
>     $ svn merge ../wc-of-trunk/CHANGES@HEAD CHANGES

Perhaps @WORKING? @HEAD refers to the repository, not the working copy.

-- Brane

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Merging file to file requires specifying source file by its URL

Daniel Shahaf-2
Branko Čibej wrote on Fri, 30 Jun 2017 06:18 +0200:
> On 30.06.2017 06:04, Daniel Shahaf wrote:
> > I'm trying to merge trunk/CHANGES into branches/1.9.x/CHANGES.  I have
> > two separate working copies: the current directory (./) is a working
> > copy of branches/1.9.x and ../wc-of-trunk is a working copy of /trunk.
> > When I try the sync merge syntax with file targets, I get an error:
> > .
> >     $ svn merge ../wc-of-trunk/CHANGES@HEAD CHANGES
>
> Perhaps @WORKING? @HEAD refers to the repository, not the working copy.

What would that mean?  foo@WORKING would include any local mods to foo,
and those are not representable in svn:mergeinfo.

That said, I gave it a try:

$ svn merge ../wc-of-trunk/CHANGES@WORKING CHANGES
subversion/svn/merge-cmd.c:318,
subversion/libsvn_subr/opt.c:832: (apr_err=SVN_ERR_CL_ARG_PARSING_ERROR)
svn: E205000: Syntax error parsing peg revision 'WORKING'

If I force it to use svn_opt_revision_working, I get the previous error again:

$ …/subversion/svn/svn merge ../wc-of-trunk/CHANGES@WORKING CHANGES
subversion/svn/merge-cmd.c:405,
subversion/svn/merge-cmd.c:54: (apr_err=SVN_ERR_CLIENT_BAD_REVISION)
svn: E195002: Invalid merge source '../wc-of-trunk/CHANGES'; a working copy path can only be used with a repository revision (a number, a date, or head)

Cheers,

Daniel
Loading...