[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: no-op-copy -- was: Re: Defining atomic "replace"

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Thu, 13 Aug 2009 01:03:04 +0100

Neels J Hofmeyr wrote:
> + svn rm file
> D file
> + svn cp '^/file_at_1' file
> A file
> + svn st
> R + file
> + svn ci -m noop
> Replacing file
>
> Committed revision 2.
> + svn log file
> ------------------------------------------------------------------------
> r2 | neels | 2009-08-12 20:43:07 +0200 (Wed, 12 Aug 2009) | 1 line
>
> noop
> ------------------------------------------------------------------------
> r1 | neels | 2009-08-12 20:43:05 +0200 (Wed, 12 Aug 2009) | 1 line
>
> add
> ------------------------------------------------------------------------
> + svn diff -c 2
> [no diff output]
> ]]]
>
> So yes, svn currently permits this no-op.
> But I don't really understand the question. What do you mean by "can svn
> tell the difference"?

To answer my question you need to run "svn log -v". What I mean is: does
Subversion treat "replaced with SELF@(REV-1)" differently from a no-op?

Answer:
[[[
$ svn16 log -v --stop-on-copy wc/file
------------------------------------------------------------------------
r2 | julianfoad | 2009-08-13 00:37:37 +0100 (Thu, 13 Aug 2009) | 1 line
Changed paths:
   R /file (from /file:1)

noop
------------------------------------------------------------------------
]]]

and the --stop-on-copy stops there, which is very different from how a
completely no-op change would appear (or rather not appear) in history.

So Subversion CAN tell the difference between that and a no-op, even
though the diff is a no-op.

> Does anyone think this case is worth the trouble testing for? It would make
> an awful lot of sense to cancel this to void, but in practice ... the manual
> says "revert" anyway, right?

At the moment I don't mind that it works this way. Not sure what you
mean by "worth testing for".

- Julian

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2383080
Received on 2009-08-13 02:03:31 CEST

This is an archived mail posted to the Subversion Dev mailing list.