You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Mojca Miklavec <mo...@gmail.com> on 2014/01/15 22:05:04 UTC

difference between svn copy -r REV SRC and SRC@REV

Hi,

I was wondering whether "-r REV SRC" and "SRC@REV" in "svn copy" are
supposed to behave differently or not.

I was trying to recover a file that has already been deleted from the
repository, but using "-r" syntax failed to work while @REV completed
successfully:

> svn copy -r 10 ^/trunk/path/to/my/file.txt .
svn: E160013: '/repository/name/!svn/bc/25/trunk/path/to/my/file.txt'
path not found
> svn copy ^/trunk/path/to/my/file.txt@10 .
A         /here/file.txt

On the other hand, if the file still exists, the "-r REV" syntax works
just fine and copies the old file (revision 10 in the above example).
Is this expected?

I'm using SVN 1.8.5 (and also tried with the trunk version which
behaves the same), while the server uses SVN 1.6.11.

Mojca

(PS: If necessary I can provide real URLs.)

Re: difference between svn copy -r REV SRC and SRC@REV

Posted by Mojca Miklavec <mo...@gmail.com>.
On Wed, Jan 15, 2014 at 10:19 PM, Ben Reser wrote:
> On 1/15/14, 1:05 PM, Mojca Miklavec wrote:
>> I was wondering whether "-r REV SRC" and "SRC@REV" in "svn copy" are
>> supposed to behave differently or not.
>
> Yes they have different behavior.  You probably want to read about Peg and
> Operative Revisions here:
> http://svnbook.red-bean.com/en/1.7/svn.advanced.pegrevs.html

Thank you very much.

I probably asked too fast. I just found the same link on
    http://stackoverflow.com/questions/6591938/svn-copy-r-revision-number-url-path

(I was trying to find the information via "svn help copy" earlier, but
the help page wasn't informative enough for this particular case.)

Mojca

Re: difference between svn copy -r REV SRC and SRC@REV

Posted by Ben Reser <be...@reser.org>.
On 1/15/14, 1:05 PM, Mojca Miklavec wrote:
> I was wondering whether "-r REV SRC" and "SRC@REV" in "svn copy" are
> supposed to behave differently or not.

Yes they have different behavior.  You probably want to read about Peg and
Operative Revisions here:
http://svnbook.red-bean.com/en/1.7/svn.advanced.pegrevs.html