You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Geoffrey <li...@serioustechnology.com> on 2008/03/03 14:38:22 UTC

determining when an svn update occurred?

Is there any way to determine when an svn update was done and who did it?

-- 
Until later, Geoffrey

Those who would give up essential Liberty, to purchase a little
temporary Safety, deserve neither Liberty nor Safety.
  - Benjamin Franklin

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

Re: determining when an svn update occurred?

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Mar 3, 2008, at 09:06, Ulrich Eckhardt wrote:

> On Monday 03 March 2008, Geoffrey wrote:
>
>> Is there any way to determine when an svn update was done and who  
>> did it?
>
> Depends.
>
> If running Apache to serve the repository, you can look at the logs  
> to figure
> out when and who updated. [snip]

Right. If you'd like to run a script when someone updates a working  
copy, you may be interested in my svnhookdispatcher which uses the  
apache log feature to implement a post-update hook:

http://www.ryandesign.com/svnhookdispatcher/

Then you can write a post-update hook script to do whatever you want  
in response to this event.


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

Re: determining when an svn update occurred?

Posted by Geoffrey <li...@serioustechnology.com>.
Les Mikesell wrote:
> Geoffrey wrote:
> 
>>>
>>> A branch/tag to release might make sense if you really want to use 
>>> svn as the transport to production. Personally, I think it is better 
>>> to update a staging site (perhaps just another WC on the box where 
>>> you edit), do some testing, then rsync to the production server(s).
>>
>> We do have a development machine.  My personal preference was to 
>> update from the development to the production by hand, but 'the powers 
>> that be' wanted to update via svn.
>>
> 
> But development happens in svn, so you should at least use its ability 
> to manage versioning instead of blindly updating to someone's latest 
> mistake that happens to be in the trunk/head.  One approach is to copy 
> the trunk to a branch or tag at points where you expect it to be usable, 
> then (perhaps after testing...) switch the production copy to that 
> version.  Meanwhile new mistakes can be committed without breaking 
> anything.  Other approaches can work too - like updating only to 
> specified revision numbers or repeatedly deleting and copying to the 
> same tag name so the updating side doesn't need to track the revision or 
> name.  Unless no one there ever makes mistakes...

We have yet to use the full power of subversion.  The primary goal has 
been reached, in that we have our code in a code control mechanism.

We fully plan to exploit further functionality in order to better manage 
our development environment.

-- 
Until later, Geoffrey

Those who would give up essential Liberty, to purchase a little
temporary Safety, deserve neither Liberty nor Safety.
  - Benjamin Franklin

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

Re: determining when an svn update occurred?

Posted by Les Mikesell <le...@gmail.com>.
Geoffrey wrote:

>>
>> A branch/tag to release might make sense if you really want to use svn 
>> as the transport to production. Personally, I think it is better to 
>> update a staging site (perhaps just another WC on the box where you 
>> edit), do some testing, then rsync to the production server(s).
> 
> We do have a development machine.  My personal preference was to update 
> from the development to the production by hand, but 'the powers that be' 
> wanted to update via svn.
>

But development happens in svn, so you should at least use its ability 
to manage versioning instead of blindly updating to someone's latest 
mistake that happens to be in the trunk/head.  One approach is to copy 
the trunk to a branch or tag at points where you expect it to be usable, 
then (perhaps after testing...) switch the production copy to that 
version.  Meanwhile new mistakes can be committed without breaking 
anything.  Other approaches can work too - like updating only to 
specified revision numbers or repeatedly deleting and copying to the 
same tag name so the updating side doesn't need to track the revision or 
name.  Unless no one there ever makes mistakes...

-- 
   Les Mikesell
    lesmikesell@gmail.com



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

Re: determining when an svn update occurred?

Posted by Geoffrey <li...@serioustechnology.com>.
John Peacock wrote:
> Geoffrey wrote:
>> We do have a development machine.  My personal preference was to 
>> update from the development to the production by hand, but 'the powers 
>> that be' wanted to update via svn.
> 
> SVN::Notify::Mirror and SVN::Notify::Config make this trivial (get them 
> from http://search.CPAN.org).  I designed the software specifically to 
> update the test site anytime a commit is made to trunk, but only update 
> the production server when a tag is made which matches a configured 
> regex.  This all happens 100% from a single post-commit hook (i.e. no 
> humans are harmed in the process)...

Thanks, I'll check it out.

-- 
Until later, Geoffrey

Those who would give up essential Liberty, to purchase a little
temporary Safety, deserve neither Liberty nor Safety.
  - Benjamin Franklin

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

Re: determining when an svn update occurred?

Posted by John Peacock <jo...@havurah-software.org>.
Geoffrey wrote:
> We do have a development machine.  My personal preference was to update 
> from the development to the production by hand, but 'the powers that be' 
> wanted to update via svn.

SVN::Notify::Mirror and SVN::Notify::Config make this trivial (get them 
from http://search.CPAN.org).  I designed the software specifically to 
update the test site anytime a commit is made to trunk, but only update 
the production server when a tag is made which matches a configured 
regex.  This all happens 100% from a single post-commit hook (i.e. no 
humans are harmed in the process)...

John

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

Re: determining when an svn update occurred?

Posted by Geoffrey <li...@serioustechnology.com>.
Les Mikesell wrote:
> Geoffrey wrote:
> 
>>>> It's not the committing of code were are trying to track.  We know 
>>>> who committed the code.  We are trying to figure out who executed 
>>>> the 'svn update' on the production machine.
>>>
>>> You have a carbon-based error then; there is relatively little for 
>>> Subversion (or any software package at all) to deal with that.  You 
>>> may want to consider a continuous build environment and require 
>>> tagging of known good revisions prior to promotion to production 
>>> (i.e. production only runs from a tag).  It is really a bad idea to 
>>> rely on knowing when/who ran 'svn up' into a production environment 
>>> (think mixed revision working copies).
>>
>> I completely agree and we aren't really relying on knowing who did the 
>> update.  It was a unique situation where neither person could recall 
>> updating the identified file.
>>
>> It was determined by the 'powers that be' that this was the proper 
>> solution for updating the production environment, thus my hands are 
>> pretty much tied.
> 
> You might at least point out the folly of updating directly from the 
> trunk when if the trunk was always production-ready you probably 
> wouldn't be posting here.
> 
>>> However, it's still a project communications issue, but by 
>>> appropriate choice of policy, you can track the kind of "who broke 
>>> the website" information that you seem to want... ;-)
>>
>> Again, agreed.
> 
> A branch/tag to release might make sense if you really want to use svn 
> as the transport to production. Personally, I think it is better to 
> update a staging site (perhaps just another WC on the box where you 
> edit), do some testing, then rsync to the production server(s).

We do have a development machine.  My personal preference was to update 
from the development to the production by hand, but 'the powers that be' 
wanted to update via svn.


-- 
Until later, Geoffrey

Those who would give up essential Liberty, to purchase a little
temporary Safety, deserve neither Liberty nor Safety.
  - Benjamin Franklin

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

Re: determining when an svn update occurred?

Posted by Les Mikesell <le...@gmail.com>.
Geoffrey wrote:

>>> It's not the committing of code were are trying to track.  We know 
>>> who committed the code.  We are trying to figure out who executed the 
>>> 'svn update' on the production machine.
>>
>> You have a carbon-based error then; there is relatively little for 
>> Subversion (or any software package at all) to deal with that.  You 
>> may want to consider a continuous build environment and require 
>> tagging of known good revisions prior to promotion to production (i.e. 
>> production only runs from a tag).  It is really a bad idea to rely on 
>> knowing when/who ran 'svn up' into a production environment (think 
>> mixed revision working copies).
> 
> I completely agree and we aren't really relying on knowing who did the 
> update.  It was a unique situation where neither person could recall 
> updating the identified file.
> 
> It was determined by the 'powers that be' that this was the proper 
> solution for updating the production environment, thus my hands are 
> pretty much tied.

You might at least point out the folly of updating directly from the 
trunk when if the trunk was always production-ready you probably 
wouldn't be posting here.

>> However, it's still a project communications issue, but by appropriate 
>> choice of policy, you can track the kind of "who broke the website" 
>> information that you seem to want... ;-)
> 
> Again, agreed.

A branch/tag to release might make sense if you really want to use svn 
as the transport to production. Personally, I think it is better to 
update a staging site (perhaps just another WC on the box where you 
edit), do some testing, then rsync to the production server(s).

-- 
   Les Mikesell
     lesmikesell@gmail.com


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

Re: determining when an svn update occurred?

Posted by Geoffrey <li...@serioustechnology.com>.
John Peacock wrote:
> Geoffrey wrote:
>> It's not the committing of code were are trying to track.  We know who 
>> committed the code.  We are trying to figure out who executed the 'svn 
>> update' on the production machine.
> 
> You have a carbon-based error then; there is relatively little for 
> Subversion (or any software package at all) to deal with that.  You may 
> want to consider a continuous build environment and require tagging of 
> known good revisions prior to promotion to production (i.e. production 
> only runs from a tag).  It is really a bad idea to rely on knowing 
> when/who ran 'svn up' into a production environment (think mixed 
> revision working copies).

I completely agree and we aren't really relying on knowing who did the 
update.  It was a unique situation where neither person could recall 
updating the identified file.

It was determined by the 'powers that be' that this was the proper 
solution for updating the production environment, thus my hands are 
pretty much tied.

> However, it's still a project communications issue, but by appropriate 
> choice of policy, you can track the kind of "who broke the website" 
> information that you seem to want... ;-)

