You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Mohsin <mo...@gmail.com> on 2015/02/20 16:01:00 UTC

How to move folder from one path to another along with all revisions

Hi,

Suppose I have one folder in Repo1 (http://abc.com/SVN/Repo1/folder1) and I
have moved that folder to some new path which is (http://abc.com/SVN/Repo1).
Point is I want to move that folder along with all its revisions to new path
when i check history of that folder there should be all revisions instead of
one revision. Can someone tell how can i move folder along with all its
revisions to new path ?



Regards
Mohsin Abbas




--
View this message in context: http://subversion.1072662.n5.nabble.com/How-to-move-folder-from-one-path-to-another-along-with-all-revisions-tp192143.html
Sent from the Subversion Users mailing list archive at Nabble.com.

Re: How to move folder from one path to another along with all revisions

Posted by Nico Kadel-Garcia <nk...@gmail.com>.
On Fri, Feb 20, 2015 at 2:07 PM, Mohsin <mo...@gmail.com> wrote:
> Thanks all for your reply i'll try with svn mv command and get back to you if
> face any issue.
>
>
> Mohsin

There are a number of underlying reasons for this. It's partly that
the "mv" command isn't really a "mv", it's a "copy, then delete the
old one", and subversion does not discard history of deleted content.
This can actually cause fascinating problems trying to trace the
history of things.

If I may suggest, for bulky changes such as re-arranging a source
tree? Don't use "svn mv". Do it as several distinct transactions, one
an "svn tag" to record the old layout, then an "svn copy", then "svn
rm", then "svn tag" aagin to record the new layout for reference. This
can help reflect the transaction, and allow much easier historical
analysis.

Re: How to move folder from one path to another along with all revisions

Posted by Mohsin <mo...@gmail.com>.
Thanks all for your reply i'll try with svn mv command and get back to you if
face any issue.


Mohsin



--
View this message in context: http://subversion.1072662.n5.nabble.com/How-to-move-folder-from-one-path-to-another-along-with-all-revisions-tp192143p192157.html
Sent from the Subversion Users mailing list archive at Nabble.com.

Re: How to move folder from one path to another along with all revisions

Posted by Les Mikesell <le...@gmail.com>.
On Fri, Feb 20, 2015 at 9:01 AM, Mohsin <mo...@gmail.com> wrote:
> Hi,
>
> Suppose I have one folder in Repo1 (http://abc.com/SVN/Repo1/folder1) and I
> have moved that folder to some new path which is (http://abc.com/SVN/Repo1).
> Point is I want to move that folder along with all its revisions to new path
> when i check history of that folder there should be all revisions instead of
> one revision. Can someone tell how can i move folder along with all its
> revisions to new path ?

_All_ svn copies and moves retain the revision history of the
contents.  That's how branches and tags work, but it also applies to
any other copies.  You can use a url->url copy or check out the
directory above and 'svn copy' in the workspace before committing back
with the same result.   Also note that even if you move a path, it can
still be accessed at it's previous path and revisions using the peg
syntax:  path@revision.

-- 
    Les Mikesell
      lesmikesell@gmail.com

AW: How to move folder from one path to another along with all revisions

Posted by "Stohr, Alexander" <Al...@HDLE.com>.
When using the Tortoise SVN client i would open RepoBrowser
and move it in the repo. I am not sure if that will preserve history but it's the most powerful thing I am aware of.

-Alex.

Re: How to move folder from one path to another along with all revisions

Posted by Stefan Hett <st...@egosoft.com>.
This is the whole purpose of the svn mv-command. The history is kept if 
you use that command. Or am I getting your question wrong?

Regards,
Stefan
> Thanks but my second question was how do i move folder to new path with all
> its revision history ? Is it possible or we can't do this ? Actually moving
> folder to new path is easy but question is moving folder with all its
> history revisions to new path too.
>
>
> Mohsin
>
>
>
> --
> View this message in context: http://subversion.1072662.n5.nabble.com/How-to-move-folder-from-one-path-to-another-along-with-all-revisions-tp192143p192148.html
> Sent from the Subversion Users mailing list archive at Nabble.com.
>


Aw: Re: How to move folder from one path to another along with all revisions

Posted by Andreas Stieger <An...@gmx.de>.
> Thanks but my second question was how do i move folder to new path with all
> its revision history ? Is it possible or we can't do this ? Actually moving
> folder to new path is easy but question is moving folder with all its
> history revisions to new path too.

svn mv/cp *retains* *all* *history*, as mentioned in TFM you were linked to.

Andreas

Re: How to move folder from one path to another along with all revisions

Posted by jb...@icloud.com.
If it makes you feel better, you can use "svn rename" instead.



> On Feb 20, 2015, at 8:39 AM, Mohsin <mo...@gmail.com> wrote:
> 
> Thanks but my second question was how do i move folder to new path with all
> its revision history ? Is it possible or we can't do this ? Actually moving
> folder to new path is easy but question is moving folder with all its
> history revisions to new path too.
> 
> 
> Mohsin
> 


Re: How to move folder from one path to another along with all revisions

Posted by Mohsin <mo...@gmail.com>.
Thanks but my second question was how do i move folder to new path with all
its revision history ? Is it possible or we can't do this ? Actually moving
folder to new path is easy but question is moving folder with all its
history revisions to new path too.


Mohsin



--
View this message in context: http://subversion.1072662.n5.nabble.com/How-to-move-folder-from-one-path-to-another-along-with-all-revisions-tp192143p192148.html
Sent from the Subversion Users mailing list archive at Nabble.com.

Re: How to move folder from one path to another along with all revisions

Posted by Stefan Hett <st...@egosoft.com>.
http://svnbook.red-bean.com/en/1.7/svn.ref.svn.c.move.html
> Hi,
>
> Suppose I have one folder in Repo1 (http://abc.com/SVN/Repo1/folder1) and I
> have moved that folder to some new path which is (http://abc.com/SVN/Repo1).
> Point is I want to move that folder along with all its revisions to new path
> when i check history of that folder there should be all revisions instead of
> one revision. Can someone tell how can i move folder along with all its
> revisions to new path ?
>
>
>
> Regards
> Mohsin Abbas
>
>
>
>
> --
> View this message in context: http://subversion.1072662.n5.nabble.com/How-to-move-folder-from-one-path-to-another-along-with-all-revisions-tp192143.html
> Sent from the Subversion Users mailing list archive at Nabble.com.
>