Deduce the server URL from the current directory inside the working copy

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Deduce the server URL from the current directory inside the working copy

Anton Shepelev
Hello, all

I  find  it  mildly  annoying  to type the full path
within a repository for server-side file operations,
such as 'delete' and 'copy'.  Observe that, being on
Windows, I must use quotes in order  to  escape  the
caret character:

   svn rm "^/A/B/C/file.txt"

Is  there  a way to avoid the entry of the full path
when invoking this command from A/B/C/ in a  working
copy?   In  other  words, I should like to have some
syntax that told SVN to use the full sever-side path
of a file using the current directory within a work-
ing copy.  For example, instead of writing:

   svn rm "^/A/B/C/file.txt"

I could:

   cd Work/A/B/C
   svn rm "^^file.txt"

--
Please, do not forward replies to the list to my e-mail.

Reply | Threaded
Open this post in threaded view
|

Re: Deduce the server URL from the current directory inside the working copy

Bo Berglund
On Thu, 21 Dec 2017 14:57:34 +0300, Anton Shepelev
<[hidden email]> wrote:

>I could:
>
>   cd Work/A/B/C
>   svn rm "^^file.txt"
>

doesn't this work:
cd Work/A/B/C
svn rm file.txt

I am completely new to svn and I have no place to test this, but it
seems natural to do it like this sive subversion surely knows where
you are when issuing tha command....
(Came from CVS, where this is a natural way of commanding file
operations)


--
Bo Berglund
Developer in Sweden

Reply | Threaded
Open this post in threaded view
|

Re: Deduce the server URL from the current directory inside the working copy

Branko Čibej
On 21.12.2017 13:40, Bo Berglund wrote:

> On Thu, 21 Dec 2017 14:57:34 +0300, Anton Shepelev
> <[hidden email]> wrote:
>
>> I could:
>>
>>   cd Work/A/B/C
>>   svn rm "^^file.txt"
>>
> doesn't this work:
> cd Work/A/B/C
> svn rm file.txt
>
> I am completely new to svn and I have no place to test this, but it
> seems natural to do it like this sive subversion surely knows where
> you are when issuing tha command....
> (Came from CVS, where this is a natural way of commanding file
> operations)

That is a local operation and you have to 'svn commit' to make it
visible in the repository.

What the OP describes is an operation that directly affects the
repository, not the working copy.

-- Brane
Reply | Threaded
Open this post in threaded view
|

Re: Deduce the server URL from the current directory inside the working copy

Daniel Widenfalk-4
In reply to this post by Anton Shepelev
On 2017-12-21 12:57, Anton Shepelev wrote:

> Hello, all
>
> I  find  it  mildly  annoying  to type the full path
> within a repository for server-side file operations,
> such as 'delete' and 'copy'.  Observe that, being on
> Windows, I must use quotes in order  to  escape  the
> caret character:
>
>    svn rm "^/A/B/C/file.txt"
>
> Is  there  a way to avoid the entry of the full path
> when invoking this command from A/B/C/ in a  working
> copy?   In  other  words, I should like to have some
> syntax that told SVN to use the full sever-side path
> of a file using the current directory within a work-
> ing copy.  For example, instead of writing:
>
>    svn rm "^/A/B/C/file.txt"
>
> I could:
>
>    cd Work/A/B/C
>    svn rm "^^file.txt"

Hi,

On Windows you'd use a double-carret to quote it, i.e:

$ svn rm -m "fancy message goes here" ^^/A/B/C/file.txt

Could you explain why you'd want to do a server-side operation
on something which is locally accessible? I.e. why not do?

$ cd A/B/C
$ svn rm file.txt
$ svn commit -m "Another fancy message"

/D

