On 31 March 2016 at 02:19, Sam Ruby <ru...@intertwingly.net> wrote:
> On Wed, Mar 30, 2016 at 6:06 PM, sebb <seb...@gmail.com> wrote:
>> I just realised that we could use the svnmucc 'put' command to
>> simplify adding/modifying a file.
>>
>> There is no need to create a temporary checkout of the parent directory.
>>
>> One can even use '-' to put from standard input.
>
> Thanks!  Much cleaner:
>
> https://github.com/apache/whimsy/commit/8e74fe0267058e919b85380c956295e76689c2d9

The -r 0 qualifier is neat. I'd not noticed that before.

Not sure why you use stdin since the file already exists?
Why not pass the path on the command line?

>> Won't be suitable for everything, but might prove useful.
>>
>> Maybe worth creating a function to implement this?
>
> I remain unclear as to the value of a function, but you are welcome to
> explore that.
>
> Note that _.system, when called within _html, will create <pre
> class="_stdin'> and <pre class="_stdout"> elements that are placed in
> the html output.

Yes, I saw.

How does one call it outside _html?

> The board agenda tool has retry logic.  I don't yet see the common
> logic that merits refactoring, but perhaps you see something I have
> missed?
>
> And if truly common code, I'm open to including it in wunderbar.

I suppose the required code as above is quite short.

However it might be useful to create a version (or verions) that handle:
- put if absent (-r 0)
- put unconditionally
- put if newer (-r n)

Also the function could add the standard ['--no-auth-cache',
'--non-interactive'] qualifiers.

It looks as though svnmucc does not honour config [auto-props] so that
could be added to the put if absent code.

> - Sam Ruby

Reply via email to