Mercurial > hg
view tests/test-issue619.t @ 34639:a568a46751b6
selectors2: do not use platform.system()
`platform.system()` may have a side effect spawning a shell executing
`uname -p`, which may print a warning when the current directory is removed:
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
This patch changes selectors2 to test the `sys.platform` string, which is a
much safer way to detect Jython.
Jython's `sys.platform` looks like this:
Jython 2.7.1 (default:0df7adb1b397, Jun 30 2017, 19:02:43)
[OpenJDK 64-Bit Server VM (Oracle Corporation)] on java1.8.0_144
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.platform
'java1.8.0_144 ( ==linux2 for targets )'
Differential Revision: https://phab.mercurial-scm.org/D1018
author | Jun Wu <quark@fb.com> |
---|---|
date | Wed, 11 Oct 2017 17:27:21 -0700 |
parents | 2fc86d92c4a9 |
children | 55c6ebd11cb9 |
line wrap: on
line source
https://bz.mercurial-scm.org/619 $ hg init $ echo a > a $ hg ci -Ama adding a $ echo b > b $ hg branch b marked working directory as branch b (branches are permanent and global, did you want a bookmark?) $ hg ci -Amb adding b $ hg co -C 0 0 files updated, 0 files merged, 1 files removed, 0 files unresolved Fast-forward: $ hg merge b 1 files updated, 0 files merged, 0 files removed, 0 files unresolved (branch merge, don't forget to commit) $ hg ci -Ammerge Bogus fast-forward should fail: $ hg merge b abort: merging with a working directory ancestor has no effect [255] Even with strange revset (issue4465) $ hg merge ::. abort: merging with a working directory ancestor has no effect [255]