mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-25 03:01:03 +00:00
move-mrs-script: Get back to checked out branch
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/919>
This commit is contained in:
parent
6d2f033dbb
commit
c722bedf1d
1 changed files with 8 additions and 0 deletions
|
@ -236,6 +236,12 @@ class GstMRMover:
|
|||
raise e
|
||||
|
||||
def run(self):
|
||||
try:
|
||||
prevbranch = self.git("rev-parse", "--abbrev-ref", "HEAD", can_fail=True).strip()
|
||||
except:
|
||||
fprint(bold(yellow("Not on a branch?\n")), indent=False)
|
||||
prevbranch = None
|
||||
|
||||
try:
|
||||
self.setup_repo()
|
||||
|
||||
|
@ -246,6 +252,8 @@ class GstMRMover:
|
|||
finally:
|
||||
if self.git_rename_limit is not None:
|
||||
self.git("config", "merge.renameLimit", str(self.git_rename_limit))
|
||||
if prevbranch:
|
||||
self.git("checkout", prevbranch)
|
||||
|
||||
def fetch_projects(self):
|
||||
fprint("Fetching projects... ")
|
||||
|
|
Loading…
Reference in a new issue