Again, agreed.

-- 
Until later, Geoffrey

Those who would give up essential Liberty, to purchase a little
temporary Safety, deserve neither Liberty nor Safety.
  - Benjamin Franklin

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

Re: determining when an svn update occurred?

Posted by John Peacock <jo...@havurah-software.org>.
Geoffrey wrote:
> It's not the committing of code were are trying to track.  We know who 
> committed the code.  We are trying to figure out who executed the 'svn 
> update' on the production machine.

You have a carbon-based error then; there is relatively little for 
Subversion (or any software package at all) to deal with that.  You may 
want to consider a continuous build environment and require tagging of 
known good revisions prior to promotion to production (i.e. production 
only runs from a tag).  It is really a bad idea to rely on knowing 
when/who ran 'svn up' into a production environment (think mixed 
revision working copies).

However, it's still a project communications issue, but by appropriate 
choice of policy, you can track the kind of "who broke the website" 
information that you seem to want... ;-)

John

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

Re: determining when an svn update occurred?

Posted by Geoffrey <li...@serioustechnology.com>.
Les Mikesell wrote:
> Geoffrey wrote:
>>>>>
>>>>  It's not the committing of code were are trying to track.  We know who
>>>>  committed the code.  We are trying to figure out who executed the 'svn
>>>>  update' on the production machine.
>>>
>>> Have you checked the system logs to see who was logged onto the server
>>> when the update happened?
>>
>> Yeah, both folks who have the ability to update had shells running at 
>> the time.
>>
> Do these shells keep a command history (like ~user/.bash_history)?  You 
> won't get timestamps there but you might figure it out from the sequence 
> of nearby commands.

Yeah, we just were checking that out and identified the culprit. :)

Thanks.

-- 
Until later, Geoffrey

Those who would give up essential Liberty, to purchase a little
temporary Safety, deserve neither Liberty nor Safety.
  - Benjamin Franklin

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

Re: determining when an svn update occurred?

Posted by Les Mikesell <le...@gmail.com>.
Geoffrey wrote:
>>>>
>>>  It's not the committing of code were are trying to track.  We know who
>>>  committed the code.  We are trying to figure out who executed the 'svn
>>>  update' on the production machine.
>>
>> Have you checked the system logs to see who was logged onto the server
>> when the update happened?
> 
> Yeah, both folks who have the ability to update had shells running at 
> the time.
> 
Do these shells keep a command history (like ~user/.bash_history)?  You 
won't get timestamps there but you might figure it out from the sequence 
of nearby commands.

-- 
   Les Mikesell
    lesmikesell@gmail.com


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

Re: determining when an svn update occurred?

