Re: Is there a write opposite to "svn cat"?

2023-11-29 Thread Daniel Sahlberg
Den tis 28 nov. 2023 kl 16:13 skrev Nathan Hartman :

> On Mon, Nov 27, 2023 at 1:47 AM Daniel Sahlberg <
> daniel.l.sahlb...@gmail.com> wrote:
>
>> Den sön 26 nov. 2023 kl 22:51 skrev Graham Leggett via users <
>> users@subversion.apache.org>:
>>
>>> On 25 Nov 2023, at 13:40, Pavel Lyalyakin 
>>> wrote:
>>>
>>> `svnmucc put` perhaps?
>>> https://svnbook.red-bean.com/en/1.8/svn.ref.svnmucc.re.html
>>>
>>>
>>> From reading the manual it looks perfect, but I’m having no luck:
>>>
>>> [root@seawitch postgres]# cat db.sql | svnmucc put -
>>> file:///var/lib/svn/db/db.sql
>>>
>>> svnmucc: invalid option:
>>>
>>> Type 'svnmucc --help' for usage.
>>>
>>> Alas the error message mentions an invalid option, but doesn’t say which
>>> option, or why it is invalid.
>>>
>>
>> The documentation say:
>> [[[
>>   put SRC-FILE URL   : add or modify file URL with contents copied
>> from
>>SRC-FILE (use "-" to read from standard input)
>> ]]]
>>
>
>
> Probably we should expand the above doc to avoid future confusion, e.g.,
> "...SRC-FILE (to read from standard input, use "--" to stop option
> processing followed by "-" to indicate standard input)."
>

Thanks! I've committed this exact help text in r1914222.

Kind regards,
Daniel


Re: Is there a write opposite to "svn cat"?

2023-11-28 Thread Nathan Hartman
On Mon, Nov 27, 2023 at 1:47 AM Daniel Sahlberg 
wrote:

> Den sön 26 nov. 2023 kl 22:51 skrev Graham Leggett via users <
> users@subversion.apache.org>:
>
>> On 25 Nov 2023, at 13:40, Pavel Lyalyakin 
>> wrote:
>>
>> `svnmucc put` perhaps?
>> https://svnbook.red-bean.com/en/1.8/svn.ref.svnmucc.re.html
>>
>>
>> From reading the manual it looks perfect, but I’m having no luck:
>>
>> [root@seawitch postgres]# cat db.sql | svnmucc put -
>> file:///var/lib/svn/db/db.sql
>>
>> svnmucc: invalid option:
>>
>> Type 'svnmucc --help' for usage.
>>
>> Alas the error message mentions an invalid option, but doesn’t say which
>> option, or why it is invalid.
>>
>
> The documentation say:
> [[[
>   put SRC-FILE URL   : add or modify file URL with contents copied from
>SRC-FILE (use "-" to read from standard input)
> ]]]
>


Probably we should expand the above doc to avoid future confusion, e.g.,
"...SRC-FILE (to read from standard input, use "--" to stop option
processing followed by "-" to indicate standard input)."

Cheers
Nathan


Re: Is there a write opposite to "svn cat"?

2023-11-27 Thread Graham Leggett via users
On 27 Nov 2023, at 07:03, Lorenz via users  wrote:

> try svnmucc put -- - url

This was the secret, it worked thank you!

Regards,
Graham
—



Re: Is there a write opposite to "svn cat"?

2023-11-27 Thread Graham Leggett via users
On 27 Nov 2023, at 06:47, Daniel Sahlberg  wrote:

> Alas the error message mentions an invalid option, but doesn’t say which 
> option, or why it is invalid.
> 
> The documentation say:
> [[[
>   put SRC-FILE URL   : add or modify file URL with contents copied from
>SRC-FILE (use "-" to read from standard input)
> ]]]
> 
> So as far as I'm reading the documentation, the command you are using should 
> be supported. I would say this is a bug, either in the argument handling or 
> in the documentation.
> 
> Can you instead try:
> $ svnmucc put db.sql file:///var/lib/svn/db/db.sql
> 
> I will bring this discussion to the d...@subversion.apache.org 
>  to figure out if we need to change the 
> documentation or if we can fix the code.

