/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to mapping.py

Remove silly mapping of timezones; dulwich uses offsets now as well.

Show diffs side-by-side

added added

removed removed

Lines of Context:
120
120
        if commit.commit_time != commit.author_time:
121
121
            rev.properties['author-timestamp'] = str(commit.author_time)
122
122
        if commit.commit_timezone != commit.author_timezone:
123
 
            rev.properties['author-timezone'] = "%f" % (commit.author_timezone * .6)
 
123
            rev.properties['author-timezone'] = "%d" % (commit.author_timezone, )
124
124
        rev.timestamp = commit.commit_time
125
 
        rev.timezone = int(commit.commit_timezone * .6)
126
 
        if rev.timezone / .6 != commit.commit_timezone:
127
 
            rev.properties['commit-timezone'] = "%f" % (commit.commit_timezone * .6)
 
125
        rev.timezone = commit.commit_timezone
128
126
        return rev
129
127
 
130
128
 
289
287
        commit.author_time = long(rev.properties['author-timestamp'])
290
288
    else:
291
289
        commit.author_time = commit.commit_time
292
 
    if 'committer-timezone' in rev.properties:
293
 
        commit.commit_timezone = int(float(rev.properties['commit-timezone']) / .6)
294
 
    else:
295
 
        commit.commit_timezone = int(rev.timezone / .6) 
 
290
    commit.commit_timezone = rev.timezone
296
291
    if 'author-timezone' in rev.properties:
297
 
        commit.author_timezone = int(float(rev.properties['author-timezone']) / .6)
 
292
        commit.author_timezone = int(rev.properties['author-timezone'])
298
293
    else:
299
294
        commit.author_timezone = commit.commit_timezone 
300
295
    return commit