Skip to content

Commit 9fac87b

Browse files
author
Dale Wilson
committed
Added tag before_field_identity_changes for changeset 9d30cdaa9dfe
0 parents  commit 9fac87b

File tree

400 files changed

+68270
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

400 files changed

+68270
-0
lines changed

.hgignore

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
PrivateChangeLog
2+
testdata
3+
^Output
4+
\.ncb$
5+
\.sln$
6+
\.suo$
7+
/I386$
8+
\.vcproj

ChangeLog

+10,600
Large diffs are not rendered by default.

Doc/FieldRules.xls

41 KB
Binary file not shown.

QuickFAST.features

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
// Copyright (c) 2009, 2010, 2011, Object Computing, Inc.
2+
// All rights reserved.
3+
// See the file license.txt for licensing information.
4+
// This file defines MPC features used to enable and disable portions of the build
5+
QuickFAST=1
6+
boost=1
7+
8+
// Build .NET library
9+
// To enable .NET build, change the following from '0' to '1'
10+
dotnet=0
11+
12+
// Build .NET examples
13+
// To enable .NET Example programs, change the following from '0' to '1'
14+
dotnetapp=0
15+
16+
///////////////////////////////////////////////////////////////////////////////
17+
//NOTE: Special projects are not included in the open source QuickFAST library
18+
// These MPC feature flags remove them from the build
19+
20+
// Build ARCA support library
21+
// If ARCA support is present (separate project) change the following
22+
// from '0' to '1'
23+
arca=0
24+
25+
// Build ARCA .NET support library
26+
// If ARCA .NET support is present (separate project) change the following
27+
// from '0' to '1'
28+
arcadotnet=0
29+
30+
// Build special project to support OPRA FAST-like data
31+
opra_support=0
32+
33+
// Build special project to support Spryware FAST files
34+
spryware_support=0
35+
36+
//End of special projects
37+
///////////////////////////////////////////////////////////////////////////////
38+
39+
// This is a "feature" used to temporarily disable parts of the build.
40+
// by making the depend on the "obsolete" feature. It should always be
41+
// assigned a 0.
42+
obsolete=0
43+

QuickFAST.mwc

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
workspace(*) {
2+
cmdline += -feature_file QuickFAST.features
3+
src/QuickFAST.mpc
4+
src/Examples/Examples.mpc
5+
6+
// .NET support only for Visual Studio compilers
7+
// exclude(!vc8,!vc9) [was not working so instead...
8+
// .Net support only on windows
9+
exclude(!prop:windows) {
10+
//C++/Cli Visual Studio Projects
11+
src/DotNet/QuickFASTDotNet.mpc
12+
13+
//C# Visual Studio Projects
14+
csharp {
15+
cmdline += -language csharp
16+
src/DotNetExamples/InterpretFASTDotNet/InterpretFASTDotNet.mpc
17+
src/DotNetExamples/PerformanceTestDotNet/PerformanceTestDotNet.mpc
18+
}
19+
}
20+
}

QuickFASTApplication.mpb

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
// Copyright (c) 2009, 2010 Object Computing, Inc.
2+
// All rights reserved.
3+
// See the file license.txt for licensing information.
4+
//////////////////////////////////////////////////////
5+
// Use this mpb for applications that use QuickFAST
6+
// be sure to specify exeout. See also QuickFASTExeOut.mpb
7+
//
8+
// Applications should include src/common/QuickFAST.h
9+
//
10+
project : boost_base, boost_filesystem, boost_system, boost_thread{
11+
requires += QuickFAST
12+
includes += $(QUICKFAST_ROOT)/src
13+
14+
specific(prop:microsoft) {
15+
// To make .NET happy, build libraries into directories based on build type
16+
Release::libpaths += $(QUICKFAST_ROOT)/Output/Release
17+
Debug::libpaths += $(QUICKFAST_ROOT)/Output/Debug
18+
} else {
19+
libpaths += $(QUICKFAST_ROOT)/lib
20+
}
21+
22+
specific(make) {
23+
// FieldInstructionInteger generates spuriouswarnings based on
24+
// signed/unsigned template arguments.
25+
cppflags += -Wtype-limits
26+
}
27+
28+
specific(vc8) { // vc9 doesn't need this
29+
macros += _WIN32_WINNT=0x0501
30+
}
31+
32+
libs += QuickFAST
33+
after += QuickFAST
34+
}

QuickFASTDotNetApplication.mpb

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// Copyright (c) 2009, 2010 Object Computing, Inc.
2+
// All rights reserved.
3+
// See the file license.txt for licensing information.
4+
// Define build parameters for .NET based applications that use QuickFAST
5+
project : QuickFASTApplication{
6+
requires += dotnet
7+
requires += dotnetapp
8+
after += QuickFASTDotNet
9+
managed = 1
10+
specific {
11+
// so assemblies can be added as references to .NET projects
12+
add_references = 1
13+
}
14+
}
15+

