Hook help

2011-02-21 Thread Neson Maxmelbin (RBEI/EMT5)

Hello .

I am trying to write a hook to prevent deletion of elements through a 
pre-commit hook.

My Plan is to execute "svn status" and then based on the o/p allow or deny.
But the problem is that the hook is being executed in the server and I see not 
now way to get the "working copy" path in the client machine which is required 
by the svn status command.
How do I come around this?

Do you have any examples?


Mit freundlichen Grüßen / Best regards
Maxmelbin Neson





RE: Hook help

2011-02-21 Thread Echlin, Jamie
> I am trying to write a hook to prevent deletion of elements through a
pre-commit hook.

If you're not using the bindings you'd want svnlook, probably svnlook
diff. 

But, do you really want such a hook? If a user has permission to add
stuff they should be allowed to also unwind any mistakes, providing it's
not a tag or something.

jamie


=== 
Please access the attached hyperlink for an important electronic communications 
disclaimer: 
http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html 
=== 



RE: Hook help

2011-02-21 Thread Neson Maxmelbin (RBEI/EMT5)

> I am trying to write a hook to prevent deletion of elements through a
pre-commit hook.


>>If you're not using the bindings you'd want svnlook, probably svnlook
diff.

>>But, do you really want such a hook? If a user has permission to add
stuff they should be allowed to also unwind any mistakes, providing it's
not a tag or something.


Max : What do you mean by bindings?
And also svnlook seems to give info about already commited stuff.. Svnlook 
changed gives me info abt previous commit... (unless I got everything wrong .. 
:-) )

Yes, I want to have deletion control on atleast one repo.

jamie


===
Please access the attached hyperlink for an important electronic communications 
disclaimer:
http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
===



Betr.: RE: Hook help

2011-02-21 Thread Jan Keirse
"Neson Maxmelbin (RBEI/EMT5)"  schreef op 
21/02/2011 15:54:24:

> 
> > I am trying to write a hook to prevent deletion of elements through a
> pre-commit hook.
> 
> 
> >>If you're not using the bindings you'd want svnlook, probably svnlook
> diff.
> 
> >>But, do you really want such a hook? If a user has permission to add
> stuff they should be allowed to also unwind any mistakes, providing it's
> not a tag or something.
> 
> 
> Max : What do you mean by bindings?
> And also svnlook seems to give info about already commited stuff.. 
> Svnlook changed gives me info abt previous commit... (unless I got 
> everything wrong .. :-) )
> 
> Yes, I want to have deletion control on atleast one repo.


The pre-commit hook will get two input parameters. The first is the 
repostiory path, the second is the transaciton ID. 
You need to pass this to svnlook: 
svnlook diff c:\somerepository --transaction sometransactionId
This will allow you to watch the commit that's begin executed. 
Have a look at the manual: 
http://svnbook.red-bean.com/nightly/en/index.html In this case you need 
http://svnbook.red-bean.com/nightly/en/svn.reposadmin.maint.html#svn.reposadmin.maint.tk.svnlook
 
 but if you have not yet read the entire manual, you really should, it 
will save you a lot of time and headaches!
 DISCLAIMER 

http://www.tvh.com/newen2/emaildisclaimer/default.html 

"This message is delivered to all addressees subject to the conditions
set forth in the attached disclaimer, which is an integral part of this
message."


Re: problem with mutated vowel in log-message-contents

2011-02-21 Thread Daniel Shahaf
I think what you really want is to replace a latin1 ü by a UTF-8 ü
(byte sequence C3 BC).

Thomas STEININGER wrote on Fri, Feb 18, 2011 at 13:53:43 +0100:
> i need a tip to solve my problem with log-messages in our 
> subversion-repository. (see the mail-conversation with the tortoisesvn 
> team below).
> there are message that contain mutated vowel and i need to find all them 
> and correct them.
> f.e. i want to replace 'übergabe' by 'uebergabe' or if this is to 
> difficult only by '_bergabe'.
> 
> can anybode give me tips / commands to do that or probably there is an 
> tool (because the problem was already solved for another user)?
> 
> thanks for help
> -thomas


