Can I prevent a file from being modified?

2011-07-17 Thread David Myers

Dear subversion,

I have recently started a new post and I am in the process of 
investigating some possible new working practices. This particularly 
relates to document control.


I have read in various places about the 'tagging' system (where by I can 
use a property to effectively 'name' a file) used by subversion and 
things such as svn:needs-lock that forces any user who tries to commit a 
change to a file to be asked to acquire the lock that the file holds.


These almost fit my requirements, but not quite.


What I require is a method where I can make the file truly 'read only' 
after a certain point.

From what I have read in various places I thing I understand that...
subversion reflects the unix style permissions on it's subdirectories, 
in the subversion directory tree.
If I want to make a specific location 'read only' I need to do this from 
a new directory, and then files in this directory will acquire the 
permissions of the parent directory.
subversion doesn't store the file permissions of a file directly it 
stores it within the svn:properties


However if the above statement is correct this may not fill my requirements.

Let me expand on my problem (situation).

A group of users may be working on a file over time. At a certain point 
they all agree that the file is up to its required  needs and they 
formally create a hard copy of this file, and store it as a controlled 
document (signed and counter signed blah blah blah).
The finalised hard copy of the file must be an exact match of the copy 
stored electronically. All the users will be aware that this file 
shouldn't be change on the disk. But life being life when a user opens 
the file to print it they may inadvertently add a space in a paragraph, 
or an accidental carriage return, or worse


how often have you been working on document1 when you get that
   phone call to ask about a specific part of the controlled document2,
   so you open the document to have a quick read and clarify the
   situation. Then you get distracted by something else and you return
   and start editing the document2, thinking you are editing document1.
   We all know it shouldn't happen but it does occasionally.

What I want to be sure of is that even if this is done by accident there 
is no way that the file on disk in the subversion repository can be 
inadvertently changed. The svn:need-lock property combined with another 
personal property (something along the lines of CtrlDoc:DO_NOT_CHANGE 
TRUE ), unless there is an svn:read-only property that I am yet to come 
across!


I feel that the combination of these properties and proper use of the 
Head, commit and branch strategies should enable myself and my users to 
ensure that these types of problems don't occur.


Please help me clarify this so as I can propose the use of a subversion 
to my colleagues, and give eloquent and correct answers to any of their 
queries.


Thanks in advance.

David






--
Tel: + 33 6 50 14 39 34

email:
david.myers.24...@gmail.com

Adresse:
56 Rue du Coteau du Parc,
91180 Saint Germain les Arpajon



Re: Can I prevent a file from being modified?

2011-07-19 Thread david myers
Hi all,

Wow, lots of good thoughts.

@Chris
I like the MD5 idea, I hadn't thought of that but it makes sense.

@Ryan
when I said "svn:properties" I was thinking of things like svn:needs-lock
and svn:executable, from the manual (chapter 3)

In addition to versioning your directories and files, Subversion provides
interfaces for adding, modifying, and removing versioned metadata on each of
your versioned directories and files. We refer to this metadata as *
properties*..

I was in fact wondering if there was a way to make a custom property that
would cause a file to be truly 'locked', as suggested by Markus.

Also the file is stored on disk somehow, so I thought I may be able to
directly manipulate the access permissions on a directory / file, I just
wanted to know if this would work or not. From what I read I understood that
this was the case, if however SVN silently 'ignores' these types of
permission that is fair enough, I guess the process runs as a super user,
which would make sense (most server processes seem to want to have full
power over their own process, which seems reasonable).

@Daniel
thanks for the idea of the wrapper scripts

@Markus
Thanks, I had thought of a custom property already, but I hadn't read
anything on ' post-commit hook', so I'm off for another look at the manual
and trawl through google.

Maybe if I can use a post commit hook linked to the files MD5 checksum...

And of course if there any any changes made I will always be able to return
to the 'correct' version

Thanks again all.

David

ps. the first time I responded I hit reply, so it didn't go to the list,
thanks to Markus for pointing that one out. And apologies to Markus as he is
now receiving this mail a second time!

On Tue, Jul 19, 2011 at 10:53 AM, Markus Schaber
wrote:

> Hi, David,
>
> ** **
>
> Was it intentional that you did send this answer just to me? Maybe you
> should reply to the list instead. J
>
> ** **
>
> Best regards
>
> Markus Schaber
>
> ___
>
> We software Automation.
>
> 3S-Smart Software Solutions GmbH
> Markus Schaber | Developer
> Memminger Str. 151 | 87439 Kempten | Germany | Tel. +49-831-54031-0 | Fax
> +49-831-54031-50
>
> Email: *m.scha...@3s-software.com* | Web: http://www.3s-software.com
> CoDeSys internet forum: 
> http://forum.3s-software.com<http://forum-en.3s-software.com>
> Download CoDeSys sample projects:
> http://www.3s-software.com/index.shtml?sample_projects
>
> *Managing Directors: Dipl.Inf. Dieter Hess, Dipl.Inf. Manfred Werner* | *Trade
> register: Kempten HRB 6186* | *Tax ID No.: DE 167014915** *
>
> ** **
>
> *Von:* david myers [mailto:david.myers.24...@gmail.com]
> *Gesendet:* Dienstag, 19. Juli 2011 09:43
> *An:* Markus Schaber
> *Betreff:* Re: Can I prevent a file from being modified?
>
> ** **
>
> Hi all,
>
> Wow, lots of good thoughts.
>
> @Chris
> I like the MD5 idea, I hadn't thought of that but it makes sense.
>
> @Ryan
> when I said "svn:properties" I was thinking of things like svn:needs-lock
> and svn:executable, from the manual (chapter 3)
>
>
> In addition to versioning your directories and files, Subversion provides
> interfaces for adding, modifying, and removing versioned metadata on each of
> your versioned directories and files. We refer to this metadata as *
> properties*..
>
>
> I was in fact wondering if there was a way to make a custom property that
> would cause a file to be truly 'locked', as suggested by Markus.
>
> Also the file is stored on disk somehow, so I thought I may be able to
> directly manipulate the access permissions on a directory / file, I just
> wanted to know if this would work or not. From what I read I understood that
> this was the case, if however SVN silently 'ignores' these types of
> permission that is fair enough, I guess the process runs as a super user,
> which would make sense (most server processes seem to want to have full
> power over their own process, which seems reasonable).
>
> @Daniel
> thanks for the idea of the wrapper scripts
>
> @Markus
> Thanks, I had thought of a custom property already, but I hadn't read
> anything on ' post-commit hook', so I'm off for another look at the manual
> and trawl through google.
>
> Maybe if I can use a post commit hook linked to the files MD5 checksum...
>
> And of course if there any any changes made I will always be able to return
> to the 'correct' version
>
> Thanks again all.
>
> David
>
> On Mon, Jul 18, 2011 at 8:05 AM, Markus Schaber 
> wrote:
>
> Hi, David,
>
> Von: David Myers [mailto:david.m