Mercurial and Oracle Apps version control (lot's of DDL)

Greg Ward greg-hg at gerg.ca
Mon Nov 15 21:44:25 CST 2010


On Mon, Nov 15, 2010 at 2:56 PM, Joe Ferr <jferr at brocade.com> wrote:
> We currently use a workflow based tool (HP PPM aka Mercury IT Governance aka
> Kintana) to drive our process.  With Clearcase a developer requests one or
> more file/revision combinations from Clearcase via the tool and the tool
> executes (at the appropriate place/time after approvals etc) SQLplus which
> runs/executes the script(s) and routes in the workflow based on whether the
> script executed successfully (determined via Unix error code).
>
> So, just having access to the code tree (say a branch which “looks like”
> production) doesn’t handle this since I really need the files (not a list of
> files, the files) which have been added or modified since the previous
> deployment.  For reporting/visibility end users or QA personal need to
> easily see which DDL scripts have been executed (e.g. diffs).

It's not at all clear what you're asking for.  Keep in mind that the
people on this list know a lot about files, changesets, diffs,
patches, and Mercurial stuff, but very little about Oracle and exactly
nothing about your business.  So ask concrete questions using terms we
understand, and we'll get somewhere.

Anyways.  It sounds to me like you need to drink the Kool-Aid and
understand what a changset is.  Hint: it's a snapshot of your entire
source tree at a particular moment in time.  That moment is specified
by a developer running "hg commit".  So if you update to changeset X,
*boom* there are all the files from that changeset.  Getting diffs or
lists of files changed is actually a teeny bit harder than simply
getting the files.  ("hg diff -r X:Y" gives you a diff from changeset
X to Y, and "hg status --rev X:Y" gives you a list of
modified/added/removed files between them.)

As for recording which scripts have been executed: that's not what
version control is for.  Are you looking for "make" or similar tool?
(E.g. use a Makefile to drive everything.  Have it touch a timestamp
file for each script executed.  There's your record of what got
executed, and if you do it right, make will know what needs to be
executed, because its timestamp file is missing or stale.)

Greg


More information about the Mercurial mailing list