You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Lev Serebryakov <le...@serebryakov.spb.ru> on 2003/11/05 13:30:14 UTC

SVN dump: copying of directories.

Hello users,

  I write some converter, which generate SVN dump file to import into
  subversion.

  Such construction works well, copy directory with all content:
  
Node-path: /some/path
Node-kind: dir
Node-action: add
Node-copyfrom-path: /some/other/path
Node-copyfrom-rev: OLDREV


  Does such construction work:

Node-path: /some/path
Node-kind: dir
Node-action: change
Node-copyfrom-path: /some/other/path
Node-copyfrom-rev: OLDREV

 when /some/path already exists? I want to copy all files from
 /some/other/path to /some/path, adding new files, overwriting
 (changing) existing, etc. But it seems, that it doesn't work and
 directories wit CONTENT could be copied only with `action: add' and I
 need to generate copy instruction for each file in /some/other/path

 Am I right?

-- 
Best regards,
 Lev                          mailto:lev@serebryakov.spb.ru


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Re[2]: SVN dump: copying of directories.

Posted by "C. Michael Pilato" <cm...@collab.net>.
Lev Serebryakov <le...@serebryakov.spb.ru> writes:

> Hello, C.!
> Wednesday, November 5, 2003, 5:45:33 PM, you wrote:
> 
> CMP> First, 'change' with copyfrom arguments means nothing.
>   Even if file case? If I want to CHANGE file with copying (overwrite
>   with new copy from other place)? I seems, that it work for files.

It should be sufficient just to supply the new contents of the thing.
If you do 'add' with copyfrom data, but you don't include the contents
of the thing, that's a flat copy.  If you include the new contents,
that's a copy + mods.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re[2]: SVN dump: copying of directories.

Posted by Lev Serebryakov <le...@serebryakov.spb.ru>.
Hello, C.!
Wednesday, November 5, 2003, 5:45:33 PM, you wrote:

CMP> First, 'change' with copyfrom arguments means nothing.
  Even if file case? If I want to CHANGE file with copying (overwrite
  with new copy from other place)? I seems, that it work for files.
  
               Lev Serebryakov


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: SVN dump: copying of directories.

Posted by "C. Michael Pilato" <cm...@collab.net>.
Lev Serebryakov <le...@serebryakov.spb.ru> writes:

> Hello users,
> 
>   I write some converter, which generate SVN dump file to import into
>   subversion.
> 
>   Such construction works well, copy directory with all content:
>   
> Node-path: /some/path
> Node-kind: dir
> Node-action: add
> Node-copyfrom-path: /some/other/path
> Node-copyfrom-rev: OLDREV
> 
> 
>   Does such construction work:
> 
> Node-path: /some/path
> Node-kind: dir
> Node-action: change
> Node-copyfrom-path: /some/other/path
> Node-copyfrom-rev: OLDREV
> 
>  when /some/path already exists? 
>
> I want to copy all files from /some/other/path to /some/path, adding
> new files, overwriting (changing) existing, etc. But it seems, that
> it doesn't work and directories wit CONTENT could be copied only
> with `action: add' and I need to generate copy instruction for each
> file in /some/other/path
> 
>  Am I right?

First, 'change' with copyfrom arguments means nothing.  The dumpfile
doesn't require that you specify intermediate directories (those
directories that aren't explicitly modified, but are parents of paths
that are) -- only talk about the things you want to change.

Secondly, if you 'add' /some/path with copyfrom args that point to
/some/other/path, you will have perfectly copied that directory and
everything in it.  In other words, this one command has effectively
'add'ed all of the children of /some/other/path as children of
/some/path.  If you then wish to modify things down inside the new
directory, do so.  You can 'change' those things, you can 'add' new
things, you can 'delete' things and then re-'add' things of the same
name (to break the line of history).  Whatever.  But only talk about
the paths you explicitly need to be different than they were in their
pre-copy incarnations.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org