Skip to content

Instantly share code, notes, and snippets.

View 4-2-stable..master.diff
--- rails-4-2-stable_initialzer.txt 2015-03-23 18:02:56.000000000 +0900
+++ rails-master_initializer.txt 2015-03-23 18:03:30.000000000 +0900
@@ -9,10 +9,11 @@
-- action_mailer.logger before: after:
-- action_mailer.set_configs before: after:action_mailer.logger
-- action_view.caching before: after:action_view.set_configs
+ -- action_view.collection_caching before: after:action_view.caching
-- action_view.embed_authenticity_token_in_remote_forms before: after:
-- action_view.logger before: after:action_view.embed_authenticity_token_in_remote_forms
-- action_view.set_configs before: after:action_view.logger
@troter
troter / README.rst
Last active Aug 29, 2015
hg diffとgit diffの出力の違い
View README.rst

hg diffとgit diffの出力の違い

hg diff:

% hg diff
diff --git a/p.c b/p.c
--- a/p.c
+++ b/p.c
@@ -1,26 +1,25 @@
 #include <stdio.h>
@troter
troter / gist:11364851
Created Apr 28, 2014
diff-highlight、diffの内容が「新規ファイル追加、変更」の順の場合、新規ファイル追加の内容の出力位置がずれる。
View gist:11364851
% cat hoge.txt
--- /dev/null
+++ b/new.txt
@@ -0,0 +1,1 @@
+aaa
diff --git a/exist.txt b/exist.txt
index 1d95c52..8bffa50 100644
@@ -0,0 +1,1 @@
-bbbb
+aaaa
@troter
troter / gist:9927116
Created Apr 2, 2014
いろいろ手直しした結果、'hg locate + grep'より'hg grepfile'の方が早くなったっぽい。 https://bitbucket.org/troter/hg-grepfile
View gist:9927116
# OS X 10.9.2
# CPU 2.3 GHz Intel Core i7
# MEM 16GB 1600 MHz DDR3
% hg clone http://selenic.com/hg
% cd hg
# hg locate + grep
% for i in $(seq 3); do time (hg locate | xargs grep -n -i ctx.walk > /dev/null) ; done
( hg locate | xargs grep -n -i ctx.walk > /dev/null; ) 0.73s user 0.06s system 97% cpu 0.807 total
@troter
troter / mercurial_i18n_doc_generate.patch
Last active Dec 17, 2015
[WIP]mercurail i18n doc generate patch: make clean all LC_ALL=ja_JP.UTF-8 LANGUAGE=ja
View mercurial_i18n_doc_generate.patch
# HG changeset patch
# User Takumi IINO <trot.thunder@gmail.com>
# Date 1367677871 -32400
# Sat May 04 23:31:11 2013 +0900
# Branch stable
# Node ID 460c0546e96ba7dd670876ff76757286dd67219c
# Parent a6542a670ece8e13ae7b32ef28e2816d63120524
doc: move to i18n translation source directory
diff --git a/.hgignore b/.hgignore
@troter
troter / serve.py
Created Mar 1, 2013
run reviewboard with tornado (without apache)
View serve.py
#!/bin/env python
execfile('./htdocs/reviewboard.wsgi')
from tornado.options import options, define, parse_command_line
import tornado.httpserver
import tornado.ioloop
import tornado.web
import tornado.wsgi
define('port', type=int, default=8080)
View gist:4106047
#!python
** Mercurial version (2.4+6-35ba170c0f82). TortoiseHg version (2.6)
** Command:
** CWD: C:\ProgramData\Microsoft\Windows\Start Menu\Programs\TortoiseHg
** Encoding: cp932
** Extensions loaded: hgsubversion, graphlog, rebase, transplant, eol, extdiff, mq, hgbb
** Python version: 2.7.3 (default, Apr 10 2012, 23:24:47) [MSC v.1500 64 bit (AMD64)]
** Windows version: sys.getwindowsversion(major=6, minor=1, build=7601, platform=2, service_pack='Service Pack 1')
** Processor architecture: x64
** Qt-4.8.0 PyQt-4.9.1
@troter
troter / conf.py
Created Jul 16, 2012
Sphinx extension for raw files, like a CNAME.
View conf.py
sys.path += ['.']
extensions += ['sphinxcontrib_rawfiles']
# Files you want to copy
rawfiles = ['CNAME']
@troter
troter / gist:2226607
Created Mar 28, 2012
$ PATH="`pwd`/../hg-python26:`pwd`/..:$PATH" ./run-tests.py -l test-lfconvert.t
View gist:2226607
$ PATH="`pwd`/../hg-python26:`pwd`/..:$PATH" ./run-tests.py -l test-lfconvert.t # 16295 (ba42eb722bb3) default
--- c:\MinGW\msys\1.0\home\takumi\hg-2.1\tests\test-lfconvert.t
+++ c:\MinGW\msys\1.0\home\takumi\hg-2.1\tests\test-lfconvert.t.err
@@ -51,8 +51,6 @@
skipping incorrectly formatted tag IncorrectlyFormattedTag!
skipping incorrectly formatted id invalidhash
no mapping for id 0123456789abcdef
- abort: renamed/copied largefile large3 becomes symlink
- [255]
@troter
troter / 16279
Created Mar 27, 2012
$ PATH="`pwd`/../hg-python26:`pwd`/..:$PATH" ./run-tests.py -l test-casefolding.t
View 16279
$ PATH="`pwd`/../hg-python26:`pwd`/..:$PATH" ./run-tests.py -l test-casefolding.t # 16279 (531e69ff348f)
--- c:\MinGW\msys\1.0\home\takumi\hg-2.1\tests\test-casefolding.t
+++ c:\MinGW\msys\1.0\home\takumi\hg-2.1\tests\test-casefolding.t.err
@@ -66,10 +66,17 @@
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
$ echo gold > a
$ hg up
- a: untracked file differs
- abort: untracked files in working directory differ from files in requested revision
You can’t perform that action at this time.