Re: I need help in SVN mv and SVN cp

2016-08-17 Thread Stefan Sperling
On Tue, Aug 16, 2016 at 09:42:02PM -0700, rags bhat wrote:
> Hi ,
> 
> Please someone guide me how to generate svn diff which can capture svn mv 
> or svn cp operations carried out in a workspace?
> 
> So when i use svn patch, it should delete old file and replace it with new 
> file resulted from svn mv.

The normal unidiff patch format cannot express tree changes
such as copies, renames, moves, and replacements.

But SVN has some support for extensions to this format which were
introduced by git. Use 'svn diff --git' to generate patches using
these extensions, which provide hints about copies and renames.
'svn patch' has some support for these extensions, too.

This feature is experimental and incomplete so it might not work
as you expect. If you use this feature, please provide feedback
and let us know how it works for you.
If you run into problems that look like bugs, please report them.

> Also is there any way to see dummy commit? try dummy commit but it should 
> not actually commit into repo.

Why do you need this?

Thanks,
Stefan

PS: Please do not post here via google groups. It is inconvenient for
those of us who use the normal mailing list because it generates bounces.
Please use our users@ mailing list direcly instead. See here for details:
http://subversion.apache.org/mailing-lists.html


Re: I need help in SVN mv and SVN cp

2016-08-17 Thread Stefan Sperling
On Wed, Aug 17, 2016 at 01:57:12PM +0530, rags bhat wrote:
> Hi Stefan,
> 
> Need one help.
> 
> I am able to generate the patch which can capture copy and mv but i could
> not find a wrapper to patch it back to the workspace.
> Example if i generate a patchfile using svn diff --git >patchfile, how to
> use this to patch to workspace using svn patch command? It says --git is
> not supported.
> 
> *Thanks & Regards*,
> Raghavendra Bhat

You don't need to pass the --git option to 'svn patch'.
'svn patch' will detect the format of the patch automatically. 


Re: I need help in SVN mv and SVN cp

2016-08-17 Thread rags bhat
Ok let me explain.

I had a makefile

I used svn cp makefile makefilecp
then
i used svn mv makefile makefilemv

Generated patch

using svn diff --git >patchfile

then applied this in new SB which has no changes done, using svn patch
patchfile

all there targets are skipped, nothing got patched.

Regards,
Raghav


*Thanks & Regards*,
Raghavendra Bhat
Mobile: 9972442409

On Wed, Aug 17, 2016 at 2:16 PM, Stefan Sperling  wrote:

> On Wed, Aug 17, 2016 at 01:57:12PM +0530, rags bhat wrote:
> > Hi Stefan,
> >
> > Need one help.
> >
> > I am able to generate the patch which can capture copy and mv but i could
> > not find a wrapper to patch it back to the workspace.
> > Example if i generate a patchfile using svn diff --git >patchfile, how to
> > use this to patch to workspace using svn patch command? It says --git is
> > not supported.
> >
> > *Thanks & Regards*,
> > Raghavendra Bhat
>
> You don't need to pass the --git option to 'svn patch'.
> 'svn patch' will detect the format of the patch automatically.
>


Re: I need help in SVN mv and SVN cp

2016-08-17 Thread Stefan Sperling
On Wed, Aug 17, 2016 at 02:25:04PM +0530, rags bhat wrote:
> Ok let me explain.
> 
> I had a makefile
> 
> I used svn cp makefile makefilecp
> then
> i used svn mv makefile makefilemv
> 
> Generated patch
> 
> using svn diff --git >patchfile
> 
> then applied this in new SB which has no changes done, using svn patch
> patchfile
> 
> all there targets are skipped, nothing got patched.

Git diffs add "a/" and "b/" prefixes to all paths in the patch file.
So try again with 'svn patch --strip 1'.

If that doesn't help could you show us the output of the failing
'svn patch' command, and the header lines of the patch files?
You don't need to show file content changes, just the headers which
look similar to this:
Index: beta
===
diff --git a/trunk/beta b/trunk/beta
deleted file mode 100644
--- a/trunk/beta(revision 2)
+++ /dev/null   (nonexistent)


Re: I need help in SVN mv and SVN cp

2016-08-17 Thread rags bhat
This is what available in the patch file


Index: Makefile
===
diff --git a/branches/Makefile
deleted dile mode 106444
-- a/branches/Makefile (revision XXX)
++ /dev/null (working copy)

