[prev in list] [next in list] [prev in thread] [next in thread] 

List:       subversion-users
Subject:    Re: Adding a shorthand URL syntax to cwd's URL (was: Re: Automatically supply the origin URL in svn 
From:       Anton Shepelev <anton.txt () gmail ! com>
Date:       2020-03-28 0:41:31
Message-ID: 20200328034131.5a5498bfad1873701b98f6a8 () gmail ! com
[Download RAW message or body]

Daniel Shahaf:

> Here are our notes about this from back when the ^/ syntax was
> added:
> 
> http://svn.apache.org/viewvc/subversion/trunk/notes/cli-repo-root-relative-support.txt?view=markup#l42

It takes care of cmd.exe, so ^^/ on Windows was a deliberate
tradeoff on your part.

> Tilde is also special to some shells, at least in the sh/csh
>  «~username » syntax and in zsh's  «foo~bar » syntax (also part of
> EXTENDED_GLOB);

That is why I proposed a double `~' -- not perfect, of course, but
I think none of the major shells will expand it. Of course, if I
were designing it from scratch I should try to pick a single ASCII
character that none of the common shells treat as special. I am not
even sure that such a character exists, does it?

> and more generally, there's the consistency
> aspect, as you mention.  That matters, for example, for scripts
> that want to escape arbitrary local paths when calling svn.
> Today, the rule is "Append an '@', and if it starts with a
> caret-slash then prepend './'."; it would be nice not to break
> this.

True.

> An --option sounds a little too specialized to me.  Also, it's a
> form of action at a distance (the positional arguments and the
> --option's presence would be coupled), whereas the ^/ syntax is
> self-contained.

Also true, but depends on one's viewpoint. I viewed
`svn cp --remote' as a command acting upon the remote repository
and `svn cp' as a command acting upon the working directory. In
other words -- as a remote and a local command: two different
commands with different interpretation of their arguments. Although
this view is factally wrong, it helps me understand SVN better,
because local operations and sever-side operations are in my
opinion very different, even though they fall into the same
categories of copy, delete, move, &c. They are like different
implementations of the same interface, but I divagate.

-- 
()  ascii ribbon campaign - against html e-mail
/\  http://preview.tinyurl.com/qcy6mjc [archived]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic