Mercurial > hg
annotate tests/printrevset.py @ 41855:2dbdb9abcc4b
inno: remove w9xpopen.exe
w9xpopen.exe is a utility program shipped with Python <3.4
(https://bugs.python.org/issue14470 tracked its removal).
The program was used by subprocess to wrap invoked processes
on Windows 95 and 98 or when command.com was used in order to
work around a redirect bug.
The workaround is only used on ancient Windows versions -
versions that we shouldn't see in 2019.
While Python 2.7's subprocess module still references
w9xpopen.exe, not shipping it shouldn't matter unless we're
running an ancient version of Windows. Python will raise
an exception if w9xpopen.exe can't be found.
It's highly unlikely anyone is using current Mercurial releases
on these ancient Windows versions. So remove w9xpopen.exe
from the Inno installer.
.. bc::
The 32-bit Windows Inno installers no longer distribute
w9xpopen.exe. This should only impact people running
Mercurial on Windows 95, 98, or ME.
Differential Revision: https://phab.mercurial-scm.org/D6068
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sun, 03 Mar 2019 17:22:03 -0800 |
parents | a271466cb53a |
children | 2372284d9457 |
rev | line source |
---|---|
39058
a271466cb53a
tests: extract printrevset extension from test-glog-beautifygraph.t
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
1 from __future__ import absolute_import |
a271466cb53a
tests: extract printrevset extension from test-glog-beautifygraph.t
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
2 from mercurial import ( |
a271466cb53a
tests: extract printrevset extension from test-glog-beautifygraph.t
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
3 cmdutil, |
a271466cb53a
tests: extract printrevset extension from test-glog-beautifygraph.t
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
4 commands, |
a271466cb53a
tests: extract printrevset extension from test-glog-beautifygraph.t
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
5 extensions, |
a271466cb53a
tests: extract printrevset extension from test-glog-beautifygraph.t
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
6 logcmdutil, |
a271466cb53a
tests: extract printrevset extension from test-glog-beautifygraph.t
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
7 revsetlang, |
a271466cb53a
tests: extract printrevset extension from test-glog-beautifygraph.t
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
8 smartset, |
a271466cb53a
tests: extract printrevset extension from test-glog-beautifygraph.t
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
9 ) |
a271466cb53a
tests: extract printrevset extension from test-glog-beautifygraph.t
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
10 |
a271466cb53a
tests: extract printrevset extension from test-glog-beautifygraph.t
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
11 from mercurial.utils import ( |
a271466cb53a
tests: extract printrevset extension from test-glog-beautifygraph.t
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
12 stringutil, |
a271466cb53a
tests: extract printrevset extension from test-glog-beautifygraph.t
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
13 ) |
a271466cb53a
tests: extract printrevset extension from test-glog-beautifygraph.t
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
14 |
a271466cb53a
tests: extract printrevset extension from test-glog-beautifygraph.t
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
15 def logrevset(repo, pats, opts): |
a271466cb53a
tests: extract printrevset extension from test-glog-beautifygraph.t
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
16 revs = logcmdutil._initialrevs(repo, opts) |
a271466cb53a
tests: extract printrevset extension from test-glog-beautifygraph.t
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
17 if not revs: |
a271466cb53a
tests: extract printrevset extension from test-glog-beautifygraph.t
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
18 return None |
a271466cb53a
tests: extract printrevset extension from test-glog-beautifygraph.t
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
19 match, pats, slowpath = logcmdutil._makematcher(repo, revs, pats, opts) |
a271466cb53a
tests: extract printrevset extension from test-glog-beautifygraph.t
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
20 return logcmdutil._makerevset(repo, match, pats, slowpath, opts) |
a271466cb53a
tests: extract printrevset extension from test-glog-beautifygraph.t
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
21 |
a271466cb53a
tests: extract printrevset extension from test-glog-beautifygraph.t
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
22 def uisetup(ui): |
a271466cb53a
tests: extract printrevset extension from test-glog-beautifygraph.t
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
23 def printrevset(orig, repo, pats, opts): |
a271466cb53a
tests: extract printrevset extension from test-glog-beautifygraph.t
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
24 revs, filematcher = orig(repo, pats, opts) |
a271466cb53a
tests: extract printrevset extension from test-glog-beautifygraph.t
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
25 if opts.get(b'print_revset'): |
a271466cb53a
tests: extract printrevset extension from test-glog-beautifygraph.t
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
26 expr = logrevset(repo, pats, opts) |
a271466cb53a
tests: extract printrevset extension from test-glog-beautifygraph.t
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
27 if expr: |
a271466cb53a
tests: extract printrevset extension from test-glog-beautifygraph.t
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
28 tree = revsetlang.parse(expr) |
a271466cb53a
tests: extract printrevset extension from test-glog-beautifygraph.t
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
29 tree = revsetlang.analyze(tree) |
a271466cb53a
tests: extract printrevset extension from test-glog-beautifygraph.t
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
30 else: |
a271466cb53a
tests: extract printrevset extension from test-glog-beautifygraph.t
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
31 tree = [] |
a271466cb53a
tests: extract printrevset extension from test-glog-beautifygraph.t
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
32 ui = repo.ui |
a271466cb53a
tests: extract printrevset extension from test-glog-beautifygraph.t
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
33 ui.write(b'%s\n' % stringutil.pprint(opts.get(b'rev', []))) |
a271466cb53a
tests: extract printrevset extension from test-glog-beautifygraph.t
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
34 ui.write(revsetlang.prettyformat(tree) + b'\n') |
a271466cb53a
tests: extract printrevset extension from test-glog-beautifygraph.t
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
35 ui.write(stringutil.prettyrepr(revs) + b'\n') |
a271466cb53a
tests: extract printrevset extension from test-glog-beautifygraph.t
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
36 revs = smartset.baseset() # display no revisions |
a271466cb53a
tests: extract printrevset extension from test-glog-beautifygraph.t
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
37 return revs, filematcher |
a271466cb53a
tests: extract printrevset extension from test-glog-beautifygraph.t
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
38 extensions.wrapfunction(logcmdutil, 'getrevs', printrevset) |
a271466cb53a
tests: extract printrevset extension from test-glog-beautifygraph.t
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
39 aliases, entry = cmdutil.findcmd(b'log', commands.table) |
a271466cb53a
tests: extract printrevset extension from test-glog-beautifygraph.t
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
40 entry[1].append((b'', b'print-revset', False, |
a271466cb53a
tests: extract printrevset extension from test-glog-beautifygraph.t
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
41 b'print generated revset and exit (DEPRECATED)')) |