QuickFASTDotNetExample.mpb

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// Copyright (c) 2009, 2010 Object Computing, Inc.
2+
// All rights reserved.
3+
// See the file license.txt for licensing information.
4+
// Define build parameters for the QuickFAST .NET example programs
5+
project : QuickFASTDotNetApplication, QuickFASTExeOut {
6+
}

QuickFASTExample.mpb

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// Copyright (c) 2009, 2010 Object Computing, Inc.
2+
// All rights reserved.
3+
// See the file license.txt for licensing information.
4+
// Define build parameters for the QuickFAST example programs
5+
project : QuickFASTApplication, QuickFASTExeOut{
6+
7+
includes += $(QUICKFAST_ROOT)/src/Examples
8+
pch_header = Examples/ExamplesPch.h
9+
includes += $(BOOST_ROOT)/include
10+
pch_source = Examples/ExamplesPch.cpp
11+
after += QuickFAST
12+
Source_Files {
13+
Examples
14+
}
15+
Header_Files {
16+
Examples
17+
}
18+
}
19+
20+

QuickFASTExeOut.mpb

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// Copyright (c) 2009,2010 Object Computing, Inc.
2+
// All rights reserved.
3+
// See the file license.txt for licensing information.
4+
//////////////////////////////////////////////////////
5+
// Add-in mpb for exe's that are part of the QuickFAST
6+
// package.
7+
project {
8+
9+
specific(prop:microsoft) {
10+
Release::exeout = $(QUICKFAST_ROOT)/Output/Release
11+
Debug::exeout = $(QUICKFAST_ROOT)/Output/Debug
12+
} else {
13+
exeout = $(QUICKFAST_ROOT)/bin
14+
}
15+
}
16+
17+

bin/hgcle.py