-
-
 removed all lines with - symbol

Index: Makefilecp
===
diff --git a/branches/Makefilecp
copy from branches/Makefile@revision
copy to branches//Makefilecp
Index: Makefilemv
===
diff --git a/branches/Makefile b/branches/Makefilemv
copy from branches/Makefile@revision
copy to branches/Makefilemv




*Thanks & Regards*,
Raghavendra Bhat
Mobile: 9972442409

On Wed, Aug 17, 2016 at 2:44 PM, Stefan Sperling  wrote:

> On Wed, Aug 17, 2016 at 02:25:04PM +0530, rags bhat wrote:
> > Ok let me explain.
> >
> > I had a makefile
> >
> > I used svn cp makefile makefilecp
> > then
> > i used svn mv makefile makefilemv
> >
> > Generated patch
> >
> > using svn diff --git >patchfile
> >
> > then applied this in new SB which has no changes done, using svn patch
> > patchfile
> >
> > all there targets are skipped, nothing got patched.
>
> Git diffs add "a/" and "b/" prefixes to all paths in the patch file.
> So try again with 'svn patch --strip 1'.
>
> If that doesn't help could you show us the output of the failing
> 'svn patch' command, and the header lines of the patch files?
> You don't need to show file content changes, just the headers which
> look similar to this:
> Index: beta
> ===
> diff --git a/trunk/beta b/trunk/beta
> deleted file mode 100644
> --- a/trunk/beta(revision 2)
> +++ /dev/null   (nonexistent)
>


Re: I need help in SVN mv and SVN cp

2016-08-17 Thread Stefan Sperling
On Wed, Aug 17, 2016 at 02:50:58PM +0530, rags bhat wrote:
> This is what available in the patch file
> 
> 
> Index: Makefile
> ===
> diff --git a/branches/Makefile
> deleted dile mode 106444
> -- a/branches/Makefile (revision XXX)
> ++ /dev/null (working copy)
> 
> -
> -
>  removed all lines with - symbol
> 
> Index: Makefilecp
> ===
> diff --git a/branches/Makefilecp
> copy from branches/Makefile@revision
> copy to branches//Makefilecp
> Index: Makefilemv
> ===
> diff --git a/branches/Makefile b/branches/Makefilemv
> copy from branches/Makefile@revision
> copy to branches/Makefilemv
> 
> *Thanks & Regards*,
> Raghavendra Bhat

Yes, this seems to be broken indeed.

$ svn diff --git
Index: beta
===
diff --git a/trunk/beta b/trunk/beta
deleted file mode 10644
--- a/trunk/beta(revision 2)
+++ /dev/null   (nonexistent)
@@ -1 +0,0 @@
-beta
Index: betacp
===
diff --git a/trunk/beta b/trunk/betacp
copy from trunk/beta@2
copy to trunk/betacp
Index: betamv
===
diff --git a/trunk/beta b/trunk/betamv
copy from trunk/beta@2
copy to trunk/betamv
$ svn diff --git > ../p
$ cd ../branch/ 
  
$ patch --strip 1 ../p
$ svn patch --strip 1 ../p
D beta
Skipped missing target: 'betacp'
Skipped missing target: 'betamv'
Summary of conflicts:
  Skipped paths: 2

Could you please file an issue in our bug tracker?
https://issues.apache.org/jira/issues/?jql=project%20%3D%20SVN


Re: A couple thousand mp3 files (this is not spam I swear )

2016-08-17 Thread Adam Jensen
On 08/16/2016 09:17 AM, Stefan Hett wrote:
> On 8/13/2016 2:56 AM, Adam Jensen wrote:
>> My primary concerns are related to any potential file corruption, any
>> data duplication, and/or any excessive network or disk I/O (other than
>> the expected load of direct data communication).
>
> Just to have this mentioned: Be aware that the working copy (aka: the
> checked out data of the repository) will have a 2x storage requirement
> on the data since it will keep a copy of the pristine version of the
> file in addition to the "actual" file.
> If this is a concern for your use-case, you could export the files and
> only use a working copy in cases where you need to commit or reorder files.
> 
> To clarify: This is purely a client side storage requirement. It does
> not apply to the storage requirements on the server side.
> 

