зеркало из https://github.com/mozilla/pjs.git
bug 428518 - source server, final round. patch by Lukas Blakk <lukasblakk@gmail.com>. r=me, a=beltzner
This commit is contained in:
Родитель
f409515687
Коммит
6804263dfd
|
@ -314,9 +314,9 @@ def SourceIndex(fileStream, outputPath, cvs_root):
|
|||
# Create the srcsrv data block that indexes the pdb file
|
||||
result = True
|
||||
pdbStreamFile = open(outputPath, "w")
|
||||
pdbStreamFile.write('''SRCSRV: ini ------------------------------------------------\r\nVERSION=1\r\nSRCSRV: variables ------------------------------------------\r\nCVS_EXTRACT_CMD=%fnchdir%(%CVS_WORKINGDIR%)cvs.exe -d %fnvar%(%var2%) checkout -r %var4% %var3%\r\nCVS_EXTRACT_TARGET=%targ%\%var2%\%fnbksl%(%var3%)\%fnfile%(%var1%)\r\nCVS_WORKING_DIR=%targ%\r\nMYSERVER=''')
|
||||
pdbStreamFile.write('''SRCSRV: ini ------------------------------------------------\r\nVERSION=1\r\nSRCSRV: variables ------------------------------------------\r\nCVS_EXTRACT_CMD=%fnchdir%(%targ%)cvs.exe -d %fnvar%(%var2%) checkout -r %var4% -d %var4% -N %var3%\r\nMYSERVER=''')
|
||||
pdbStreamFile.write(cvs_root)
|
||||
pdbStreamFile.write('''\r\nSRCSRVTRG=%targ%\%fnbksl%(%var3%)\r\nSRCSRVCMD=%CVS_EXTRACT_CMD%\r\nSRCSRV: source files ---------------------------------------\r\n''')
|
||||
pdbStreamFile.write('''\r\nSRCSRVTRG=%targ%\%var4%\%fnbksl%(%var3%)\r\nSRCSRVCMD=%CVS_EXTRACT_CMD%\r\nSRCSRV: source files ---------------------------------------\r\n''')
|
||||
pdbStreamFile.write(fileStream) # can't do string interpolation because the source server also uses this and so there are % in the above
|
||||
pdbStreamFile.write("SRCSRV: end ------------------------------------------------\r\n\n")
|
||||
pdbStreamFile.close()
|
||||
|
@ -406,7 +406,9 @@ class Dumper:
|
|||
in the proper directory structure in |symbol_path|."""
|
||||
result = False
|
||||
sourceFileStream = ''
|
||||
cvs_root = ''
|
||||
# tries to get cvsroot from the .mozconfig first - if it's not set
|
||||
# the tinderbox cvs_path will be assigned further down
|
||||
cvs_root = os.environ.get("SRCSRV_ROOT")
|
||||
for arch in self.archs:
|
||||
try:
|
||||
cmd = os.popen("%s %s %s" % (self.dump_syms, arch, file), "r")
|
||||
|
@ -443,8 +445,9 @@ class Dumper:
|
|||
if self.vcsinfo:
|
||||
(filename, rootname) = GetVCSFilename(filename, self.srcdir)
|
||||
# sets cvs_root in case the loop through files were to end on an empty rootname
|
||||
if rootname:
|
||||
cvs_root = rootname
|
||||
if cvs_root is None:
|
||||
if rootname:
|
||||
cvs_root = rootname
|
||||
# gather up files with cvs for indexing
|
||||
if filename.startswith("cvs"):
|
||||
(ver, checkout, source_file, revision) = filename.split(":", 3)
|
||||
|
|
Загрузка…
Ссылка в новой задаче