The "svnmucc put db.sql file:///var/lib/svn/db/db.sql” worked.

The “— -“ also worked, I think this is a quirk of apr-util:

https://apr.apache.org/docs/apr/1.7/group__apr__getopt.html#ga80d6ff2213da4e25406b3f179fa13989

Ideally the return message of APR_BADARG needs to be updated to hint that a “—“ 
might be needed.

Regards,
Graham
—



Re: Is there a write opposite to "svn cat"?

2023-11-26 Thread Lorenz via users
try svnmucc put -- - url
-- 

Lorenz


Graham Leggett via users wrote:

>On 25 Nov 2023, at 13:40, Pavel Lyalyakin  
>wrote:
>
>> `svnmucc put` perhaps?
>> https://svnbook.red-bean.com/en/1.8/svn.ref.svnmucc.re.html
>
>From reading the manual it looks perfect, but I’m having no luck:
>
>[root@seawitch postgres]# cat db.sql | svnmucc put - 
>file:///var/lib/svn/db/db.sql
>svnmucc: invalid option: 
>Type 'svnmucc --help' for usage.
>
>Alas the error message mentions an invalid option, but doesn’t say which 
>option, or why it is invalid.
>
>Regards,
>Graham
>—



Re: Is there a write opposite to "svn cat"?

2023-11-26 Thread Daniel Sahlberg
Den sön 26 nov. 2023 kl 22:51 skrev Graham Leggett via users <
users@subversion.apache.org>:

> On 25 Nov 2023, at 13:40, Pavel Lyalyakin 
> wrote:
>
> `svnmucc put` perhaps?
> https://svnbook.red-bean.com/en/1.8/svn.ref.svnmucc.re.html
>
>
> From reading the manual it looks perfect, but I’m having no luck:
>
> [root@seawitch postgres]# cat db.sql | svnmucc put -
> file:///var/lib/svn/db/db.sql
>
> svnmucc: invalid option:
>
> Type 'svnmucc --help' for usage.
>
> Alas the error message mentions an invalid option, but doesn’t say which
> option, or why it is invalid.
>

The documentation say:
[[[
  put SRC-FILE URL   : add or modify file URL with contents copied from
   SRC-FILE (use "-" to read from standard input)
]]]

So as far as I'm reading the documentation, the command you are using
should be supported. I would say this is a bug, either in the argument
handling or in the documentation.

Can you instead try:
$ svnmucc put db.sql file:///var/lib/svn/db/db.sql

I will bring this discussion to the d...@subversion.apache.org to figure out
if we need to change the documentation or if we can fix the code.

Kind regards,
Daniel


Re: Is there a write opposite to "svn cat"?

2023-11-26 Thread Graham Leggett via users
On 25 Nov 2023, at 13:40, Pavel Lyalyakin  wrote:

> `svnmucc put` perhaps?
> https://svnbook.red-bean.com/en/1.8/svn.ref.svnmucc.re.html

From reading the manual it looks perfect, but I’m having no luck:

[root@seawitch postgres]# cat db.sql | svnmucc put - 
file:///var/lib/svn/db/db.sql
svnmucc: invalid option: 
Type 'svnmucc --help' for usage.

Alas the error message mentions an invalid option, but doesn’t say which 
option, or why it is invalid.

Regards,
Graham
—



Re: Is there a write opposite to "svn cat"?

2023-11-25 Thread Pavel Lyalyakin via users
On Sat, 25 Nov 2023 at 15:18, Graham Leggett via users
 wrote:
>
> Hi all,
>
> The “svn cat” command will read a file from a (in my case local file based) 
> repository to stdout. Is there an equivalent to write into a repository from 
> the svn command line?
>
> First prize from stdin, second prize from a local file on disk.
>
> “svn import” comes close, but cannot be run twice, as the second time the 
> command is run you get the following error:
>
> svn: E150002: Path 'file:///var/lib/svn/postgres/database.sql' already exists
>
> I know that it is possible to autocommit via WebDAV, but this is a local repo.
>
> Regards,
> Graham
> —
>

`svnmucc put` perhaps?
https://svnbook.red-bean.com/en/1.8/svn.ref.svnmucc.re.html

-- 
With best regards,
Pavel Lyalyakin
VisualSVN Team