Wow, I totally misinterpreted that during the first reading. After some
tinkering this morning (and reading Ryan's email) I think I see the light ;)

svn checkout svn://minerva.bohemia.net/Project_Prometheus/trunk cotest
du -sh cotest
104Mcotest

svn export svn://minerva.bohemia.net/Project_Prometheus/trunk extest
du -sh extest
 52Mextest



Re: I need help in SVN mv and SVN cp

2016-08-17 Thread rags bhat
I have created a ticket.


   1. SVN-4648 


*Thanks & Regards*,
Raghavendra Bhat
Mobile: 9972442409

On Wed, Aug 17, 2016 at 3:08 PM, Stefan Sperling  wrote:

> On Wed, Aug 17, 2016 at 02:50:58PM +0530, rags bhat wrote:
> > This is what available in the patch file
> >
> >
> > Index: Makefile
> > ===
> > diff --git a/branches/Makefile
> > deleted dile mode 106444
> > -- a/branches/Makefile (revision XXX)
> > ++ /dev/null (working copy)
> >
> > -
> > -
> >  removed all lines with - symbol
> >
> > Index: Makefilecp
> > ===
> > diff --git a/branches/Makefilecp
> > copy from branches/Makefile@revision
> > copy to branches//Makefilecp
> > Index: Makefilemv
> > ===
> > diff --git a/branches/Makefile b/branches/Makefilemv
> > copy from branches/Makefile@revision
> > copy to branches/Makefilemv
> >
> > *Thanks & Regards*,
> > Raghavendra Bhat
>
> Yes, this seems to be broken indeed.
>
> $ svn diff --git
> Index: beta
> ===
> diff --git a/trunk/beta b/trunk/beta
> deleted file mode 10644
> --- a/trunk/beta(revision 2)
> +++ /dev/null   (nonexistent)
> @@ -1 +0,0 @@
> -beta
> Index: betacp
> ===
> diff --git a/trunk/beta b/trunk/betacp
> copy from trunk/beta@2
> copy to trunk/betacp
> Index: betamv
> ===
> diff --git a/trunk/beta b/trunk/betamv
> copy from trunk/beta@2
> copy to trunk/betamv
> $ svn diff --git > ../p
> $ cd ../branch/
> $ patch --strip 1 ../p
> $ svn patch --strip 1 ../p
> D beta
> Skipped missing target: 'betacp'
> Skipped missing target: 'betamv'
> Summary of conflicts:
>   Skipped paths: 2
>
> Could you please file an issue in our bug tracker?
> https://issues.apache.org/jira/issues/?jql=project%20%3D%20SVN
>


Re: I need help in SVN mv and SVN cp

2016-08-17 Thread Stefan Sperling
On Wed, Aug 17, 2016 at 04:03:46PM +0530, rags bhat wrote:
> I have created a ticket.
> 
> 
>1. SVN-4648 
> 
> 
> *Thanks & Regards*,
> Raghavendra Bhat

Thank you!


Re: I need help in SVN mv and SVN cp

2016-08-17 Thread rags bhat
By the way is there any specific version of the version with which this
--git works fine?

*Thanks & Regards*,
Raghavendra Bhat
Mobile: 9972442409

On Wed, Aug 17, 2016 at 4:16 PM, Stefan Sperling  wrote:

> On Wed, Aug 17, 2016 at 04:03:46PM +0530, rags bhat wrote:
> > I have created a ticket.
> >
> >
> >1. SVN-4648 
> >
> >
> > *Thanks & Regards*,
> > Raghavendra Bhat
>
> Thank you!
>


Re: A couple thousand mp3 files (this is not spam I swear )

2016-08-17 Thread Adam Jensen
On 08/17/2016 12:55 AM, Ryan Schmidt wrote:
[snip]
> He means avoid the 2x disk use by using "svn export" instead of "svn 
> checkout".
> 
[snip]
> 
> Of course Subversion only transfers changes.
> 

Situation summary for the many-large-files scenario. Something like:

svn checkout svn://URL/ProjX/branches/profile1 ~/test
cd ~/test
svn switch ^/branches/profile2

the branch switch will work nicely with a many-large-files data-set,
only transferring the files necessary to complete the new profile. But
the storage requirements for the working copy (~/test) is twice (2x) the
size of the checked-out data-set.

Alternatively, using the export method:

svn export svn://URL/ProjX/branches/profile1 ~/test

will transfer all of the files of profile1 and the storage requirements
for the working copy is only (1x) the size of the data-set. But
switching between branches is not available in the export method.

To switch branches (using the export method):

svn export svn://URL/ProjX/branches/profile1 ~/test
(transfers all files in profile1)

rm -rf ~/test
svn export svn://URL/ProjX/branches/profile2 ~/test
(transfers all files in profile2)

So basically, the checkout method will require twice (2x) the data-set
size of storage space for a working copy but there would be
significantly less network load during many of the branch switches. The
export method pretty much has the opposite storage/network trade-off.



Re: A couple thousand mp3 files (this is not spam I swear )

2016-08-17 Thread Johan Corveleyn
On Wed, Aug 17, 2016 at 9:13 PM, Adam Jensen  wrote:
> On 08/17/2016 12:55 AM, Ryan Schmidt wrote:
> [snip]
>> He means avoid the 2x disk use by using "svn export" instead of "svn 
>> checkout".
>>
> [snip]
>>
>> Of course Subversion only transfers changes.
>>
>
> Situation summary for the many-large-files scenario. Something like:
>
> svn checkout svn://URL/ProjX/branches/profile1 ~/test
> cd ~/test
> svn switch ^/branches/profile2
>
> the branch switch will work nicely with a many-large-files data-set,
> only transferring the files necessary to complete the new profile. But
> the storage requirements for the working copy (~/test) is twice (2x) the
> size of the checked-out data-set.
>
> Alternatively, using the export method:
>
> svn export svn://URL/ProjX/branches/profile1 ~/test
>
> will transfer all of the files of profile1 and the storage requirements
> for the working copy is only (1x) the size of the data-set. But
> switching between branches is not available in the export method.
>
> To switch branches (using the export method):
>
> svn export svn://URL/ProjX/branches/profile1 ~/test
> (transfers all files in profile1)
>
> rm -rf ~/test
> svn export svn://URL/ProjX/branches/profile2 ~/test
> (transfers all files in profile2)
>
> So basically, the checkout method will require twice (2x) the data-set
> size of storage space for a working copy but there would be
> significantly less network load during many of the branch switches. The
> export method pretty much has the opposite storage/network trade-off.

I guess you'd need this (very old) feature request to be implemented:

https://issues.apache.org/jira/browse/SVN-525 (allow working copies
without text-base/)

