mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 08:47:12 +03:00
90c062ca08
Summary: This makes debugshell easier to use. Especially when the script wants to access `__file__`. Reviewed By: DurhamG Differential Revision: D21169556 fbshipit-source-id: 88b3ebb1ca9a39fe26bc7cc5ea8e250c28fa0d6f
13 lines
266 B
Perl
13 lines
266 B
Perl
#chg-compatible
|
|
|
|
$ cat >> foo.py << EOF
|
|
> ui.write('argv = %r\n' % (sys.argv,))
|
|
> EOF
|
|
|
|
$ hg debugshell foo.py 1 2 3
|
|
argv = ('foo.py', '1', '2', '3')
|
|
$ hg debugshell -c "$(cat foo.py)" 1 2 3
|
|
argv = ('1', '2', '3')
|
|
$ hg debugshell < foo.py
|
|
argv = ()
|