comparison hgext/fetch.py @ 6207:03b13d853dc6

fetch: make test reproducible, tiny code cleanup
author Bryan O'Sullivan <bos@serpentine.com>
date Wed, 05 Mar 2008 09:20:57 -0800
parents 0b6f12495276
children f89fd07fc51d
comparison
equal deleted inserted replaced
6206:0b6f12495276 6207:03b13d853dc6
77 77
78 other = hg.repository(ui, ui.expandpath(source)) 78 other = hg.repository(ui, ui.expandpath(source))
79 ui.status(_('pulling from %s\n') % 79 ui.status(_('pulling from %s\n') %
80 util.hidepassword(ui.expandpath(source))) 80 util.hidepassword(ui.expandpath(source)))
81 revs = None 81 revs = None
82 if opts['rev'] and not other.local(): 82 if opts['rev']:
83 raise util.Abort(_("fetch -r doesn't work for remote repositories yet")) 83 if not other.local():
84 elif opts['rev']: 84 raise util.Abort(_("fetch -r doesn't work for remote "
85 revs = [other.lookup(rev) for rev in opts['rev']] 85 "repositories yet"))
86 else:
87 revs = [other.lookup(rev) for rev in opts['rev']]
86 modheads = repo.pull(other, heads=revs) 88 modheads = repo.pull(other, heads=revs)
87 return postincoming(other, modheads) 89 return postincoming(other, modheads)
88 90
89 date = opts.get('date') 91 date = opts.get('date')
90 if date: 92 if date: