subversion-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cooke, Mark" <mark.co...@siemens.com>
Subject RE: svn move directory will create a new revision for every file inside this directory?
Date Fri, 11 Jun 2010 13:19:55 GMT
> 
> You have already answered my question.
> It does not create a new revision for files inside directory 
> that was moved.
> 
> So, if I want to get FILE_A in REV 2 from path /DIR_B/DIR_A/FILE_A, I
> must use PEGREV 4
> 
While I think you have answered the question it still sounds like you misunderstand how subversion
handles revisions / version numbers.  A revision applies to the state of the _whole_repository_
at a point in the revision history.  There are no file-level version / revision numbers in
subversion, only whole-repository revisions (this is one of the reasons why we use separate
repositories for different projects).  It makes sense when you think that what you really
want is a set of files that compile together...

So if a file is changed between r99/r100 and again at r105 /r106 then (I believe) any peg
revision in the range 100..105 will be valid and return the same result.

As Bob asked earlier, have you read the first few chapters of the Red Book?

~ mark c

> 2010/6/10 Bob Archer <Bob.Archer@amsi.com>:
> >> Thanks for you replay.
> >>
> >> I heve the structure below:
> >>
> >> DIR_A - Rev 1
> >> ----> File_A - Rev 2
> >> DIR_B - Rev 3
> >>
> >> If I move DIR_A to inside DIR_B the structure will be as:
> >>
> >> DIR_B - Rev 3
> >> ---->DIR_A - Rev 4
> >> ---->----> File_A - Rev 2
> >>
> >> So, the directory has a new revision (Rev 4), but files inside this
> >> directory does not ( Rev 2).
> >>
> >> If i try to get this file from:
> >>  - REV: 2
> >>  - PEGREV: 2
> >>  - Path: DIR_B/DIR_A/FILE_A
> >> svn show error, because this path is not valid in PEGREV 2.
> >>
> >> Regards,
> >> Leo
> >
> > Yes... you are 100% correct. What is your question?
> >
> > I think you may be making the mistake of expecting the each 
> file is revisioned separately. That is not the case. In 
> rev2-4 your File_A is the same. however, in rev4 its path in 
> the repo is different than in rev2. But, I'm babbling without 
> really knowing what your question is. Have you read the first 
> chapter of the doc redbook? 
> http://svnbook.red-bean.com/nightly/en/svn-book.html
> >
> > BOb
> >
> >
> >>
> >>
> >>
> >> 2010/6/10 Bob Archer <Bob.Archer@amsi.com>:
> >> >> The command below will create a new revision for 
> directory SRC_REP_DIR?
> >> >> And for files inside this directory? Had a new revision too?
> >> >>
> >> >> "svn move SRC_REP_DIR DST_REP_DIR"
> >> >>
> >> >> Command above use repository not WC.
> >> >
> >> > That command is going to basically going to be the same as:
> >> >
> >> > svn copy SRC_REP_DIR DST_REP_DIR
> >> > svn delete SRC_REP_DIR
> >> >
> >> > Yes... a new revision will be created. The new path will 
> be in HEAD and
> >> the old path will not be.
> >> >
> >> > BOb
> >> >
> >> >
> >
> 

Mime
View raw message