self.metadir.create(self.args[0])
-class FetchCommand(CommandBase):
+class PullCommand(CommandBase):
def __init__(self):
usage = '%prog fetch [options] PAGENAME ...'
- CommandBase.__init__(self, 'fetch', 'fetch remote pages', usage)
- self.shortcuts.append('ft')
+ CommandBase.__init__(self, 'pull', 'add remote pages to repo', usage)
def _do_command(self):
self._die_if_no_init()
print '%s: %s: page does not exist, file not created' % \
(self.me, pagename)
continue
- revid = [x['revid'] for x in response[pageid]['revisions']]
- self.metadir.pagedict_add(pagename, int(pageid))
+ revids = [x['revid'] for x in response[pageid]['revisions']]
+ revids.sort()
+ self.metadir.pagedict_add(pagename, pageid, revids[-1])
self.metadir.pages_add_rv(int(pageid),
response[pageid]['revisions'][0])
filename = mw.api.pagename_to_filename(pagename)