Created attachment 323864 [details] [diff] [review] hghooks patch I've rewritten the hg pushlog hook to use a sqlite database for storage, and written a converter script from the old flat file format. I haven't tested this on a CentOS system, only on my Mac, so I'm a little worried about the right sqlite package being available, but I can probably work around that if need be. Pushlog feed changes to follow in a separate bug.
Attachment #323864 - Flags: review?(benjamin)
Comment on attachment 323864 [details] [diff] [review] hghooks patch >+def log(ui, repo, node, **kwargs): >+ pushdb = os.path.join(repo.path, 'pushlog.db') >+ createdb = False >+ if not os.path.exists(pushdb): >+ createdb = True >+ conn = sqlite.connect(pushdb) >+ if createdb: >+ createpushdb(conn) >+ d = datetime.utcnow().replace(microsecond=0) >+ conn.execute("INSERT INTO pushlog (node, user, date) values(?,?,?)", >+ (node, os.environ['USER'], d.isoformat()+"Z")) >+ conn.commit() The python hooks documentation says that hooks should "return False" to indicate success. Other than that, this looks good!
Attachment #323864 - Flags: review?(benjamin) → review+
Comment on attachment 323864 [details] [diff] [review] hghooks patch The RFEs I had should probably work fine on this, too.
Pushed to bsmedberg's hghooks repo. Will file a followup on getting this installed, once I get the web bits done.
Status: NEW → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → FIXED
Product: mozilla.org → Release Engineering
You need to log in before you can comment on or make changes to this bug.