Mercurial > public > mercurial-scm > python-hglib
comparison hglib/client.py @ 64:a7d98dc798c5
client: add manifest command
author | Idan Kamara <idankk86@gmail.com> |
---|---|
date | Tue, 23 Aug 2011 21:41:17 +0300 |
parents | 939d1d763bb1 |
children | 91ffa1de398c |
comparison
equal
deleted
inserted
replaced
63:939d1d763bb1 | 64:a7d98dc798c5 |
---|---|
550 | 550 |
551 out = self.rawcommand(args) | 551 out = self.rawcommand(args) |
552 out = out.split('\0')[:-1] | 552 out = out.split('\0')[:-1] |
553 | 553 |
554 return self._parserevs(out) | 554 return self._parserevs(out) |
555 | |
556 def manifest(self, rev=None, all=False): | |
557 """ | |
558 Yields (nodeid, permission, executable, symlink, file path) tuples for | |
559 version controlled files for the given revision. If no revision is given, | |
560 the first parent of the working directory is used, or the null revision if | |
561 no revision is checked out. | |
562 | |
563 When all is True, all files from all revisions are yielded (just the name). | |
564 This includes deleted and renamed files. | |
565 """ | |
566 args = cmdbuilder('manifest', r=rev, all=all, debug=True) | |
567 | |
568 out = self.rawcommand(args) | |
569 | |
570 if all: | |
571 for line in out.splitlines(): | |
572 yield line | |
573 else: | |
574 for line in out.splitlines(): | |
575 node = line[0:40] | |
576 perm = line[41:44] | |
577 symlink = line[45] == '@' | |
578 executable = line[45] == '*' | |
579 yield (node, perm, executable, symlink, line[47:]) | |
555 | 580 |
556 def merge(self, rev=None, force=False, tool=None, cb=merge.handlers.abort): | 581 def merge(self, rev=None, force=False, tool=None, cb=merge.handlers.abort): |
557 """ | 582 """ |
558 merge working directory with another revision | 583 merge working directory with another revision |
559 | 584 |