]> jfr.im git - irc/quakenet/qwebirc.git/commitdiff
hg -> git
authorChris Porter <redacted>
Sun, 16 Jul 2017 17:29:40 +0000 (18:29 +0100)
committerChris Porter <redacted>
Sun, 16 Jul 2017 17:29:40 +0000 (18:29 +0100)
.gitignore [new file with mode: 0644]
.hgignore [deleted file]
.hgtags [deleted file]
bin/cleanpyc.py
bin/compile.py
bin/dependencies_b.py
bin/mkstatic.py
bin/pagegen.py

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..a6165eb
--- /dev/null
@@ -0,0 +1,29 @@
+static/js/qui.js
+static/js/qui-*.js
+static/js/qwebirc.js
+static/js/debug
+static/css
+static/css/debug
+static/panes/privacypolicy.html
+config.py
+dropin.cache
+*.tap
+*.pyc
+*.log*
+*.pid
+defargs.conf
+Thumbs.db
+desktop.ini
+Desktop.ini
+static/quidebug.html
+static/qui.html
+.checked
+.compiled
+bin/.checked
+bin/.compiled
+ssl
+screenlog*
+syslog.py
+run.sh
+.idea
+*.iml
diff --git a/.hgignore b/.hgignore
deleted file mode 100644 (file)
index 0c07dce..0000000
--- a/.hgignore
+++ /dev/null
@@ -1,23 +0,0 @@
-syntax: glob
-static/js/{ugly,swm,mocha,q}ui{,-*}.js
-static/js/qwebirc.js
-static/{js,css}/debug
-static/css
-static/panes/privacypolicy.html
-config.py
-dropin.cache
-*.tap
-*.pyc
-*.log*
-*.pid
-defargs.conf
-Thumbs.db
-[dD]esktop.ini
-static/{ugly,swm,mocha,q}ui{,debug}.html
-{bin/,}.checked
-{bin/,}.compiled
-ssl
-screenlog*
-syslog.py
-run.sh
-
diff --git a/.hgtags b/.hgtags
deleted file mode 100644 (file)
index 30c30b6..0000000
--- a/.hgtags
+++ /dev/null
@@ -1,3 +0,0 @@
-231e288a731ad5d5af0b69569ccfa09b88cbcbb4 stable
-231e288a731ad5d5af0b69569ccfa09b88cbcbb4 stable
-0000000000000000000000000000000000000000 stable
index b10f1735aae0ee243be30b6c6381a376d65be611..c4b681ea9cac18cf92efbc05d40795aa8098aa89 100755 (executable)
@@ -8,11 +8,11 @@ def tryunlink(*args):
     
 def main():
   for root, dirs, files in os.walk("."):
-    if ".hg" in dirs:
-      dirs.remove(".hg")
+    if ".git" in dirs:
+      dirs.remove(".git")
     for x in files:
       if os.path.splitext(x)[-1] == ".pyc":
         tryunlink(root, x)
 
 if __name__ == "__main__":
-  main()
\ No newline at end of file
+  main()
index f037e93532fc02d916455827adfac548c491d787..c5a35d8552c56f475d3f328904a3424fdcf936fe 100644 (file)
@@ -67,7 +67,7 @@ def merge_files(output, files, root_path=lambda x: x):
   f.close()
 
 def main(outputdir=".", produce_debug=True):
-  ID = pagegen.gethgid()
+  ID = pagegen.getgitid()
   
   pagegen.main(outputdir, produce_debug=produce_debug)
 
@@ -139,4 +139,4 @@ def vcheck():
   
 if __name__ == "__main__":
   main()
-  
\ No newline at end of file
+  
index 92086e0f58826c7e19851639a598672354a8d8b5..2d5e8ea3ca4a217513f4b769474938088bd553bf 100644 (file)
@@ -20,7 +20,7 @@ def check_dependencies():
   check_win32()
   i+=check_json()
   i+=check_java()
-  i+=check_hg()
+  i+=check_git()
   
   print "0 errors, %d warnings." % i
   
@@ -57,18 +57,18 @@ def check_java():
     
   return 0
   
-def check_hg():
-  def hg_warn(specific):
-    warn(specific, "mercurial (hg) is not required, but allows qwebirc to save bandwidth by versioning.", "you can get hg at http://www.selenic.com/mercurial/")
+def check_git():
+  def git_warn(specific):
+    warn(specific, "git is not required, but allows qwebirc to save bandwidth by versioning.")
     
   try:
