Add support for authormaps
authorMagnus Hagander <magnus@hagander.net>
Wed, 4 Mar 2009 13:32:35 +0000 (14:32 +0100)
committerMagnus Hagander <magnus@hagander.net>
Wed, 4 Mar 2009 13:32:35 +0000 (14:32 +0100)
reposync.py

index ecac74b49e031e1a4388c789904a59b1c6d776a3..2af478d9a6d2f8be5b8f6fbd7430fdc74899eb2f 100755 (executable)
@@ -138,6 +138,17 @@ class SyncMethodRsyncCvs(SyncMethod):
                        rsyncpath
                ))
 
+               # If an authormap exists for this repository, copy it over now. The
+               # rsync process will remove it again, so we need to redo this after
+               # each time we rsync.
+               if os.path.isfile("%s/authormap/%s" % (
+                       self.conf.get("paths", "githome"), self.name)):
+                       shutil.copyfile(
+                               "%s/authormap/%s" % (
+                                       self.conf.get("paths", "githome"), self.name),
+                               "%s/CVSROOT/authormap" % rsyncpath)
+
+
                # Now perform Git Import Magic (TM)
                savedir = os.getcwd()
                os.chdir("%s/sw/fromcvs" % self.conf.get("paths", "githome"))