Skip to content

Instantly share code, notes, and snippets.

View yuja's full-sized avatar

Yuya Nishihara yuja

  • Japan
View GitHub Profile
@yuja
yuja / main.rs
Created December 14, 2023 03:43
//! https://github.com/martinvonz/jj/issues/2697
use std::path::Path;
use std::process::Command;
use gix::refs::transaction::{Change, PreviousValue, RefEdit};
use gix::ObjectId;
fn main() {
let repo_path = Path::new("test-repo");
@yuja
yuja / gist:5405044
Created April 17, 2013 15:04
use ItemDelegate for graph rendering
# HG changeset patch
# Parent cbd303484003454f8ab1eb04f01f2ede6092cb7d
diff --git a/tortoisehg/hgqt/repomodel.py b/tortoisehg/hgqt/repomodel.py
--- a/tortoisehg/hgqt/repomodel.py
+++ b/tortoisehg/hgqt/repomodel.py
@@ -500,7 +500,7 @@ class HgRepoListModel(QAbstractTableMode
def _roleoffsets(self):
return {Qt.DisplayRole : 0,
Qt.ForegroundRole : len(self._columns),
@yuja
yuja / gist:4119158
Created November 20, 2012 16:45
MSYS rsync without full installation (TODO)
# it worked on wine, but not on windows
./etc
./bin
./bin/msys-intl-8.dll
./bin/strace.log
./bin/.gdb_history
./bin/msys-popt-0.dll
./bin/msys-1.0.dll
./bin/msys-iconv-2.dll
./bin/rsync.exe
@yuja
yuja / run-hgweb.py
Created November 18, 2012 11:11
Run hgwebdir with LDAP authentication
#!/usr/bin/env python
"""Run hgwebdir with LDAP authentication
Configuration::
[web]
# REQUIRED:
authldapuri = ldap://example.org/
authldapbasedn = ou=People,dc=example,dc=org
# OPTIONAL:
@yuja
yuja / config.ru
Created October 13, 2012 17:34
Run Kagemai 0.8.8 as a Rack application
# -*- mode: ruby -*-
=begin
config.ru - Run KAGEMAI 0.8.8 as a Rack application (under Ruby 1.8.7)
Initialization codes are borrowed from html/guest.cgi, which is
copyright (c) 2002-2008 FUKUOKA Tomoyuki, DAIFUKUYA.
=end
$KCODE = 'e'
$SAFE = 1
@yuja
yuja / run-hgweb.py
Created October 13, 2012 08:31
run HgWeb under WSGI for debugging
#!/usr/bin/env python
from werkzeug import serving
#from mercurial import demandimport; demandimport.enable()
from mercurial import hgweb
app = hgweb.hgwebdir('hgweb.config')
serving.run_simple('localhost', 8000, app,
use_debugger=True, use_reloader=True)
#!/bin/sh -e
HGROOT="$HOME/work/hghacks/mercurial"
HG="$HGROOT/hg"
LANG=C
TESTTMP="/tmp/subrepo+mq.d"
make -C "$HGROOT" local > /dev/null
"$HG" --version -q