-    p = subprocess.Popen(["hg", "id"], stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=os.name == "nt")
+    p = subprocess.Popen(["git", "rev-parse", "HEAD"], stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=os.name == "nt")
     p.communicate()
     if p.wait() != 0:
-      hg_warn("something went wrong looking for mercurial.")
+      git_warn("something went wrong looking for git.")
       return 1
   except: # ugh
-    hg_warn("couldn't find mercurial.")
+    git_warn("couldn't find git.")
     return 1
     
   return 0
index 6d6782b06f8ec97f0cb8c05b2f44ddf11340411c..9955f74275363946b5067eea127395245fd0c366 100755 (executable)
@@ -9,8 +9,8 @@ def trymkdir(*dir):
 
 def copywalk(src, dest, visitor):
   for root, dirs, files in os.walk(src):
-    if ".hg" in dirs:
-      dirs.remove(".hg")
+    if ".git" in dirs:
+      dirs.remove(".git")
       
     newdir = os.path.join(dest, root)
     if not os.path.exists(newdir):
@@ -100,4 +100,4 @@ def main():
   
 if __name__ == "__main__":
   main()
-  
\ No newline at end of file
+  
index 06c91de24c5b8eae2f3be15922394305c9fbd5b1..f469675772b8f3958aa7426925c3ea111a8ee5fb 100755 (executable)
@@ -1,53 +1,53 @@
 import os, sys, pages, subprocess, re, optionsgen, config
 
-class HGException(Exception):
+class GitException(Exception):
   pass
   
 def jslist(name, debug):
   ui = pages.UIs[name]
   if debug:
     x = [pages.JS_BASE, ui.get("extra", []), pages.DEBUG, ["debug/ui/frontends/%s" % y for y in ui["uifiles"]]]
-    hgid = ""
+    gitid = ""
   else:
     #x = [pages.JS_BASE, ui.get("buildextra", ui.get("extra", [])), pages.BUILD_BASE, name]
     x = [name]
-    hgid = "-" + gethgid()  
+    gitid = "-" + getgitid()  
   
-  return list("js/%s%s.js" % (y, hgid) for y in pages.flatten(x))
+  return list("js/%s%s.js" % (y, gitid) for y in pages.flatten(x))
 
 def csslist(name, debug, gen=False):
   ui = pages.UIs[name]
   nocss = ui.get("nocss")
   if not debug:
-    return ["css/%s-%s.css" % (name, gethgid())]
+    return ["css/%s-%s.css" % (name, getgitid())]
   css = pages.flatten([ui.get("extracss", []), "colours", "dialogs"])
   if not nocss:
     css = list(css) + [name]
   return list("css/%s%s.css" % ("debug/" if gen else "", x) for x in css)
 
-def _gethgid():
+def _getgitid():
   try:
-    p = subprocess.Popen(["hg", "id"], stdout=subprocess.PIPE, shell=os.name == "nt")
+    p = subprocess.Popen(["git", "rev-parse", "HEAD"], stdout=subprocess.PIPE, shell=os.name == "nt")
   except Exception, e:
     if hasattr(e, "errno") and e.errno == 2:
-      raise HGException, "unable to execute"
-    raise HGException, "unknown exception running hg: %s" % repr(e)
+      raise GitException, "unable to execute"
+    raise GitException, "unknown exception running git: %s" % repr(e)
     
   data = p.communicate()[0]
   if p.wait() != 0:
-    raise HGException, "unable to get id"
+    raise GitException, "unable to get id"
   return re.match("^([0-9a-f]+).*", data).group(1)
 
-HGID = None
-def gethgid():
-  global HGID
-  if HGID is None:
+GITID = None
+def getgitid():
+  global GITID
+  if GITID is None:
     try:
-      HGID =  _gethgid()
-    except HGException, e:
-      print >>sys.stderr, "warning: hg: %s (using a random id)." % e
-      HGID = os.urandom(10).encode("hex")
-  return HGID
+      GITID =  _getgitid()
+    except GitException, e:
+      print >>sys.stderr, "warning: git: %s (using a random id)." % e
+      GITID = os.urandom(10).encode("hex")
+  return GITID
     
 def producehtml(name, debug):
   ui = pages.UIs[name]