diff options
Diffstat (limited to 'main.py')
| -rwxr-xr-x | main.py | 10 |
1 files changed, 9 insertions, 1 deletions
| @@ -27,7 +27,9 @@ import os | |||
| 27 | import re | 27 | import re |
| 28 | import sys | 28 | import sys |
| 29 | 29 | ||
| 30 | from command import InteractiveCommand, PagedCommand | 30 | from command import InteractiveCommand |
| 31 | from command import MirrorSafeCommand | ||
| 32 | from command import PagedCommand | ||
| 31 | from editor import Editor | 33 | from editor import Editor |
| 32 | from error import ManifestInvalidRevisionError | 34 | from error import ManifestInvalidRevisionError |
| 33 | from error import NoSuchProjectError | 35 | from error import NoSuchProjectError |
| @@ -91,6 +93,12 @@ class _Repo(object): | |||
| 91 | cmd.manifest = Manifest(cmd.repodir) | 93 | cmd.manifest = Manifest(cmd.repodir) |
| 92 | Editor.globalConfig = cmd.manifest.globalConfig | 94 | Editor.globalConfig = cmd.manifest.globalConfig |
| 93 | 95 | ||
| 96 | if not isinstance(cmd, MirrorSafeCommand) and cmd.manifest.IsMirror: | ||
| 97 | print >>sys.stderr, \ | ||
| 98 | "fatal: '%s' requires a working directory"\ | ||
| 99 | % name | ||
| 100 | sys.exit(1) | ||
| 101 | |||
| 94 | if not gopts.no_pager and not isinstance(cmd, InteractiveCommand): | 102 | if not gopts.no_pager and not isinstance(cmd, InteractiveCommand): |
| 95 | config = cmd.manifest.globalConfig | 103 | config = cmd.manifest.globalConfig |
| 96 | if gopts.pager: | 104 | if gopts.pager: |