+222
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,222 @@
1+
#!/usr/bin/env python
2+
"""
3+
Create Change Log Entry for a Mercurial repository.
4+
"""
5+
import sys
6+
import os
7+
import traceback
8+
import subprocess
9+
import optparse
10+
import time
11+
12+
def hg_command(options, *args):
13+
"""Run a hg command in path and return the result.
14+
returns a tuple of strings, stdout and stderr
15+
Throws on error.
16+
"""
17+
arglist = ["hg", "--encoding", "UTF-8", "--noninteractive"] + list(args)
18+
cmd = " ".join(arglist)
19+
if options.verbose:
20+
print "Running: ", cmd
21+
22+
proc = subprocess.Popen(arglist, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
23+
24+
# proc.communicate returns a tuple with stdout and stderr as utf-8 strings.
25+
# convert this to a list of decoded to python native strings
26+
out, err = [utf8string.decode("utf-8") for utf8string in proc.communicate()]
27+
28+
if proc.returncode:
29+
raise Exception("Error {0} running {1}:\n".format(proc.returncode, cmd),
30+
err,out,)
31+
return (out, err)
32+
33+
34+
def runEditor(options, fileName):
35+
if options.editor != "none":
36+
# start the editor. Do not wait for the results
37+
subprocess.Popen([options.editor, fileName])
38+
39+
40+
def displaySet(options, title, paths):
41+
"""Display the paths in the set
42+
options.verbose and options.quiet control the amount of data displayed
43+
title names the set of paths
44+
"""
45+
if(not options.quiet):
46+
if len(paths) > 0:
47+
print title,"files:",len(paths)
48+
if(options.verbose):
49+
for path in paths:
50+
print ' ',path
51+
else:
52+
if(options.verbose):
53+
print title,"files:",len(paths)
54+
55+
56+
def writeToChangeLog(file, paths, changeType):
57+
if len(paths) > 0:
58+
for path in paths:
59+
file.write(" * " + path + ":\n")
60+
file.write( " " + changeType + "\n")
61+
62+
def genChangeLogTag(options):
63+
nowstr = time.strftime("%a %b %d %H:%M:%S UTC %Y", time.gmtime())
64+
username = options.user
65+
replyto = options.email
66+
changeLogTag = nowstr + " " + username+ " <" + replyto + ">"
67+
return changeLogTag
68+
69+
70+
def run(options, args):
71+
changeLogFileName = "ChangeLog"
72+
if(len(args) > 0):
73+
changeLogFileName = args[0]
74+
if(len(args) > 1):
75+
print "Too many arguments: ", args[1:]
76+
return-1
77+
if not os.path.exists(changeLogFileName):
78+
print "Change log,", changeLogFileName, "must be an existing file. Are you in the right directory. "
79+
return -1
80+
81+
statusText, errorText = hg_command(options, "status", "-A", "-C")
82+
83+
# from hg help status:
84+
# M = modified
85+
# A = added
86+
# = origin of the previous file listed as A (added)
87+
# R = removed
88+
# C = clean
89+
# ! = missing (deleted by non-hg command, but still tracked)
90+
# ? = not tracked
91+
# I = ignored
92+
modified = []
93+
added = []
94+
removed = []
95+
missing = []
96+
clean = []
97+
unknown = []
98+
ignored = []
99+
renamed = []
100+
101+
for line in statusText.splitlines():
102+
(sts,space,path) = line.rstrip().partition(' ')
103+
#print '['+sts+']:'+path
104+
if sts == 'M':
105+
modified.append(path)
106+
elif sts == 'A':
107+
added.append(path)
108+
elif sts == '':
109+
path = path.strip()
110+
old = added[-1]
111+
added = added[:-1]
112+
renamed.append((path, old))
113+
elif sts == 'R':
114+
removed.append(path)
115+
elif sts == 'C':
116+
clean.append(path)
117+
elif sts == '!':
118+
missing.append(path)
119+
elif sts == '?':
120+
unknown.append(path)
121+
elif sts == 'I':
122+
ignored.append(path)
123+
else:
124+
print "Unknown status: '{0}' {1}".format(sts, path)
125+
126+
for rename in renamed:
127+
removed.remove(rename[0])
128+
129+
displaySet(options, "Modified", modified)
130+
displaySet(options, "Added", added)
131+
displaySet(options, "Removed", removed)
132+
displaySet(options, "Missing", missing)
133+
displaySet(options, "Unknown", unknown)
134+
displaySet(options, "Ignored", ignored)
135+
displaySet(options, "Clean", clean)
136+
displaySet(options, "Renamed", renamed)
137+
138+
if len(modified) + len(added) + len(removed) + len(renamed) > 0 :
139+
changeLogTag = genChangeLogTag(options)
140+
tempChangeLogFileName = "..." + changeLogFileName
141+
if(not options.quiet):
142+
print "Change Log Tag: ",changeLogTag
143+
144+
ok = False
145+
with open(tempChangeLogFileName, "w") as changeFile:
146+
changeFile.write(changeLogTag + '\n');
147+
writeToChangeLog(changeFile, modified, "Modified")
148+
writeToChangeLog(changeFile, added, "Added")
149+
writeToChangeLog(changeFile, removed,"Removed")
150+
for rename in renamed:
151+
writeToChangeLog(changeFile, rename, "Renamed")
152+
changeFile.write("\n")
153+
with open(changeLogFileName, "r") as oldChangeLog:
154+
for line in oldChangeLog:
155+
changeFile.write(line)
156+
ok = True
157+
158+
if ok:
159+
backupChangeLogFileName = changeLogFileName + ".bak"
160+
if os.path.exists(backupChangeLogFileName):
161+
os.remove(backupChangeLogFileName)
162+
163+
os.rename(changeLogFileName, backupChangeLogFileName)
164+
os.rename(tempChangeLogFileName, changeLogFileName)
165+
runEditor(options, changeLogFileName)
166+
return 0
167+
return -1
168+
169+
def defineCommandLineOptions(parser):
170+
try:
171+
userid = os.environ["USER"]
172+
except:
173+
try:
174+
userid = os.environ["USERNAME"]
175+
except:
176+
print "Who are you? Tried USER and USERNAME"
177+
return -1
178+
179+
try:
180+
user = os.environ["CL_USERNAME"]
181+
except:
182+
user = userid
183+
184+
try:
185+
email = os.environ["REPLYTO"];
186+
except:
187+
email = userid + "@ociweb.com"
188+
189+
editor = "none"
190+
if os.environ.has_key("EDITOR"):
191+
editor = os.environ["EDITOR"]
192+
193+
parser.add_option("-u", "--user", default=user, help="User name (default: %default)")
194+
parser.add_option("-m", "--email", default=email, help="Email address (default: %default)")
195+
parser.add_option("-e", "--editor", default=editor, help="Edit file after creating it using %default. -e \"none\" disables editing.")
196+
parser.add_option("-v", "--verbose", action="store_true", default=False, help="Print noise to standard output.")
197+
parser.add_option("-q", "--quiet", action="store_true", default=False, help="Suppress extra output.")
198+
return 0
199+
200+
def main (argv = None):
201+
try:
202+
if(argv == None):
203+
argv = sys.argv
204+
parser = optparse.OptionParser(usage = "usage: %prog [options] [changeLogname]\n Default changeLogname is ChangeLog")
205+
if defineCommandLineOptions(parser) < 0:
206+
return -1
207+
(options, args) = parser.parse_args(argv[1:])
208+
if(options.verbose):
209+
print "verbose: ", options.verbose
210+
print "user: ", options.user
211+
print "email: ", options.email
212+
print "editor: ", options.editor
213+
print "positional: ", args
214+
215+
return run(options, args)
216+
except Exception as ex:
217+
print "caught exception"
218+
traceback.print_exc(ex)
219+
return -1
220+
221+
if __name__ == "__main__":
222+
sys.exit(main())

0 commit comments

Comments
 (0)