Merge branch 'v4-0-stable' into newmaster
authorJelmer Vernooij <jelmer@samba.org>
Mon, 20 Sep 2010 22:24:44 +0000 (15:24 -0700)
committerJelmer Vernooij <jelmer@samba.org>
Mon, 20 Sep 2010 22:24:44 +0000 (15:24 -0700)
1  2 
buildtools/wafsamba/samba_version.py

index 0128670bab6769a4fa943fd74d380b00d6ab5970,f2e26ec4e23d77a47c818c5e3e84c552d4747ac8..82f882f64626faf399bc0615823550fc98407e79
@@@ -27,9 -27,9 +27,9 @@@ also accepted as dictionary entries her
              else:
                  setattr(self, a, b)
  
-         if self.IS_GIT_SNAPSHOT is "yes":
+         if self.IS_GIT_SNAPSHOT == "yes":
              self.IS_GIT_SNAPSHOT=True
-         elif self.IS_GIT_SNAPSHOT is "no":
+         elif self.IS_GIT_SNAPSHOT == "no":
              self.IS_GIT_SNAPSHOT=False
                  
   ##
  
                  SAMBA_VERSION_STRING += ("-GIT-" + self.GIT_COMMIT_ABBREV)
  
 +                clean = Utils.cmd_output('git diff HEAD | wc -l', silent=True)
 +                if clean == "0\n":
 +                    self.GIT_COMMIT_IS_CLEAN = True
 +                else:
 +                    self.GIT_COMMIT_IS_CLEAN = False
 +                    SAMBA_VERSION_STRING += "+"
 +
          self.OFFICIAL_STRING=SAMBA_VERSION_STRING
  
          if self.VENDOR_SUFFIX is not None:
              string+="#define SAMBA_VERSION_RC_RELEASE %u\n" % self.RC_RELEASE
  
          try:
 -            string+="#define SAMBA_VERSION_GIT_COMMIT_ABBREV " + self.GIT_COMMIT_ABBREV + "\n"
 +            string+="#define SAMBA_VERSION_GIT_COMMIT_ABBREV \"" + self.GIT_COMMIT_ABBREV + "\"\n"
 +            string+="#define SAMBA_VERSION_GIT_COMMIT_FULLREV \"" + self.GIT_COMMIT_FULLREV + "\"\n"
 +            string+="#define SAMBA_VERSION_GIT_COMMIT_DATE \"" + self.GIT_COMMIT_DATE + "\"\n"
              string+="#define SAMBA_VERSION_GIT_COMMIT_TIME " + self.GIT_COMMIT_TIME + "\n"
 -            string+="#define SAMBA_VERSION_GIT_COMMIT_FULLREV " + self.GIT_COMMIT_TIME + "\n"
 -            string+="#define SAMBA_VERSION_GIT_COMMIT_DATE " + self.GIT_COMMIT_DATA + "\n"
 +            if self.GIT_COMMIT_IS_CLEAN:
 +                string+="#define SAMBA_VERSION_GIT_COMMIT_IS_CLEAN 1\n"
          except AttributeError:
              pass