Re: problem with mutated vowel in log-message-contents

2011-02-21 Thread Daniel Shahaf
Stephen Connolly wrote on Fri, Feb 18, 2011 at 14:01:52 +:
> unix shell scripting could solved it for you
> 
> bash
> for rev in $(svn log ... | sed -n -e "..."); do svn ps --revprop svn:log
> "$(svn pg svn:log -r $rev | sed -e "s/oldstring/newstring/g;")" ... ; done
> 
> I leave the ...'s as an exercise to tgeur reader

Simpler:
propedit --editor-cmd 'sed --flags'


Re: Betr.: RE: Hook help

2011-02-21 Thread Chris . Lichter
Personally I run the svnlook changed command on the txn. This allows us to
see exactly what is being done on the changed files. If there is a delete
you can exit out and kill the commit. Here is the example written in
python:

look_cmd = "svnlook changed -t %s %s" % (txn, path)

for file in os.popen(look_cmd).readlines():
 line = file.splitlines()).
 chgedfiles.append(line))).
 changedFile = str(line))).
 changed = changedFile[6:-2] #This will show you what file is being
changed
 action = changedFile[2:3]  #This will show you what action is
being taken on the file. This includes: add, delete, and update.
 print(changed)
 print(action))


I later on block changes and deletes made only to tag directories.

Chris




 
  From:   Jan Keirse 
 

 
  To: "users@subversion.apache.org"
 

 
  Date:   02/21/2011 09:07 AM   
 

 
  Subject:Betr.: RE: Hook help. 
 

 






"Neson Maxmelbin (RBEI/EMT5)"  schreef op
21/02/2011 15:54:24:

>
> > I am trying to write a hook to prevent deletion of elements through a
> pre-commit hook.
>
>
> >>If you're not using the bindings you'd want svnlook, probably svnlook
> diff.
>
> >>But, do you really want such a hook? If a user has permission to add
> stuff they should be allowed to also unwind any mistakes, providing it's
> not a tag or something.
>
>
> Max : What do you mean by bindings?
> And also svnlook seems to give info about already commited stuff..
> Svnlook changed gives me info abt previous commit... (unless I got
> everything wrong .. :-) )
>
> Yes, I want to have deletion control on atleast one repo.


The pre-commit hook will get two input parameters. The first is the
repostiory path, the second is the transaciton ID.
You need to pass this to svnlook:
svnlook diff c:\somerepository --transaction sometransactionId
This will allow you to watch the commit that's begin executed.
Have a look at the manual:
http://svnbook.red-bean.com/nightly/en/index.html In this case you need
http://svnbook.red-bean.com/nightly/en/svn.reposadmin.maint.html#svn.reposadmin.maint.tk.svnlook
  but if you have not yet read the entire manual, you really should, it
will save you a lot of time and headaches! DISCLAIMER 

http://www.tvh.com/newen2/emaildisclaimer/default.html

"This message is delivered to all addressees subject to the conditions
set forth in the attached disclaimer, which is an integral part of this
message."




CONFIDENTIALITY NOTICE: This email message and any attachments are for the sole 
use of the intended recipient(s) and may contain proprietary, confidential, 
trade secret or privileged information.  Any unauthorized review use, 
disclosure or distribution is prohibited and may be a violation of law.  If you 
are not the intended recipient or a person responsible for delivering this 
message to an intended recipient, please contact the sender by reply email and 
destroy all copies of the original message.


Antwort: Re: problem with mutated vowel in log-message-contents

2011-02-21 Thread Thomas STEININGER
do i really understand, that i have to execute this:
propedit --editor-cmd 'sed --flags'
on a file? on all urls that are in my svn-repository?
or how you mean?

-Thomas