Posted by Geoffrey <li...@serioustechnology.com>.
Andy Levy wrote:
> On Tue, Mar 4, 2008 at 12:17 PM, Geoffrey <li...@serioustechnology.com> wrote:
>> John Peacock wrote:
>>  > Geoffrey wrote:
>>  >>> Just wondering, but what do you need that info for?
>>  >>
>>  >> Just trying to figure out who the guilty party is. ;)
>>  >
>>  > If you weren't using shared working copies, you would know who the
>>  > guilty party was based solely on the output from 'svn log'.
>>
>>  We are not using shared working copies.  There are two folks who are
>>  permitted to update the production environment.  To control this, they
>>  are in a unique group, thus updating the files can only be done if
>>  you're in this group.  Each individual has their own working copies in
>>  their own development environment.
>>
>>
>>  > If you
>>  > simply must use a shared working copy (which is a bad idea from the get
>>  > go, but useful in certain limited circumstances), then you should make
>>  > the following changes:
>>  >
>>  > 1) remove all files from the directory ~/.subversion/auth/svn.simple on
>>  > the box that has the shared WC (I don't off the top of my head know
>>  > where that might be located on a Windows box);
>>  >
>>  > 2) edit the file ~/.subversion/config (ditto on location), and in the
>>  > section labeled [auth], uncomment this line (remove the # sign):
>>  >
>>  >     store-passwords = no
>>  >
>>  > Now, every time someone commits, they will be forced to type their
>>  > username and password.
>>
>>  It's not the committing of code were are trying to track.  We know who
>>  committed the code.  We are trying to figure out who executed the 'svn
>>  update' on the production machine.
> 
> Have you checked the system logs to see who was logged onto the server
> when the update happened?

Yeah, both folks who have the ability to update had shells running at 
the time.


-- 
Until later, Geoffrey

Those who would give up essential Liberty, to purchase a little
temporary Safety, deserve neither Liberty nor Safety.
  - Benjamin Franklin

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

Re: determining when an svn update occurred?

Posted by Andy Levy <an...@gmail.com>.
On Tue, Mar 4, 2008 at 12:17 PM, Geoffrey <li...@serioustechnology.com> wrote:
> John Peacock wrote:
>  > Geoffrey wrote:
>  >>> Just wondering, but what do you need that info for?
>  >>
>  >> Just trying to figure out who the guilty party is. ;)
>  >
>  > If you weren't using shared working copies, you would know who the
>  > guilty party was based solely on the output from 'svn log'.
>
>  We are not using shared working copies.  There are two folks who are
>  permitted to update the production environment.  To control this, they
>  are in a unique group, thus updating the files can only be done if
>  you're in this group.  Each individual has their own working copies in
>  their own development environment.
>
>
>  > If you
>  > simply must use a shared working copy (which is a bad idea from the get
>  > go, but useful in certain limited circumstances), then you should make
>  > the following changes:
>  >
>  > 1) remove all files from the directory ~/.subversion/auth/svn.simple on
>  > the box that has the shared WC (I don't off the top of my head know
>  > where that might be located on a Windows box);
>  >
>  > 2) edit the file ~/.subversion/config (ditto on location), and in the
>  > section labeled [auth], uncomment this line (remove the # sign):
>  >
>  >     store-passwords = no
>  >
>  > Now, every time someone commits, they will be forced to type their
>  > username and password.
>
>  It's not the committing of code were are trying to track.  We know who
>  committed the code.  We are trying to figure out who executed the 'svn
>  update' on the production machine.

Have you checked the system logs to see who was logged onto the server
when the update happened?

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

Re: determining when an svn update occurred?

Posted by Geoffrey <li...@serioustechnology.com>.
John Peacock wrote:
> Geoffrey wrote:
>>> Just wondering, but what do you need that info for?
>>
>> Just trying to figure out who the guilty party is. ;)
> 
> If you weren't using shared working copies, you would know who the 
> guilty party was based solely on the output from 'svn log'.

We are not using shared working copies.  There are two folks who are 
permitted to update the production environment.  To control this, they 
are in a unique group, thus updating the files can only be done if 
you're in this group.  Each individual has their own working copies in 
their own development environment.

