svnmucc and creating new files in existing directories

2017-06-05 Thread Sam Ruby
When I moved whimsy from Ubuntu 14.04 (svn 1.8.8) to Ubuntu 16.04 (svn 
1.9.3), svnmucc commands started failing for me:


$ svnmucc --revision 0 --message 'test data, please ignore' -- put - 
https://svn.apache.org/repos/private/financials/Bills/paid/test < test
svnmucc: E160016: Can't commit to 
'https://svn.apache.org/repos/private/financials/Bills/paid' because it 
is not a directory


I can continue to replace svnmucc with svn checkout --depth empty; svn 
add, svn commit sequences; but I was wondering if I'm using svnmucc 
incorrectly?


- Sam Ruby



Re: Is it safe to remove deleted and no longer used branches from the svn:mergeinfo property?

2017-06-05 Thread Alfred von Campe
Stefan:
> I'm regularly using the svn mergeinfo normalizer myself. It should suit your 
> requirements quite well, but you'd be aware that it hasn't been tested 
> thoroughly by a lot of people, since it's a new tool in the not yet released 
> 1.10 development branch.
> 
I will test out this tool.  However, we are running on CentOS 6.9 and I may not 
be able to get all its dependencies installed.
> To get some basic documentation about what the tool does, best start with the 
> integrated help (svn-mergeinfo-normalizer help).
> In your case all you might actually need is to run "svn-mergeinfo-normalizer 
> normalize --remove-obsoletes" followed by committing the changes. Carefully 
> verify the changes before committing them. As said: The tool hasn't gotten 
> much test coverage by a broader audience yet.
> 
Yes, I am very careful about inspecting all changes before committing a change.
> If you wanna give it a quick try and are running on Windows, there are 
> prebuilt binaries available for MaxSVN (disclaimer: that's a development 
> binary distribution of SVN I'm 
> maintaining):http://www.luke1410.de/typo3/index.php?id=97 
> . Download MaxSVN 
> trunk-dev-r1771118-1 and run svn-mergeinfo-normalizer contained in the 
> package. I'm not aware of other prebuilt sources of the current SVN 
> development branch (otherwise I'd have listed them here as other examples).
> 
If I can’t get the tool running on our Linux systems, I will definitely check 
this out.
> On a more general note on your questions:
> Is it safe to do that (i.e. remove the entries for obsolete/removed branches)?
> 
> Kind of. If your working process means that you are not going to reinstate 
> the removed branch in a future revision again to merge remaining revision 
> from it to some other branch, I'd personally consider it a safe habit to drop 
> the then obsolete mergeinfos. If your work process differs, you should not 
> remove it though IMO, since then you might cause conflicts on merges and also 
> lose the information about what was merged of the other branch (if it later 
> is reinstated).
> 
We don’t plan to ever reuse those branches again, and in fact most of them will 
be deleted.

Thanks again for all your comments.  I’ll report back with my findings when I 
get a chance to run this tool sometime later this week.

Alfred



Re: svnmucc and creating new files in existing directories

2017-06-05 Thread Daniel Shahaf
Sam Ruby wrote on Mon, 05 Jun 2017 10:08 -0400:
> When I moved whimsy from Ubuntu 14.04 (svn 1.8.8) to Ubuntu 16.04 (svn 
> 1.9.3), svnmucc commands started failing for me:
> 
> $ svnmucc --revision 0 --message 'test data, please ignore' -- put - 
> https://svn.apache.org/repos/private/financials/Bills/paid/test < test
> svnmucc: E160016: Can't commit to 
> 'https://svn.apache.org/repos/private/financials/Bills/paid' because it 
> is not a directory
> 
> I can continue to replace svnmucc with svn checkout --depth empty; svn 
> add, svn commit sequences; but I was wondering if I'm using svnmucc 
> incorrectly?

I assume it works if you leave the --revision out?  The directory in
question doesn't exist in r0, so I wouldn't expect the command to work
as written.


Re: Is it safe to remove deleted and no longer used branches from the svn:mergeinfo property?

2017-06-05 Thread Daniel Shahaf
Alfred von Campe wrote on Mon, 05 Jun 2017 10:21 -0400:
> Stefan Hett:
> > If you wanna give it a quick try and are running on Windows, there are 
> > prebuilt binaries available for MaxSVN (disclaimer: that's a development 
> > binary distribution of SVN I'm 
> > maintaining):http://www.luke1410.de/typo3/index.php?id=97 
> > . Download MaxSVN 
> > trunk-dev-r1771118-1 and run svn-mergeinfo-normalizer contained in the 
> > package. I'm not aware of other prebuilt sources of the current SVN 
> > development branch (otherwise I'd have listed them here as other examples).
> > 
> If I can’t get the tool running on our Linux systems, I will definitely check 
> this out.

'make svn-mergeinfo-normalizer' will build the tool.  It can be run
in-tree, or you can run 'make install-tools' to install it.

(I don't see this info in README/INSTALL, although it should be there...)


Re: svnmucc and creating new files in existing directories

2017-06-05 Thread Sam Ruby

On 06/05/2017 02:10 PM, Daniel Shahaf wrote:

Sam Ruby wrote on Mon, 05 Jun 2017 10:08 -0400:

When I moved whimsy from Ubuntu 14.04 (svn 1.8.8) to Ubuntu 16.04 (svn
1.9.3), svnmucc commands started failing for me:

$ svnmucc --revision 0 --message 'test data, please ignore' -- put -
https://svn.apache.org/repos/private/financials/Bills/paid/test < test
svnmucc: E160016: Can't commit to
'https://svn.apache.org/repos/private/financials/Bills/paid' because it
is not a directory

I can continue to replace svnmucc with svn checkout --depth empty; svn
add, svn commit sequences; but I was wondering if I'm using svnmucc
incorrectly?


I assume it works if you leave the --revision out?  The directory in
question doesn't exist in r0, so I wouldn't expect the command to work
as written.


OK, that worked.  Thanks!

FWIW, I'm pretty sure that was cargo-culted from a script you had 
written (the mailing list subscription tool, to be specific), and the 
comment that line had was as follows:


# add file to svn (--revision 0 means it won't overwrite an existing file)

Which leads to a question: what will svnmucc do if the file already exists?

- Sam Ruby


Re: Is it safe to remove deleted and no longer used branches from the svn:mergeinfo property?

2017-06-05 Thread Alfred von Campe
On Jun 5, 2017, at 14:14, Daniel Shahaf wrote:

> 'make svn-mergeinfo-normalizer' will build the tool.  It can be run
> in-tree, or you can run 'make install-tools' to install it.

Hmm, I don’t see a Makefile in 
^/subversion/trunk/tools/client-side/svn-mergeinfo-normalizer
or its immediate parent directories, so I checked out the entire Subversion 
trunk, and then
had to do a “sh autopen.sh” followed by ./configure.  Now it’s complaining 
about “no suitable
APR found”.  I think I’m going down a bit of a rathole…  I don’t need/want to 
build all of
Subversion; I really only want to check out the svn-mergeinfo-normalizer tool.

Alfred



Re: Is it safe to remove deleted and no longer used branches from the svn:mergeinfo property?

2017-06-05 Thread Daniel Shahaf
Alfred von Campe wrote on Mon, 05 Jun 2017 16:34 -0400:
> On Jun 5, 2017, at 14:14, Daniel Shahaf wrote:
> 
> > 'make svn-mergeinfo-normalizer' will build the tool.  It can be run
> > in-tree, or you can run 'make install-tools' to install it.
> 
> Hmm, I don’t see a Makefile in 
> ^/subversion/trunk/tools/client-side/svn-mergeinfo-normalizer
> or its immediate parent directories, so I checked out the entire Subversion 
> trunk, and then
> had to do a “sh autopen.sh” followed by ./configure.  Now it’s complaining 
> about “no suitable
> APR found”.  I think I’m going down a bit of a rathole…  I don’t need/want to 
> build all of
> Subversion; I really only want to check out the svn-mergeinfo-normalizer tool.

What you need to run is:

./autogen.sh && ./configure && make svn-mergeinfo-normalizer

You do need APR libraries for that.  (Install the 'apr-dev' package.)

The Makefile you were looking for would be this:

cc -o svn-mergeinfo-normalizer -I ${prefix}/include/apr-1.0/ -I 
${prefix}/include/subversion-1/ -L /usr/lib -Wall 
-lsvn_{client,wc,ra,delta,diff,subr}-1 -lapr-1  *.c -I 
${svnbuildtree}/subversion -I ${svnsrctree}/subversion/include/ && 
LD_LIBRARY_PATH=${prefix}/lib ./svn-mergeinfo-normalizer --help 

... but this command requires ${svnbuildtree} to be to a directory you ran 
configure in.  


Re: Is it safe to remove deleted and no longer used branches from the svn:mergeinfo property?

2017-06-05 Thread Daniel Shahaf
[ Sorry, hit 'send' by accident. ]

Daniel Shahaf wrote on Mon, 05 Jun 2017 21:08 +:
> What you need to run is:
> 
> ./autogen.sh && ./configure && make svn-mergeinfo-normalizer
> 
> You do need APR libraries for that.  (Install the 'apr-dev' package.)
> 
> The Makefile you were looking for would be this:
> 
> cc -o svn-mergeinfo-normalizer -I ${prefix}/include/apr-1.0/ -I 
> ${prefix}/include/subversion-1/ -L /usr/lib -Wall 
> -lsvn_{client,wc,ra,delta,diff,subr}-1 -lapr-1  *.c -I 
> ${svnbuildtree}/subversion -I ${svnsrctree}/subversion/include/ && 
> LD_LIBRARY_PATH=${prefix}/lib ./svn-mergeinfo-normalizer --help 
> 
> ... but this command requires ${svnbuildtree} to be to a directory you ran 
> configure in.  

s/to be to/to be pointed to/.  That -I${svnbuildtree} directive is
  required in order to find svn_config_private.h.

The recommended/supported way is the first one: to install the apr-dev packages 
and run configure.

Daniel


Re: svnmucc and creating new files in existing directories

2017-06-05 Thread Daniel Shahaf
Sam Ruby wrote on Mon, 05 Jun 2017 14:24 -0400:
> On 06/05/2017 02:10 PM, Daniel Shahaf wrote:
> > Sam Ruby wrote on Mon, 05 Jun 2017 10:08 -0400:
> >> When I moved whimsy from Ubuntu 14.04 (svn 1.8.8) to Ubuntu 16.04 (svn
> >> 1.9.3), svnmucc commands started failing for me:
> >>
> >> $ svnmucc --revision 0 --message 'test data, please ignore' -- put -
> >> https://svn.apache.org/repos/private/financials/Bills/paid/test < test
> >> svnmucc: E160016: Can't commit to
> >> 'https://svn.apache.org/repos/private/financials/Bills/paid' because it
> >> is not a directory
> >>
> >> I can continue to replace svnmucc with svn checkout --depth empty; svn
> >> add, svn commit sequences; but I was wondering if I'm using svnmucc
> >> incorrectly?
> > 
> > I assume it works if you leave the --revision out?  The directory in
> > question doesn't exist in r0, so I wouldn't expect the command to work
> > as written.
> 
> OK, that worked.  Thanks!
> 
> FWIW, I'm pretty sure that was cargo-culted from a script you had 
> written (the mailing list subscription tool, to be specific), and the 
> comment that line had was as follows:
> 
> # add file to svn (--revision 0 means it won't overwrite an existing file)
> 

I can't find that line in my working copy or in my commits list archives.

> Which leads to a question: what will svnmucc do if the file already exists?

Overwrite it.  (Hopefully, someone will notice that the commit mail says
'M' rather than 'A' in the changed-paths list.)

The way it's supposed to work is, to modify a file, you get its contents
as of a known revision number, modify it, and then pass the revision
number back via the --revision argument; there is an example of this in
trunk/tlpreq/scripts/website in the helper function _append_to_URL().

Now, the same holds for creating a file: if you know that the file
doesn't exist in r42, then passing --revision=42 will cause the commit
to error out if it would modify (as opposed to create) the file. (That's
exactly analogous to out of date working copies.)  This is what you
can have whimsy use.

As to --revision=0, apparently 1.8 interprets that as "Create a new
file", while 1.9 just errors out since the containing directory didn't
exist at r0.  I'm not sure how to classify this delta: whether it's a
intentional change / bugfix / regression.

The --revision=0 usage was probably inspired by the 'svn up -r0' syntax,
however, that syntax works identically in 1.8/1.9/1.10.

Daniel