Deal with date-less revisions

Issue #68 resolved
Dirkjan Ochtman created an issue

{{{

!diff

diff --git a/hg_delta_editor.py b/hg_delta_editor.py --- a/hg_delta_editor.py +++ b/hg_delta_editor.py @@ -117,6 +117,8 @@ self.readauthors(authors) if self.authors: self.writeauthors() + + self.lastdate = '1970-01-01 00:00:00' self.includepaths = {} self.excludepaths = {} if filemap and os.path.exists(filemap): @@ -561,8 +563,13 @@ files_to_commit.sort() branch_batches = {} rev = self.current_rev - date = rev.date.replace('T', ' ').replace('Z', '').split('.')[0] - date += ' -0000' + + if rev.date is not None: + date = rev.date.replace('T', ' ').replace('Z', '').split('.')[0] + date += ' -0000' + self.lastdate = date + else: + date = self.lastdate

     # build up the branches that have files on them
     for f in files_to_commit:

}}}

Comments (1)

  1. Log in to comment