Daniel Shahaf  
21.02.2011 19:34

An
Stephen Connolly 
Kopie
Thomas STEININGER , users@subversion.apache.org
Thema
Re: problem with mutated vowel in log-message-contents






Stephen Connolly wrote on Fri, Feb 18, 2011 at 14:01:52 +:
> unix shell scripting could solved it for you
> 
> bash
> for rev in $(svn log ... | sed -n -e "..."); do svn ps --revprop svn:log
> "$(svn pg svn:log -r $rev | sed -e "s/oldstring/newstring/g;")" ... ; 
done
> 
> I leave the ...'s as an exercise to tgeur reader

Simpler:
propedit --editor-cmd 'sed --flags'





Der Austausch von Nachrichten mit o.a. Absender via e-mail dient ausschließlich 
Informationszwecken. Rechtsgeschäftliche Erklärungen dürfen über dieses Medium 
nicht ausgetauscht werden.

Correspondence with a.m. sender via e-mail is only for information purposes. 
This medium is not to be used for the exchange of legally-binding 
communications.


Re: Antwort: Re: problem with mutated vowel in log-message-contents

2011-02-21 Thread Daniel Shahaf
Thomas STEININGER wrote on Tue, Feb 22, 2011 at 07:39:49 +0100:
> do i really understand, that i have to execute this:
> propedit --editor-cmd 'sed --flags'
> on a file? on all urls that are in my svn-repository?
> or how you mean?
> 

On all revisions.

What you'll want is to write a script that takes a filename in argv[1]
and converts that file (in-place) from latin1 to utf8.  Then you can use
that file as --editor-cmd.

Something like 
% svn propedit --revprop -r $REV --editor-cmd 'perl -pi -e 
"s/\\xfc/\\xc3\\xbc/g"'
might just do the trick.  (untested)

> -Thomas
> 
> 
> 
> 
> Daniel Shahaf  
> 21.02.2011 19:34
> 
> An
> Stephen Connolly 
> Kopie
> Thomas STEININGER , users@subversion.apache.org
> Thema
> Re: problem with mutated vowel in log-message-contents
> 
> 
> 
> 
> 
> 
> Stephen Connolly wrote on Fri, Feb 18, 2011 at 14:01:52 +:
> > unix shell scripting could solved it for you
> > 
> > bash
> > for rev in $(svn log ... | sed -n -e "..."); do svn ps --revprop svn:log
> > "$(svn pg svn:log -r $rev | sed -e "s/oldstring/newstring/g;")" ... ; 
> done
> > 
> > I leave the ...'s as an exercise to tgeur reader
> 
> Simpler:
> propedit --editor-cmd 'sed --flags'
> 
> 
> 
> 
> 
> Der Austausch von Nachrichten mit o.a. Absender via e-mail dient 
> ausschließlich Informationszwecken. Rechtsgeschäftliche Erklärungen dürfen 
> über dieses Medium nicht ausgetauscht werden.
> 
> Correspondence with a.m. sender via e-mail is only for information purposes. 
> This medium is not to be used for the exchange of legally-binding 
> communications.


Antwort: Re: Antwort: Re: problem with mutated vowel in log-message-contents

2011-02-21 Thread Thomas STEININGER
Ok - you mean that i start a script that iterates over all files and 
within over all revisions of the repository
and execute on it your command.
But you say 'and converts that file (in-place) from latin1 to utf8' and i 
have no problem with the file-contents itself.
The files have correct contents - including  mutated vowel.

My Problem is in the logs. 
The log-messages (commit-comments) have  mutated vowel  and if i try to 
show the log-comments of some file with Tortoisesvn or Eclipse-subversive 
with JavaHL-Connector
i have a error and see nothing.

So i must correct the checkin-comments.

How can i get this done?

Or does i have misunderstood your trick?

-Thomas




Daniel Shahaf  
22.02.2011 07:58

