You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Gunter Ohrner <G....@post.rwth-aachen.de> on 2005/12/19 19:48:08 UTC
versioned archiving with file metadata using svn (asvn-like)
Hi!
I would like to use svn for storing directory trees where file metadata like
access permissions and mtimes matter.
svn itself doesn't support this meta data versioning out of the box.
asvn comes rather close but as a shell script is neither very fast nor very
robust and lacks some important features like quick ignoring of unversiond
subtrees within the mannaged directory structure and preservation of file
and directory timestamps.
Is there anything like asvn which
* offers good performance with large numbers of files and directories
(more than 250000 files and dirs)
* supports rescueing and restoring time stamps of files (and dirs?)
* doesn't inspect every file in possibly huge subtress which are not under
svn control at all (it's on asvn's TODO list)
* is more robust than asvn which often bails out if provided with parameters
it does not understand...
I searched the web and newsgroups high and low but wasn't able to find
anything better than asvn.
asvn does its job (after I fixed the quoting which made managing of files
with spaces impossible), but it takes ages for spawning tons of
subprocesses for each and every file in the tree and it doesn't rescue any
file time stamps...
Greetings,
Gunter
--
"I like the idea of democracy. You have to have someone everyone
distrusts," said Brutha. "That way, everyone's happy." -- (Terry
Pratchett, Small Gods)
*** PGP-Verschlüsselung bei eMails erwünscht :-) *** PGP: 0x1128F25F ***
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: versioned archiving with file metadata using svn (asvn-like)
Posted by Gunter Ohrner <G....@post.rwth-aachen.de>.
Ph. Marek wrote:
>> I searched the web and newsgroups high and low but wasn't able to find
>> anything better than asvn.
> Did you search the mailing-list?
Yes:
>> asvn does its job (after I fixed the quoting which made managing of files
> You need the meta-data branch for that.
I read about the meta-data patch/branch, but due to older (sometimes heated)
discussions about its inclusiong into main line I was under the impression
that this approach had been dismissed and wasn't pursued any further. I was
probably wrong and should have looked at it more closely. I'd have been
nice if I would have been able to use my distribution's unmodified svn
packages, but incorporating an additional patch is also ok.
Thanks a lot for the hint! :-)
> Depending on your exact needs fsvs might be better suited
> (fsvs.tigris.org, still in heavy development).
fsvs needs a very short, very high level discription of the idea behind it.
At least this is my impression after reading about it.
Re: versioned archiving with file metadata using svn (asvn-like)
Posted by Gunter Ohrner <G....@post.rwth-aachen.de>.
Ph. Marek wrote:
>> Properties on 'file:///home/gunter/misc/make/tmp/metatest/secdir':
>> svn:text-time : mt
> Wait, secdir is a directory, no?
Right.
> I don't store the modification time for directories, because that is
> changed with every file create/delete and so doesn't say much.
Ok, that explains a lot, in this case everything works as expected.
Great. :-)
I'll start to stress-test it now. ;) I'm just "convert" my asvn imported
repository to "svn meta-data". (i.e. add the new properties and delete
asvn's.)
Greetings,
Gunter
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: versioned archiving with file metadata using svn (asvn-like)
Posted by Gunter Ohrner <G....@post.rwth-aachen.de>.
Ph. Marek wrote:
> Wait, secdir is a directory, no? I don't store the modification time for
> directories, because that is changed with every file create/delete and so
> doesn't say much.
Mh, as a side note, it might be useful to stort the mtimes for directories
as well as you can use it to quickly guess if a directory has not been
touched for a longer period...
Greetings,
Gunter
--
Python is executable pseudocode. Perl is executable line noise.
-- http://mail.python.org/pipermail/tutor/2002-April/014142.html
*** PGP-Verschlüsselung bei eMails erwünscht :-) *** PGP: 0x1128F25F ***
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: versioned archiving with file metadata using svn (asvn-like)
Posted by "Ph. Marek" <ph...@bmlv.gv.at>.
On Tuesday 20 December 2005 14:45, Gunter Ohrner wrote:
> Ph. Marek wrote:
> >> However, during testing I noticed that a symlink's modification time is
> >> stored but not restored on checkout,
> >
> > Symlinks have no mtime AFAIK. If you try to change a symlink you change
> > the file/directory it's pointing to.
>
> Mh, ok. As there's lstat I thought there would also be some kind of
> "opposite" function, but I'm no expert of the POSIX APIs and am probably
> wrong...
No, not AFAIK.
> >> and that directories don't get their
> >> property values set, even if manually setting their "magic" properties:
> > So you set the property. Did you commit and *then* check for a new value?
> Yes, the propget was on a fresh checkout.
>
> In the repository it looks like this:
>
> Properties on 'file:///home/gunter/misc/make/tmp/metatest/secdir':
> svn:text-time : mt
> svn:unix-mode : 0700
> svn:owner : 1000 gunter
> svn:group : 1000 gunter
But the mode, owner, group etc. are set correctly ...
Why not the time? Is there a special character in the property name?
> For comparison, a test file I added looks good:
>
> Properties on 'file:///home/gunter/misc/make/tmp/metatest/testfile':
> svn:text-time : 2005-12-20T12:01:09.000000Z
> svn:executable : *
> svn:unix-mode : 0755
> svn:owner : 1000 gunter
> svn:group : 1000 gunter
>
> Both were committed at the same time and after recursively setting the
> properties.
Wait, secdir is a directory, no? I don't store the modification time for
directories, because that is changed with every file create/delete and so
doesn't say much.
> Thanks a lot for your help! :-)
You're welcome.
> The meta-data extensions really look very promising.
Thank you.
Regards,
Phil
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: versioned archiving with file metadata using svn (asvn-like)
Posted by Gunter Ohrner <G....@post.rwth-aachen.de>.
Ph. Marek wrote:
>> However, during testing I noticed that a symlink's modification time is
>> stored but not restored on checkout,
> Symlinks have no mtime AFAIK. If you try to change a symlink you change
> the file/directory it's pointing to.
Mh, ok. As there's lstat I thought there would also be some kind of
"opposite" function, but I'm no expert of the POSIX APIs and am probably
wrong...
>> and that directories don't get their
>> property values set, even if manually setting their "magic" properties:
> So you set the property. Did you commit and *then* check for a new value?
Yes, the propget was on a fresh checkout.
In the repository it looks like this:
Properties on 'file:///home/gunter/misc/make/tmp/metatest/secdir':
svn:text-time : mt
svn:unix-mode : 0700
svn:owner : 1000 gunter
svn:group : 1000 gunter
For comparison, a test file I added looks good:
Properties on 'file:///home/gunter/misc/make/tmp/metatest/testfile':
svn:text-time : 2005-12-20T12:01:09.000000Z
svn:executable : *
svn:unix-mode : 0755
svn:owner : 1000 gunter
svn:group : 1000 gunter
Both were committed at the same time and after recursively setting the
properties.
>> I read about a dir-auto-props patch, is this included in the branch and
> It is included, but would not help. It's for automatically setting these
Ok, I imagined.
Thanks a lot for your help! :-)
The meta-data extensions really look very promising.
Greetings,
Gunter
--
Das dreieckige Rad ist gegenueber dem viereckigen Rad ein Fortschritt,
weil es pro Umdrehung einmal weniger hoppelt. -- aus einer .sig
in oecher.computer
*** PGP-Verschlüsselung bei eMails erwünscht :-) *** PGP: 0x1128F25F ***
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: versioned archiving with file metadata using svn (asvn-like)
Posted by "Ph. Marek" <ph...@bmlv.gv.at>.
On Tuesday 20 December 2005 13:25, Gunter Ohrner wrote:
> Ok, I obtained your patch as you suggested, applied it to Debian's
> Subversion 1.2.3 source, fixed a tiny reject and rebuild the package.
>
> Seems to work quite well so far and does what I want it to. Fine. :-)
>
> However, during testing I noticed that a symlink's modification time is
> stored but not restored on checkout,
Symlinks have no mtime AFAIK. If you try to change a symlink you change the
file/directory it's pointing to.
> and that directories don't get their
> property values set, even if manually setting their "magic" properties:
>
> $ svn propget svn:text-time secdir
> mt
> (mt was the initial value I chose.)
So you set the property. Did you commit and *then* check for a new value?
Only on commit the current value is set for files and directories and
committed.
You could try looking into the repository, too:
svn pl -v <repos-url>/secdir
> I read about a dir-auto-props patch, is this included in the branch and
> would it help in this case? Probably not, I guess, as I created the
> property manually, but who knows... ;)
It is included, but would not help. It's for automatically setting these
properties on add and import.
> Greetings,
>
> Gunter
Regards,
Phil
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: versioned archiving with file metadata using svn (asvn-like)
Posted by Gunter Ohrner <G....@post.rwth-aachen.de>.
Ph. Marek wrote:
> You need the meta-data branch for that.
Ok, I obtained your patch as you suggested, applied it to Debian's
Subversion 1.2.3 source, fixed a tiny reject and rebuild the package.
Seems to work quite well so far and does what I want it to. Fine. :-)
However, during testing I noticed that a symlink's modification time is
stored but not restored on checkout, and that directories don't get their
property values set, even if manually setting their "magic" properties:
$ svn propget svn:text-time secdir
mt
(mt was the initial value I chose.)
I read about a dir-auto-props patch, is this included in the branch and
would it help in this case? Probably not, I guess, as I created the
property manually, but who knows... ;)
Greetings,
Gunter
--
"He says gods like to see an atheist around. Gives them something to
aim at."
-- (Terry Pratchett, Small Gods)
*** PGP-Verschlüsselung bei eMails erwünscht :-) *** PGP: 0x1128F25F ***
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: versioned archiving with file metadata using svn (asvn-like)
Posted by "Ph. Marek" <ph...@bmlv.gv.at>.
On Monday 19 December 2005 20:48, Gunter Ohrner wrote:
> I would like to use svn for storing directory trees where file metadata
> like access permissions and mtimes matter.
...
> I searched the web and newsgroups high and low but wasn't able to find
> anything better than asvn.
Did you search the mailing-list?
> asvn does its job (after I fixed the quoting which made managing of files
> with spaces impossible), but it takes ages for spawning tons of
> subprocesses for each and every file in the tree and it doesn't rescue any
> file time stamps...
You need the meta-data branch for that.
See http://svn.collab.net/viewcvs/svn/branches/meta-data-versioning/ for
the branch; but beware, this is just the *modification* needed.
They should be applied to a current version of subversion.
So I'd suggest you get a current patch by something like
svn diff -r 13256:HEAD
https://svn.collab.net/repos/svn/branches/meta-data-versioning/owner-group-mode > /tmp/meta-data.patch
and use this patch to update your subversion source.
Or, if you're compiling a checkout of subversion, you can use "svn merge".
Depending on your exact needs fsvs might be better suited (fsvs.tigris.org,
still in heavy development).
Regards,
Phil
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org