Results 1 to 9 of 9

Thread: Reg. Copy operation in SVN

  1. #1

    Reg. Copy operation in SVN

    I need to copy a folder to tags folder in SVN repository without recursively. But the SVN copy API do copying all the subfolders and its files recursively.

    Is there anyway to do non recursive copy? Any APIs availabel for that? I need to copy to the respository, so i can't use the checkout option with non recursive flag.

    Can any of you help me on this.

    Any help will be greatly appreciated.

    Thanks in advance..

  2. #2
    If you're copying non-recursively, you aren't making a true copy of the folder, are you?

    It sounds like you're misunderstanding what the a tag is conventionally used for.
    I am neither an employee nor customer of WANDisco.

  3. #3
    Quote Originally Posted by andyl View Post
    If you're copying non-recursively, you aren't making a true copy of the folder, are you?

    It sounds like you're misunderstanding what the a tag is conventionally used for.
    No, I know the usability of tags folder. Thinking for the possibilities of having the copy of modified files for that particular version in the tags folder instead of having copied all the files.

    Is there any API to copy single file or we can copy only based on folders..

  4. #4
    Quote Originally Posted by Thenmozhi View Post
    No, I know the usability of tags folder. Thinking for the possibilities of having the copy of modified files for that particular version in the tags folder instead of having copied all the files.
    Then you are not using tags in the way that they are conventionally used. This will confuse anyone who is accustomed to using tags the normal way when they see your repository.

    Copies are cheap, but you will actually consume more space by doing what you're proposing.

    Quote Originally Posted by Thenmozhi View Post
    Is there any API to copy single file or we can copy only based on folders..
    Files and directories are copied identically. svn copy doesn't care what you're copying, a versioned item is a versioned item when you're copying - it's just a pointer.

    Where you're stumbling is that you can't selectively/non-recursively copy, because as I pointed out before that isn't really a copy. To do what you want, you need to create a new directory for your tag, then selectively copy your items one at a time.

    It'll take up more space because your recursive copy (which you don't seem to want to do) is a single commit with a single pointer back to the original; doing what I describe above requires multiple commits and multiple pointers.
    I am neither an employee nor customer of WANDisco.

  5. #5
    Thanks for your reply and suggestions. Let me think of it.

  6. #6
    Here I can explain what i meant of copying tags folder recursively with an example,

    In my repository i'm having folder structure as ReposRoot/MyRoot/MySubfolder. First time when i apply label on the folder "MySubFolder", the tags folder will be created under the location, "ReposRoot/MyRoot/tags". And then "ReposRoot/MyRoot/tags/<LabelName>/MySubfolder" will be created to copy the contents of MySubfolder. Next time if i'm going to apply label on the parent folder "MyRoot", so here too, the tags folder will be created and under that folder with label name also created as ReposRoot/tags/<LabelName>/MyRoot. And copy the whole contents of MyRoot folder into that.

    Here is it really necessary to copy the tags folder of "MYSubfolder" that was created when label applied on that folder?? I don't want to copy those tags folder of sub folders when applying label on parent folders. If we need this copy, what is the real purpose of it or if it is unnecessary how can we avoid copying these?

    Any help will be greatly appreciated.

  7. #7
    Quote Originally Posted by Thenmozhi View Post
    Here I can explain what i meant of copying tags folder recursively with an example,

    In my repository i'm having folder structure as ReposRoot/MyRoot/MySubfolder. First time when i apply label on the folder "MySubFolder", the tags folder will be created under the location, "ReposRoot/MyRoot/tags". And then "ReposRoot/MyRoot/tags/<LabelName>/MySubfolder" will be created to copy the contents of MySubfolder. Next time if i'm going to apply label on the parent folder "MyRoot", so here too, the tags folder will be created and under that folder with label name also created as ReposRoot/tags/<LabelName>/MyRoot. And copy the whole contents of MyRoot folder into that.

    Here is it really necessary to copy the tags folder of "MYSubfolder" that was created when label applied on that folder?? I don't want to copy those tags folder of sub folders when applying label on parent folders. If we need this copy, what is the real purpose of it or if it is unnecessary how can we avoid copying these?

    Any help will be greatly appreciated.
    Can any of you help me on this. Any suggestions??

    Any help will be greatly appreciated.

  8. #8
    Is there any possible way to copy a folder by excluding some sub folders of that folder by issuing single copy command. If it is not possible to issue a single copy command then how can we achieve this. For example, if having repository with folder structure
    /A
    /A/B/C
    /A/B/D
    /A/B/E

    In this i want to issue copy command to copy folder A and only the sub folders /A/B/C and /A/B/E and i don't want to copy /A/B/D.

    How can i achieve like this. Thanks in advance.

  9. #9
    Only if you use the svnmucc tool which is an unofficial part of the Subversion source tree & is not included with most distributions.
    I am neither an employee nor customer of WANDisco.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •