Skip to content

Commit

Permalink
Added tag before_field_identity_changes for changeset 9d30cdaa9dfe
Browse files Browse the repository at this point in the history
  • Loading branch information
Dale Wilson committed Mar 20, 2012
0 parents commit 9fac87b
Show file tree
Hide file tree
Showing 400 changed files with 68,270 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .hgignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
PrivateChangeLog
testdata
^Output
\.ncb$
\.sln$
\.suo$
/I386$
\.vcproj
10,600 changes: 10,600 additions & 0 deletions ChangeLog

Large diffs are not rendered by default.

Binary file added Doc/FieldRules.xls
Binary file not shown.
43 changes: 43 additions & 0 deletions QuickFAST.features
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
// Copyright (c) 2009, 2010, 2011, Object Computing, Inc.
// All rights reserved.
// See the file license.txt for licensing information.
// This file defines MPC features used to enable and disable portions of the build
QuickFAST=1
boost=1

// Build .NET library
// To enable .NET build, change the following from '0' to '1'
dotnet=0

// Build .NET examples
// To enable .NET Example programs, change the following from '0' to '1'
dotnetapp=0

///////////////////////////////////////////////////////////////////////////////
//NOTE: Special projects are not included in the open source QuickFAST library
// These MPC feature flags remove them from the build

// Build ARCA support library
// If ARCA support is present (separate project) change the following
// from '0' to '1'
arca=0

// Build ARCA .NET support library
// If ARCA .NET support is present (separate project) change the following
// from '0' to '1'
arcadotnet=0

// Build special project to support OPRA FAST-like data
opra_support=0

// Build special project to support Spryware FAST files
spryware_support=0

//End of special projects
///////////////////////////////////////////////////////////////////////////////

// This is a "feature" used to temporarily disable parts of the build.
// by making the depend on the "obsolete" feature. It should always be
// assigned a 0.
obsolete=0

20 changes: 20 additions & 0 deletions QuickFAST.mwc
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
workspace(*) {
cmdline += -feature_file QuickFAST.features
src/QuickFAST.mpc
src/Examples/Examples.mpc

// .NET support only for Visual Studio compilers
// exclude(!vc8,!vc9) [was not working so instead...
// .Net support only on windows
exclude(!prop:windows) {
//C++/Cli Visual Studio Projects
src/DotNet/QuickFASTDotNet.mpc

//C# Visual Studio Projects
csharp {
cmdline += -language csharp
src/DotNetExamples/InterpretFASTDotNet/InterpretFASTDotNet.mpc
src/DotNetExamples/PerformanceTestDotNet/PerformanceTestDotNet.mpc
}
}
}
34 changes: 34 additions & 0 deletions QuickFASTApplication.mpb
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// Copyright (c) 2009, 2010 Object Computing, Inc.
// All rights reserved.
// See the file license.txt for licensing information.
//////////////////////////////////////////////////////
// Use this mpb for applications that use QuickFAST
// be sure to specify exeout. See also QuickFASTExeOut.mpb
//
// Applications should include src/common/QuickFAST.h
//
project : boost_base, boost_filesystem, boost_system, boost_thread{
requires += QuickFAST
includes += $(QUICKFAST_ROOT)/src

specific(prop:microsoft) {
// To make .NET happy, build libraries into directories based on build type
Release::libpaths += $(QUICKFAST_ROOT)/Output/Release
Debug::libpaths += $(QUICKFAST_ROOT)/Output/Debug
} else {
libpaths += $(QUICKFAST_ROOT)/lib
}

specific(make) {
// FieldInstructionInteger generates spuriouswarnings based on
// signed/unsigned template arguments.
cppflags += -Wtype-limits
}

specific(vc8) { // vc9 doesn't need this
macros += _WIN32_WINNT=0x0501
}

libs += QuickFAST
after += QuickFAST
}
15 changes: 15 additions & 0 deletions QuickFASTDotNetApplication.mpb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Copyright (c) 2009, 2010 Object Computing, Inc.
// All rights reserved.
// See the file license.txt for licensing information.
// Define build parameters for .NET based applications that use QuickFAST
project : QuickFASTApplication{
requires += dotnet
requires += dotnetapp
after += QuickFASTDotNet
managed = 1
specific {
// so assemblies can be added as references to .NET projects
add_references = 1
}
}

6 changes: 6 additions & 0 deletions QuickFASTDotNetExample.mpb
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// Copyright (c) 2009, 2010 Object Computing, Inc.
// All rights reserved.
// See the file license.txt for licensing information.
// Define build parameters for the QuickFAST .NET example programs
project : QuickFASTDotNetApplication, QuickFASTExeOut {
}
20 changes: 20 additions & 0 deletions QuickFASTExample.mpb
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// Copyright (c) 2009, 2010 Object Computing, Inc.
// All rights reserved.
// See the file license.txt for licensing information.
// Define build parameters for the QuickFAST example programs
project : QuickFASTApplication, QuickFASTExeOut{

includes += $(QUICKFAST_ROOT)/src/Examples
pch_header = Examples/ExamplesPch.h
includes += $(BOOST_ROOT)/include
pch_source = Examples/ExamplesPch.cpp
after += QuickFAST
Source_Files {
Examples
}
Header_Files {
Examples
}
}


17 changes: 17 additions & 0 deletions QuickFASTExeOut.mpb
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Copyright (c) 2009,2010 Object Computing, Inc.
// All rights reserved.
// See the file license.txt for licensing information.
//////////////////////////////////////////////////////
// Add-in mpb for exe's that are part of the QuickFAST
// package.
project {

specific(prop:microsoft) {
Release::exeout = $(QUICKFAST_ROOT)/Output/Release
Debug::exeout = $(QUICKFAST_ROOT)/Output/Debug
} else {
exeout = $(QUICKFAST_ROOT)/bin
}
}


222 changes: 222 additions & 0 deletions bin/hgcle.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,222 @@
#!/usr/bin/env python
"""
Create Change Log Entry for a Mercurial repository.
"""
import sys
import os
import traceback
import subprocess
import optparse
import time

def hg_command(options, *args):
"""Run a hg command in path and return the result.
returns a tuple of strings, stdout and stderr
Throws on error.
"""
arglist = ["hg", "--encoding", "UTF-8", "--noninteractive"] + list(args)
cmd = " ".join(arglist)
if options.verbose:
print "Running: ", cmd

proc = subprocess.Popen(arglist, stdout=subprocess.PIPE, stderr=subprocess.PIPE)

# proc.communicate returns a tuple with stdout and stderr as utf-8 strings.
# convert this to a list of decoded to python native strings
out, err = [utf8string.decode("utf-8") for utf8string in proc.communicate()]

if proc.returncode:
raise Exception("Error {0} running {1}:\n".format(proc.returncode, cmd),
err,out,)
return (out, err)


def runEditor(options, fileName):
if options.editor != "none":
# start the editor. Do not wait for the results
subprocess.Popen([options.editor, fileName])


def displaySet(options, title, paths):
"""Display the paths in the set
options.verbose and options.quiet control the amount of data displayed
title names the set of paths
"""
if(not options.quiet):
if len(paths) > 0:
print title,"files:",len(paths)
if(options.verbose):
for path in paths:
print ' ',path
else:
if(options.verbose):
print title,"files:",len(paths)


def writeToChangeLog(file, paths, changeType):
if len(paths) > 0:
for path in paths:
file.write(" * " + path + ":\n")
file.write( " " + changeType + "\n")

def genChangeLogTag(options):
nowstr = time.strftime("%a %b %d %H:%M:%S UTC %Y", time.gmtime())
username = options.user
replyto = options.email
changeLogTag = nowstr + " " + username+ " <" + replyto + ">"
return changeLogTag


def run(options, args):
changeLogFileName = "ChangeLog"
if(len(args) > 0):
changeLogFileName = args[0]
if(len(args) > 1):
print "Too many arguments: ", args[1:]
return-1
if not os.path.exists(changeLogFileName):
print "Change log,", changeLogFileName, "must be an existing file. Are you in the right directory. "
return -1

statusText, errorText = hg_command(options, "status", "-A", "-C")