> If you 
> simply must use a shared working copy (which is a bad idea from the get 
> go, but useful in certain limited circumstances), then you should make 
> the following changes:
> 
> 1) remove all files from the directory ~/.subversion/auth/svn.simple on 
> the box that has the shared WC (I don't off the top of my head know 
> where that might be located on a Windows box);
> 
> 2) edit the file ~/.subversion/config (ditto on location), and in the 
> section labeled [auth], uncomment this line (remove the # sign):
> 
>     store-passwords = no
> 
> Now, every time someone commits, they will be forced to type their 
> username and password.

It's not the committing of code were are trying to track.  We know who 
committed the code.  We are trying to figure out who executed the 'svn 
update' on the production machine.

-- 
Until later, Geoffrey

Those who would give up essential Liberty, to purchase a little
temporary Safety, deserve neither Liberty nor Safety.
  - Benjamin Franklin

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

Re: determining when an svn update occurred?

Posted by John Peacock <jo...@havurah-software.org>.
Geoffrey wrote:
>> Just wondering, but what do you need that info for?
> 
> Just trying to figure out who the guilty party is. ;)

If you weren't using shared working copies, you would know who the 
guilty party was based solely on the output from 'svn log'.  If you 
simply must use a shared working copy (which is a bad idea from the get 
go, but useful in certain limited circumstances), then you should make 
the following changes:

1) remove all files from the directory ~/.subversion/auth/svn.simple on 
the box that has the shared WC (I don't off the top of my head know 
where that might be located on a Windows box);

2) edit the file ~/.subversion/config (ditto on location), and in the 
section labeled [auth], uncomment this line (remove the # sign):

	store-passwords = no

Now, every time someone commits, they will be forced to type their 
username and password.

John

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

Re: determining when an svn update occurred?

Posted by Geoffrey <li...@serioustechnology.com>.
Ulrich Eckhardt wrote:
> On Monday 03 March 2008, Geoffrey wrote:
>> Is there any way to determine when an svn update was done and who did it?
> 
> Depends.
> 
> If running Apache to serve the repository, you can look at the logs to figure 
> out when and who updated. With svnserve, I think you are out of luck, but 
> with some hacking you could surely extract that information, too. If you are 
> using plain file:// access, there is probably no way to detect accesses 
> unless you are monitoring file access on the filesystem level. Lastly, if all 
> you have is a working copy, it should be clear who did it (because WCs 
> typically belong to one user only) and you might be able to infer some more 
> information from the access time of the files in the .svn dirs, but there, 
> too is no API to retrieve that information.

Not running Apache, so that's not going to help.  We know it's one of 
two folks and one has pretty much admitted that he probably did it.

> Just wondering, but what do you need that info for?

Just trying to figure out who the guilty party is. ;)

-- 
Until later, Geoffrey

Those who would give up essential Liberty, to purchase a little
temporary Safety, deserve neither Liberty nor Safety.
  - Benjamin Franklin

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

Re: determining when an svn update occurred?

Posted by Ulrich Eckhardt <ec...@satorlaser.com>.
On Monday 03 March 2008, Geoffrey wrote:
> Is there any way to determine when an svn update was done and who did it?

Depends.

If running Apache to serve the repository, you can look at the logs to figure 
out when and who updated. With svnserve, I think you are out of luck, but 
with some hacking you could surely extract that information, too. If you are 
using plain file:// access, there is probably no way to detect accesses 
unless you are monitoring file access on the filesystem level. Lastly, if all 
you have is a working copy, it should be clear who did it (because WCs 
typically belong to one user only) and you might be able to infer some more 
information from the access time of the files in the .svn dirs, but there, 
too is no API to retrieve that information.

Just wondering, but what do you need that info for?

Uli

-- 
ML: http://subversion.tigris.org/mailing-list-guidelines.html
FAQ: http://subversion.tigris.org/faq.html
Docs: http://svnbook.red-bean.com/

Sator Laser GmbH
Geschäftsführer: Michael Wöhrmann, Amtsgericht Hamburg HR B62 932

**************************************************************************************
           Visit our website at <http://www.satorlaser.de/>
**************************************************************************************
Diese E-Mail einschließlich sämtlicher Anhänge ist nur für den Adressaten bestimmt und kann vertrauliche Informationen enthalten. Bitte benachrichtigen Sie den Absender umgehend, falls Sie nicht der beabsichtigte Empfänger sein sollten. Die E-Mail ist in diesem Fall zu löschen und darf weder gelesen, weitergeleitet, veröffentlicht oder anderweitig benutzt werden.
E-Mails können durch Dritte gelesen werden und Viren sowie nichtautorisierte Änderungen enthalten. Sator Laser GmbH ist für diese Folgen nicht verantwortlich.

**************************************************************************************


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