Commits

Searching for commits

Mercurial supports a functional language for selecting a set of
revisions.

The language supports a number of predicates which are joined by
infix operators. Parenthesis can be used for grouping.

Identifiers such as branch names must be quoted with single
or double quotes if they contain characters outside of
[._a-zA-Z0-9\x80-\xff] or if they match one of the
predefined predicates.

Prefix operators

not x

Changesets not in x. Short form is ! x.

Infix operators

x::y

A DAG range, meaning all changesets that are descendants
of x and ancestors of y, including x and y themselves.
If the first endpoint is left out, this is equivalent to
ancestors(y), if the second is left out it
is equivalent to descendants(x).

An alternative syntax is x..y.

x:y

All changesets with revision numbers between x and y, both
inclusive. Either endpoint can be left out, they default to
0 and tip.

x and y

The intersection of changesets in x and y. Short form is
x & y.

x or y

The union of changesets in x and y. There are two alternative
short forms: x | y and x + y.

x - y

Changesets in x but not in y.

Predicates

all()

All changesets, the same as 0:tip.

ancestor(single, single)

Greatest common ancestor of the two changesets.

ancestors(set)

Changesets that are ancestors of a changeset in set.

author(string)

Alias for user(string).

bookmark([name])

The named bookmark or all bookmarks.

branch(set)

All changesets belonging to the branches of changesets in set.

children(set)

Child changesets of changesets in set.

closed()

Changeset is closed.

date(interval)

Changesets within the interval, see hg help dates.

descendants(set)

Changesets which are descendants of changesets in set.

file(pattern)

Changesets affecting files matched by pattern.

follow()

An alias for ::. (ancestors of the working copy's
first parent).

grep(regex)

Like keyword(string) but accepts a regex. Use
grep(r'...') to ensure special escape characters
are handled correctly.

- Rewrote the reflection of indexes to use sys.
catalogs, so that column names of any configuration
(spaces, embedded commas, etc.) can be reflected.
Note that reflection of indexes requires SQL
Server 2005 or greater. [ticket:1770]

- Added type_coerce(expr, type_) expression element.
Treats the given expression as the given type when evaluating
expressions and processing result rows, but does not
affect the generation of SQL, other than an anonymous label.

- Oracle - the implicit_retunring argument to create_engine()
is now honored regardless of detected version of
Oracle. Previously, the flag would be forced
to False if server version info was < 10.
[ticket:1878]

- New Query methods: query.label(name), query.as_scalar(),
return the query's statement as a scalar subquery
with /without label [ticket:1920];
query.with_entities(*ent), replaces the SELECT list of
the query with new entities.
Roughly equivalent to a generative form of query.values()
which accepts mapped entities as well as column
expressions.

- Fixed bug in TypeDecorator whereby the dialect-specific
type was getting pulled in to generate the DDL for a
given type, which didn't always return the correct result.
- TypeDecorator can now have a fully constructed type
specified as its "impl", in addition to a type class.
- TypeDecorator will now place itself as the resulting
type for a binary expression where the type coercion
rules would normally return its impl type - previously,
a copy of the impl type would be returned which would
have the TypeDecorator embedded into it as the "dialect"
impl, this was p…

- the NoseSQLAlchemyPlugin has been moved to a
new package "sqlalchemy_nose" which installs
along with "sqlalchemy". This so that the "nosetests"
script works as always but also allows the
--with-coverage option to turn on coverage before
SQLAlchemy modules are imported, allowing coverage
to work correctly.
- added some new ignores

- Added a new "lazyload" option "immediateload".
Issues the usual "lazy" load operation automatically
as the object is populated. The use case
here is when loading objects to be placed in
an offline cache, or otherwise used after
the session isn't available, and straight 'select'
loading, not 'joined' or 'subquery', is desired.
[ticket:1914]