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

committing transactions from python script corrupts repository

From: J. Hart <af804_at_bfn.org>
Date: Wed, 04 Mar 2009 15:23:01 +0900

The sccs2svn macro commits a transaction to the repository as follows:

     def _commit(self, rev, date, txn, subpool):
         """ Commit the supplied transaction to Subversion. """
         fs.change_rev_prop(self.fsob, rev,
                            core.SVN_PROP_ENTRY_COMMITTED_DATE,
                            date, subpool)

         fs.change_rev_prop(self.fsob, rev,
                            core.SVN_PROP_REVISION_DATE,
                            date, subpool)

         return repos.svn_repos_fs_commit_txn(
             self.repos_ptr, txn, subpool)

This appears to run without errors, but each "svn version" picks up the
date of the transaction following the one which created it. (for
example, "version 1" picks up the date for "version 2", "version 2"
picks up the date for "version 3" and so on). The last "version"picks
up the current system time instead. It is as though the commit for
"version 1" is not really complete until the tranaction for "version 2"
is processed, at which time the date for "version 1" is set using the
date from the "version 2" transaction. The dates supplied to the
property changes are correct for the version to be created by the
commit, but appear to actually be applied to the previous version.

I tested this on two systems as follows:

a) linux 2.6.22 (32 bit)
     Subversion 1.5.5
     Python 2.5.2

b) linux 2.6.19 (64 bit)
   Subversion 1.3.1
   Python 2.5.2

All were tested with the sccs2svn version 0.25
.
I also tested the script with Subversion 1.2.3, which was the current
version when scs2svn 0.25 was released.

I don't see any obvious problems with the sccs2svn macro, but I am not
so familiar with Subversion internals.

Any suggestions would be greatly appreciated.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1265344

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-03-04 08:16:10 CET

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.