Skip to content
Snippets Groups Projects

repositoryService: implement GetRawChanges

Open Sushil Khanchi requested to merge topic/default/repository-GetRawChanges into branch/default
1 unresolved thread
2 files
+ 10
10
Compare changes
  • Side-by-side
  • Inline
Files
2
+ 1
10
@@ -21,6 +21,7 @@
parse_diff_request_cid,
exportsingle,
insert_blob_index,
additions_deletions,
)
from mercurial import (
copies,
@@ -532,16 +533,6 @@
return (True, repo, ctx_from, ctx_to)
def additions_deletions(header):
"""Return number of lines added and deleted in a patch header."""
adds, dels = 0, 0
for hunk in header.hunks:
add_count, del_count = hunk.countchanges(hunk.hunk)
adds += add_count
dels += del_count
return adds, dels
def commit_delta_size(delta):
size = (
len(delta.from_id) + len(delta.to_id)
Loading