Skip to content

Commit

Permalink
Bug 1828951 - handle file rename path fix-ups in extract-for-git.py r…
Browse files Browse the repository at this point in the history
…=dbaker DONTBUILD

Differential Revision: https://phabricator.services.mozilla.com/D175917
  • Loading branch information
mfromanmoz committed Apr 19, 2023
1 parent 050f579 commit b23b7cc
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions dom/media/webrtc/third_party_build/extract-for-git.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,11 @@ def filter_nonwebrtc(commit):


def fixup_paths(commit):
# make sure we only rewrite paths in the diff-related lines
return re.sub("( [ab])/" + LIBWEBRTC_DIR + "/", "\\1/", commit)
# make sure we only rewrite paths in the diff-related or rename lines
commit = re.sub(
f"^rename (from|to) {LIBWEBRTC_DIR}/", "rename \\1 ", commit, flags=re.MULTILINE
)
return re.sub(f"( [ab])/{LIBWEBRTC_DIR}/", "\\1/", commit)


def write_as_mbox(sha1, author, date, description, commit, ofile):
Expand Down

0 comments on commit b23b7cc

Please sign in to comment.