[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Can I prevent a file from being modified?

From: david myers <david.myers.24j74_at_gmail.com>
Date: Tue, 19 Jul 2011 13:23:56 +0200

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
<m.schaber_at_3s-software.com>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.schaber@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.24j74_at_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 <m.schaber_at_3s-software.com>
> wrote:****
>
> Hi, David,
>
> Von: David Myers [mailto:david.myers.24j74_at_gmail.com]****
>
> > What I require is a method where I can make the file truly 'read only'
> after a certain point.****
>
> My suggestion is a special property you invent yourself (like
> FileFrozenReadonly), and a post-commit hook which prevents commits on
> all files having that property set. You may even combine it with the
> svn:needs-lock property which makes SVN check out the files as
> read-only.
>
>
>
> 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.schaber@3s-software.com | Web: http://www.3s-software.com
> CoDeSys internet forum: http://forum.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****
>
>
>
>
> --
> + 33 6 50 14 39 34
>
> email:
> david.myers.24j74_at_gmail.com
>
> Addres:
> 56 Rue du Coteau du Parc, 91180 Saint Germain les Arpajon.****
>

-- 
  + 33 6 50 14 39 34
email:
        david.myers.24j74_at_gmail.com
Addres:
        56 Rue du Coteau du Parc, 91180 Saint Germain les Arpajon.
Received on 2011-07-19 13:24:36 CEST

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.