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
|
raise e
|
||||||
|
|
||||||
def run(self):
|
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:
|
try:
|
||||||
self.setup_repo()
|
self.setup_repo()
|
||||||
|
|
||||||
|
@ -246,6 +252,8 @@ class GstMRMover:
|
||||||
finally:
|
finally:
|
||||||
if self.git_rename_limit is not None:
|
if self.git_rename_limit is not None:
|
||||||
self.git("config", "merge.renameLimit", str(self.git_rename_limit))
|
self.git("config", "merge.renameLimit", str(self.git_rename_limit))
|
||||||
|
if prevbranch:
|
||||||
|
self.git("checkout", prevbranch)
|
||||||
|
|
||||||
def fetch_projects(self):
|
def fetch_projects(self):
|
||||||
fprint("Fetching projects... ")
|
fprint("Fetching projects... ")
|
||||||
|
|
Loading…
Reference in a new issue