mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-17 19:36:55 +00:00
use proper git subcommand invocations
This commit is contained in:
parent
964dffd3e7
commit
fcc2aba980
10
SConstruct
10
SConstruct
@ -340,12 +340,12 @@ if not env['static_test']:
|
||||
|
||||
if os.path.exists('.git'):
|
||||
try:
|
||||
env["svnrev"] = Popen(Split("git-svn find-rev refs/remotes/trunk"), stdout=PIPE, stderr=PIPE).communicate()[0].rstrip("\n")
|
||||
env["svnrev"] = Popen(Split("git svn find-rev refs/remotes/trunk"), stdout=PIPE, stderr=PIPE).communicate()[0].rstrip("\n")
|
||||
if not env["svnrev"]:
|
||||
# If you use git-svn for one svn path only there's no refs/remotes/trunk, only git-svn branch
|
||||
env["svnrev"] = Popen(Split("git-svn find-rev git-svn"), stdout=PIPE, stderr=PIPE).communicate()[0].rstrip("\n")
|
||||
# if git-svn can't find HEAD it's a local commit
|
||||
if Popen(Split("git-svn find-rev HEAD"), stdout=PIPE).communicate()[0].rstrip("\n") == "":
|
||||
# If you use git svn for one svn path only there's no refs/remotes/trunk, only git svn branch
|
||||
env["svnrev"] = Popen(Split("git svn find-rev git svn"), stdout=PIPE, stderr=PIPE).communicate()[0].rstrip("\n")
|
||||
# if git svn can't find HEAD it's a local commit
|
||||
if Popen(Split("git svn find-rev HEAD"), stdout=PIPE).communicate()[0].rstrip("\n") == "":
|
||||
env["svnrev"] += "L"
|
||||
if Popen(Split("git diff --exit-code --quiet")).wait() == 1:
|
||||
env["svnrev"] += "M"
|
||||
|
Loading…
x
Reference in New Issue
Block a user