##// END OF EJS Templates
Moved --cwd handling to a place where ui and exception handling already exists.
Thomas Arendsen Hein -
r1050:9c09094d default
parent child Browse files
Show More
@@ -1609,14 +1609,6 b' def dispatch(args):'
1609 1609 help_(u, 'shortlist')
1610 1610 sys.exit(1)
1611 1611
1612 if options['cwd']:
1613 try:
1614 os.chdir(options['cwd'])
1615 except OSError, inst:
1616 u = ui.ui()
1617 u.warn('abort: %s: %s\n' % (options['cwd'], inst.strerror))
1618 sys.exit(1)
1619
1620 1612 if options["time"]:
1621 1613 def get_times():
1622 1614 t = os.times()
@@ -1646,6 +1638,13 b' def dispatch(args):'
1646 1638 help_(u, 'shortlist')
1647 1639 sys.exit(0)
1648 1640
1641 if options['cwd']:
1642 try:
1643 os.chdir(options['cwd'])
1644 except OSError, inst:
1645 u.warn('abort: %s: %s\n' % (options['cwd'], inst.strerror))
1646 sys.exit(1)
1647
1649 1648 if cmd not in norepo.split():
1650 1649 path = options["repository"] or ""
1651 1650 repo = hg.repository(ui=u, path=path)
General Comments 0
You need to be logged in to leave comments. Login now