equal
deleted
inserted
replaced
364 cwd = _earlygetopt(['--cwd'], args) |
364 cwd = _earlygetopt(['--cwd'], args) |
365 if cwd: |
365 if cwd: |
366 os.chdir(cwd[-1]) |
366 os.chdir(cwd[-1]) |
367 |
367 |
368 # read the local repository .hgrc into a local ui object |
368 # read the local repository .hgrc into a local ui object |
369 path = cmdutil.findrepo(os.getcwd()) or "" |
369 try: |
|
370 wd = os.getcwd() |
|
371 except OSError, e: |
|
372 raise util.Abort(_("error getting current working directory: %s") % |
|
373 e.strerror) |
|
374 path = cmdutil.findrepo(wd) or "" |
370 if not path: |
375 if not path: |
371 lui = ui |
376 lui = ui |
372 else: |
377 else: |
373 try: |
378 try: |
374 lui = ui.copy() |
379 lui = ui.copy() |