An
Thomas STEININGER 
Kopie
Stephen Connolly , 
users@subversion.apache.org
Thema
Re: Antwort: Re: problem with mutated vowel in log-message-contents






Thomas STEININGER wrote on Tue, Feb 22, 2011 at 07:39:49 +0100:
> do i really understand, that i have to execute this:
> propedit --editor-cmd 'sed --flags'
> on a file? on all urls that are in my svn-repository?
> or how you mean?
> 

On all revisions.

What you'll want is to write a script that takes a filename in argv[1]
and converts that file (in-place) from latin1 to utf8.  Then you can use
that file as --editor-cmd.

Something like 
% svn propedit --revprop -r $REV --editor-cmd 'perl -pi -e 
"s/\\xfc/\\xc3\\xbc/g"'
might just do the trick.  (untested)

> -Thomas
> 
> 
> 
> 
> Daniel Shahaf  
> 21.02.2011 19:34
> 
> An
> Stephen Connolly 
> Kopie
> Thomas STEININGER , 
users@subversion.apache.org
> Thema
> Re: problem with mutated vowel in log-message-contents
> 
> 
> 
> 
> 
> 
> Stephen Connolly wrote on Fri, Feb 18, 2011 at 14:01:52 +:
> > unix shell scripting could solved it for you
> > 
> > bash
> > for rev in $(svn log ... | sed -n -e "..."); do svn ps --revprop 
svn:log
> > "$(svn pg svn:log -r $rev | sed -e "s/oldstring/newstring/g;")" ... ; 
> done
> > 
> > I leave the ...'s as an exercise to tgeur reader
> 
> Simpler:
> propedit --editor-cmd 'sed --flags'
> 
> 
> 
> 
> 
> Der Austausch von Nachrichten mit o.a. Absender via e-mail dient 
ausschließlich Informationszwecken. Rechtsgeschäftliche Erklärungen dürfen 
über dieses Medium nicht ausgetauscht werden.
> 
> Correspondence with a.m. sender via e-mail is only for information 
purposes. This medium is not to be used for the exchange of 
legally-binding communications.





Der Austausch von Nachrichten mit o.a. Absender via e-mail dient ausschließlich 
Informationszwecken. Rechtsgeschäftliche Erklärungen dürfen über dieses Medium 
nicht ausgetauscht werden.

Correspondence with a.m. sender via e-mail is only for information purposes. 
This medium is not to be used for the exchange of legally-binding 
communications.


A fix for issue 3471

2011-02-21 Thread Rick Varney
Hello,

I am introducing Subversion into our development environment.  We are using a 
lock-modify-unlock stategy for all of our files.  I do not claim this is the 
best or most efficient way to use Subversion, but it best fits the mindset of 
the developers at my particular site.  We have installsed Subversion 1.6.6.

We ran into the bug documented as issue 3471: "svn up touches file w/ lock & 
svn:keywords property"

http://subversion.tigris.org/issues/show_bug.cgi?id=3471
 
This is an annoyance for us, as we are using make to do our builds.
 
I am new to the subversion community, though I have had my eye on it for a long 
time.  Here are my questions:
 
1.  Is there a way for me to find out if there is planned fix for this issue?
2.  If there is not a plan to fix this issue in an upcoming release, is there a 
way I can find out if anyone else has submitted a fix?
3.  If there there is no submitted fix, how would I go about submitting one 
should I attempt a fix myself?
4.  If I were to attempt a fix, I would likely not be able to spend a great 
deal 
of time fully verifying it, given that this is outside of my usual job 
responsibilities.  Is there a way to submit a fix that others could help verify 
- assuming that there are benevolent souls in the community that do this sort 
of 
thing?
 
In short, please clue me in on the conventions of getting or making a fix to a 
bug I care about.  I am fine if the answer is "Read The Fine Manual", but do 
please point me right manuals.
 
Many thanks in advance!
 
Best regards,
 
Rick Varney