# from hg help status:
# M = modified
# A = added
# = origin of the previous file listed as A (added)
# R = removed
# C = clean
# ! = missing (deleted by non-hg command, but still tracked)
# ? = not tracked
# I = ignored
modified = []
added = []
removed = []
missing = []
clean = []
unknown = []
ignored = []
renamed = []

for line in statusText.splitlines():
(sts,space,path) = line.rstrip().partition(' ')
#print '['+sts+']:'+path
if sts == 'M':
modified.append(path)
elif sts == 'A':
added.append(path)
elif sts == '':
path = path.strip()
old = added[-1]
added = added[:-1]
renamed.append((path, old))
elif sts == 'R':
removed.append(path)
elif sts == 'C':
clean.append(path)
elif sts == '!':
missing.append(path)
elif sts == '?':
unknown.append(path)
elif sts == 'I':
ignored.append(path)
else:
print "Unknown status: '{0}' {1}".format(sts, path)

for rename in renamed:
removed.remove(rename[0])

displaySet(options, "Modified", modified)
displaySet(options, "Added", added)
displaySet(options, "Removed", removed)
displaySet(options, "Missing", missing)
displaySet(options, "Unknown", unknown)
displaySet(options, "Ignored", ignored)
displaySet(options, "Clean", clean)
displaySet(options, "Renamed", renamed)

if len(modified) + len(added) + len(removed) + len(renamed) > 0 :
changeLogTag = genChangeLogTag(options)
tempChangeLogFileName = "..." + changeLogFileName
if(not options.quiet):
print "Change Log Tag: ",changeLogTag

ok = False
with open(tempChangeLogFileName, "w") as changeFile:
changeFile.write(changeLogTag + '\n');
writeToChangeLog(changeFile, modified, "Modified")
writeToChangeLog(changeFile, added, "Added")
writeToChangeLog(changeFile, removed,"Removed")
for rename in renamed:
writeToChangeLog(changeFile, rename, "Renamed")
changeFile.write("\n")
with open(changeLogFileName, "r") as oldChangeLog:
for line in oldChangeLog:
changeFile.write(line)
ok = True

if ok:
backupChangeLogFileName = changeLogFileName + ".bak"
if os.path.exists(backupChangeLogFileName):
os.remove(backupChangeLogFileName)

os.rename(changeLogFileName, backupChangeLogFileName)
os.rename(tempChangeLogFileName, changeLogFileName)
runEditor(options, changeLogFileName)
return 0
return -1

def defineCommandLineOptions(parser):
try:
userid = os.environ["USER"]
except:
try:
userid = os.environ["USERNAME"]
except:
print "Who are you? Tried USER and USERNAME"
return -1

try:
user = os.environ["CL_USERNAME"]
except:
user = userid

try:
email = os.environ["REPLYTO"];
except:
email = userid + "@ociweb.com"

editor = "none"
if os.environ.has_key("EDITOR"):
editor = os.environ["EDITOR"]

parser.add_option("-u", "--user", default=user, help="User name (default: %default)")
parser.add_option("-m", "--email", default=email, help="Email address (default: %default)")
parser.add_option("-e", "--editor", default=editor, help="Edit file after creating it using %default. -e \"none\" disables editing.")
parser.add_option("-v", "--verbose", action="store_true", default=False, help="Print noise to standard output.")
parser.add_option("-q", "--quiet", action="store_true", default=False, help="Suppress extra output.")
return 0

def main (argv = None):
try:
if(argv == None):
argv = sys.argv
parser = optparse.OptionParser(usage = "usage: %prog [options] [changeLogname]\n Default changeLogname is ChangeLog")
if defineCommandLineOptions(parser) < 0:
return -1
(options, args) = parser.parse_args(argv[1:])
if(options.verbose):
print "verbose: ", options.verbose
print "user: ", options.user
print "email: ", options.email
print "editor: ", options.editor
print "positional: ", args

return run(options, args)
except Exception as ex:
print "caught exception"
traceback.print_exc(ex)
return -1

if __name__ == "__main__":
sys.exit(main())
Loading

0 comments on commit 9fac87b

Please sign in to comment.