Discussion:
Deduce the server URL from the current directory inside the working copy
Anton Shepelev
2017-12-21 11:57:34 UTC
Permalink
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.
Bo Berglund
2017-12-21 12:40:45 UTC
Permalink
On Thu, 21 Dec 2017 14:57:34 +0300, Anton Shepelev
Post by Anton Shepelev
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
Branko Čibej
2017-12-21 13:14:23 UTC
Permalink
Post by Bo Berglund
On Thu, 21 Dec 2017 14:57:34 +0300, Anton Shepelev
Post by Anton Shepelev
cd Work/A/B/C
svn rm "^^file.txt"
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
Bo Berglund
2017-12-21 14:51:20 UTC
Permalink
Post by Branko Čibej
Post by Anton Shepelev
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
Daniel Widenfalk
2017-12-21 13:21:26 UTC
Permalink
Post by 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
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-
svn rm "^/A/B/C/file.txt"
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- ) )-,_. ,\ ( `'-'
---------'---''(_/--'--`-'\_)---------------------------------
Anton Shepelev
2017-12-21 13:48:30 UTC
Permalink
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
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
svn rm "^/A/B/C/file.txt"
cd Work/A/B/C
svn rm "^^file.txt"
On Windows you'd use a double-carret to quote it,
$ 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.
Anton Shepelev
2017-12-21 17:27:32 UTC
Permalink
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-
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-
svn rm "^/A/B/C/file.txt"
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.
Loading...