Skip to content

Commit

Permalink
Edkrepo: Enable using Tags in parent_sha of patchsets
Browse files Browse the repository at this point in the history
- Checked whether the parent_sha is in the tag list. If yes,
checkout tags/<parent_sha> otherwise normal checkout

Signed-off-by: Harsh Vora [email protected]
Reviewed-by: Ashley DeSimone <[email protected]>
Reviewed-by:  Kevin Sun <[email protected]>
Reviewed-by: Nate DeSimone <[email protected]>
  • Loading branch information
hrsh25 authored and ashedesimone committed Dec 20, 2022
1 parent a1373a6 commit 9102f86
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion edkrepo/common/common_repo_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -822,7 +822,10 @@ def create_local_branch(name, patchset, global_manifest_path, manifest_obj, repo
parent_patchset = manifest_obj.get_patchset(patchset.parent_sha, patchset.remote)
repo.git.checkout(parent_patchset[2], b=name)
except:
repo.git.checkout(patchset.parent_sha, b=name)
if patchset.parent_sha in repo.tags:
repo.git.checkout("tags/{}".format(patchset.parent_sha), b=name)
else:
repo.git.checkout(patchset.parent_sha, b=name)
try:
apply_patchset_operations(repo, remote, operations_list, global_manifest_path, remote_list)
head_sha = repo.git.execute(['git', 'rev-parse', 'HEAD'])
Expand Down

0 comments on commit 9102f86

Please sign in to comment.