Most of the discussion in the issue tracker is rather old (and refers
to the old pre-1.7 working copy format). But I suppose in the post-1.7
era this is still a big undertaking should someone decide to try and
implement this. Help is always welcome of course.

There is also, slightly related, this one, but I guess that wouldn't
help in your case, as your files are not compressible:

https://issues.apache.org/jira/browse/SVN-908 (Store text-base compressed)

-- 
Johan


Re: A couple thousand mp3 files (this is not spam I swear )

2016-08-17 Thread Adam Jensen
On 08/17/2016 04:36 PM, Johan Corveleyn wrote:
> On Wed, Aug 17, 2016 at 9:13 PM, Adam Jensen  wrote:
[snip]
>> So basically, the checkout method will require twice (2x) the data-set
>> size of storage space for a working copy but there would be
>> significantly less network load during many of the branch switches. The
>> export method pretty much has the opposite storage/network trade-off.
> 
> I guess you'd need this (very old) feature request to be implemented:
> 
> https://issues.apache.org/jira/browse/SVN-525 (allow working copies
> without text-base/)

Nice reference, thanks!

Wow, that feature was requested during 2001.

What I need (and what I think is generally needed) is a high-capacity,
large-file repository with a focus on data integrity (mandatory audit
trails), sophisticated access control (smart contracts (maybe blockchain
based)), probably (almost certainly) an encrypted file-system, and
distribution/replication (that is maybe torrent based). Files in this
type of system might need to be deleted but they wouldn't be revised.
This would not be a revision management system.

I'm not sure how much of Subversion could be used/leveraged to build
such a system. At a minimum, it seems like it would involve a project
fork and serious gutting and refactoring of the code-base after
rethinking the basic principles, specifying the new requirements, and
devising the new architecture. (And definitely a name change ).

It's not the Pyramid of Khufu big, or the Panama Canal big, but it would
be a big project.

For now, I still think I can use Subversion as the file repository in a
limited capability, ad-hoc implementation of a small
demonstration-of-concept instrumentation and analysis system.