Mercurial > hg
comparison hgext/hgcia.py @ 22917:1c38b4063586
hgcia: access status fields by name rather than index
author | Martin von Zweigbergk <martinvonz@gmail.com> |
---|---|
date | Fri, 03 Oct 2014 09:51:39 -0700 |
parents | e96e9f805c19 |
children | 6ddc86eedc3b |
comparison
equal
deleted
inserted
replaced
22916:cfa8d7561938 | 22917:1c38b4063586 |
---|---|
80 f = self.cia.repo.status(self.ctx.p1().node(), n) | 80 f = self.cia.repo.status(self.ctx.p1().node(), n) |
81 url = self.url or '' | 81 url = self.url or '' |
82 if url and url[-1] == '/': | 82 if url and url[-1] == '/': |
83 url = url[:-1] | 83 url = url[:-1] |
84 elems = [] | 84 elems = [] |
85 for path in f[0]: | 85 for path in f.modified: |
86 uri = '%s/diff/%s/%s' % (url, short(n), path) | 86 uri = '%s/diff/%s/%s' % (url, short(n), path) |
87 elems.append(self.fileelem(path, url and uri, 'modify')) | 87 elems.append(self.fileelem(path, url and uri, 'modify')) |
88 for path in f[1]: | 88 for path in f.added: |
89 # TODO: copy/rename ? | 89 # TODO: copy/rename ? |
90 uri = '%s/file/%s/%s' % (url, short(n), path) | 90 uri = '%s/file/%s/%s' % (url, short(n), path) |
91 elems.append(self.fileelem(path, url and uri, 'add')) | 91 elems.append(self.fileelem(path, url and uri, 'add')) |
92 for path in f[2]: | 92 for path in f.removed: |
93 elems.append(self.fileelem(path, '', 'remove')) | 93 elems.append(self.fileelem(path, '', 'remove')) |
94 | 94 |
95 return '\n'.join(elems) | 95 return '\n'.join(elems) |
96 | 96 |
97 def sourceelem(self, project, module=None, branch=None): | 97 def sourceelem(self, project, module=None, branch=None): |