--
             |\      _,,,---,,_
      ZZZzz /,`.-'`'    -.  ;-;;,_
           |,4-  ) )-,_. ,\ (  `'-'
---------'---''(_/--'--`-'\_)---------------------------------

Reply | Threaded
Open this post in threaded view
|

Re: Deduce the server URL from the current directory inside the working copy

Anton Shepelev
Daniel Widenfalk to Anton Shepelev:

>>I  find  it  mildly annoying to type the full path
>>within a repository for  server-side  file  opera-
>>tions, such as 'delete' and 'copy'.  Observe that,
>>being on Windows, I must use quotes  in  order  to
>>escape the caret character:
>>
>>   svn rm "^/A/B/C/file.txt"
>>
>>Is there a way to avoid the entry of the full path
>>when invoking this command from A/B/C/ in a  work-
>>ing  copy?   In other words, I should like to have
>>some syntax that told SVN to use the  full  sever-
>>side  path  of  a file using the current directory
>>within a working copy.  For  example,  instead  of
>>writing:
>>
>>   svn rm "^/A/B/C/file.txt"
>>
>>I could:
>>
>>   cd Work/A/B/C
>>   svn rm "^^file.txt"
>
>On  Windows  you'd use a double-carret to quote it,
>i.e:
>
>$ svn rm -m "fancy message goes here" ^^/A/B/C/file.txt

Thank you.

>Could you explain why you'd want to  do  a  server-
>side operation on something which is locally acces-
>sible?  I.e. why not do?
>
>$ cd A/B/C
>$ svn rm file.txt
>$ svn commit -m "Another fancy message"

To save time and HDD load, easier  to  simplify  the
use  of server-side 'svn info' e.g. to view lock in-
formation, &c. 'svn ls' kind of does it already...

--
Please, do not forward replies to the list to my e-mail.

Reply | Threaded
Open this post in threaded view
|

Re: Deduce the server URL from the current directory inside the working copy

Bo Berglund
In reply to this post by Branko Čibej
On Thu, 21 Dec 2017 14:14:23 +0100, Branko ?ibej <[hidden email]>
wrote:

>> doesn't this work:
>> cd Work/A/B/C
>> svn rm file.txt
>>

>That is a local operation and you have to 'svn commit' to make it
>visible in the repository.
>
>What the OP describes is an operation that directly affects the
>repository, not the working copy.

You are right, also in CVS there are two operations, one for he delete
and one for the commit. None of them needs any extra path to them.
Good, then they work similarly...


--
Bo Berglund
Developer in Sweden

Reply | Threaded
Open this post in threaded view
|

Re: Deduce the server URL from the current directory inside the working copy

Anton Shepelev
In reply to this post by Daniel Widenfalk-4
I wrote to Daniel Widenfalk:

>>>I  find  it mildly annoying to type the full path
>>>within a repository for server-side  file  opera-
>>>tions,  such  as  'delete'  and  'copy'.  Observe
>>>that, being on Windows, I must use quotes in  or-
>>>der to escape the caret character:
>>>
>>>   svn rm "^/A/B/C/file.txt"
>>>
>>>Is  there  a  way  to avoid the entry of the full
>>>path when invoking this command from A/B/C/ in  a
>>>working  copy?   In other words, I should like to
>>>have some syntax that told SVN to  use  the  full
>>>sever-side  path  of a file using the current di-
>>>rectory within a working copy.  For example,  in-
>>>stead of writing:
>>>
>>>   svn rm "^/A/B/C/file.txt"
>>>
>>>I could:
>>>
>>>   cd Work/A/B/C
>>>   svn rm "^^file.txt"
>>
>>Could  you  explain why you'd want to do a server-
>>side operation on something which is  locally  ac-
>>cessible?  I.e. why not do?
>>
>>$ cd A/B/C
>>$ svn rm file.txt
>>$ svn commit -m "Another fancy message"
>
>To  save  time and HDD load, easier to simplify the
>use of server-side 'svn info' e.g. to view lock in-
>formation, &c. 'svn ls' kind of does it already...

I think it would be a natural extension of the caren
syntax.

--
Please, do not forward replies to the list to my e-mail.