def changelogrevision(self, rev): if hasattr(rev, 'id'): rev = rev.id commit = self._gitrepo[rev] return changelog._changelogrevision( extra=changelog._defaultextra, user="******" % (commit.author.name, commit.author.email), date=(commit.commit_time, commit.commit_time_offset), description=commit.message)
def changelogrevision(self, noderev): values = self.read(noderev) return changelog._changelogrevision( manifest=values[0], user=values[1], date=values[2], files=values[3], description=values[4], extra=values[5], )
def changelogrevision(self, nodeorrev): # Ensure we have a node id if isinstance(nodeorrev, int): n = self.node(nodeorrev) else: n = nodeorrev # handle looking up nullid if n == nullid: return hgchangelog._changelogrevision(extra={}) hn = gitutil.togitnode(n) # We've got a real commit! files = [ r[0] for r in self._db.execute( 'SELECT filename FROM changedfiles ' 'WHERE node = ? and filenode != ?', (hn, gitutil.nullgit), ) ] filesremoved = [ r[0] for r in self._db.execute( 'SELECT filename FROM changedfiles ' 'WHERE node = ? and filenode = ?', (hn, nullhex), ) ] c = self.gitrepo[hn] return hgchangelog._changelogrevision( manifest=n, # pretend manifest the same as the commit node user=b'%s <%s>' % (c.author.name.encode('utf8'), c.author.email.encode('utf8')), date=(c.author.time, -c.author.offset * 60), files=files, # TODO filesadded in the index filesremoved=filesremoved, description=c.message.encode('utf8'), # TODO do we want to handle extra? how? extra={b'branch': b'default'}, )
def changelogrevision(self, noderev): return changelog._changelogrevision(*self.read(noderev))
def changelogrevision(self, noderev): return changelog._changelogrevision(*self.read(noderev))