Author: soliton
Date: Mon Nov 17 11:38:47 2008
New Revision: 30785

URL: http://svn.gna.org/viewcvs/wesnoth?rev=30785&view=rev
Log:
made svn revision calculation also work with trunk only git-svn (patch by 
ivan_i)

Modified:
    trunk/SConstruct

Modified: trunk/SConstruct
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/SConstruct?rev=30785&r1=30784&r2=30785&view=diff
==============================================================================
--- trunk/SConstruct (original)
+++ trunk/SConstruct Mon Nov 17 11:38:47 2008
@@ -334,7 +334,10 @@
 
 if os.path.exists('.git'):
     try:
-        env["svnrev"] = Popen(Split("git-svn find-rev refs/remotes/trunk"), 
stdout=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") == "":
             env["svnrev"] += "L"


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to