- SCMBC #2 Mercurial 入門セッション資料(のたたき台)です。
- TODO たとえ話募集中
(おまけ)分散バージョン管理全般の利点
create table member ( | |
id INT NOT NULL AUTO_INCREMENT COMMENT 'ID', | |
name VARCHAR(100) DEFAULT '' NOT NULL COMMENT '氏名', | |
created_date DATETIME NOT NULL COMMENT '作成日時', | |
updated_date DATETIME NOT NULL COMMENT '更新日時', | |
deleted_date DATETIME COMMENT '削除日時', | |
version INT DEFAULT 0 NOT NULL COMMENT 'オプティミスティックロック用', | |
CONSTRAINT member_pk PRIMARY KEY(id) | |
) COMMENT = 'メンバー' DEFAULT CHARSET=UTF8; |
digraph { | |
"flaskr.__init__.py" -> "flasker.util.db" | |
"flaskr.__init__.py" -> "flasker.controller.general" | |
"flaskr.__init__.py" -> "flasker.controller.user" | |
"flaskr.__init__.py" -> "flasker.controller.entry" | |
"flaskr.__init__.py" -> "flasker.controller.comment" | |
"flasker.controller.comment" -> "flaskr.model.entry" | |
"flasker.controller.comment" -> "flaskr.model.comment" | |
"flasker.controller.comment" -> "flaskr.controller.form" |
% python [31909] | |
Python 2.6.5 (r265:79063, Jun 12 2010, 17:07:01) | |
[GCC 4.3.4 20090804 (release) 1] on cygwin | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> def g(): | |
... try: | |
... yield 1 | |
... finally: | |
... print "finished" | |
... |
[gyazowin+] | |
upload_server=timedia.memocurial.com | |
upload_path=/gyazo?prefix=http:%2F%2Ftimedia.memocurial.com |
import os | |
from mercurial import hg, ui | |
path = "/home/takumi/" | |
repo = hg.repository(ui.ui(), path) | |
ctx = repo['tip'] | |
#print ctx.filectx('.zshenv').data() | |
mf = ctx.manifest() |
#!/bin/bash | |
# force-one-head | |
# add the following to <repository>/.hg/hgrc : | |
# [hooks] | |
# pretxnchangegroup.forceonehead = /path/to/force-one-head | |
if [ $(hg heads --template "{branch}\n"|sort|uniq|wc -l) != $(hg heads --template "{branch}\n"|sort|wc -l) ]; then | |
echo "There are multiple heads." | |
echo "Please 'hg pull' and get your repository up to date first." | |
echo "Also, don't 'hg push --force' because that won't work either." |
# hgrc | |
[extensions] | |
mq = | |
hgshelve = $HOME/.mercurial/extensions/hgshelve/hgshelve.py | |
[alias] | |
# fix latest commit message (hg 1.8.x only) | |
fix = ! \ | |
$HG shelve --all -n 'tmp.hg-fix' && \ |
import java.lang.reflect.InvocationTargetException; | |
public interface InterfaceName { | |
String getValue(); | |
int getLength(); | |
/** | |
* InterfaceName で定義しておいて欲しいクラスメソッドを定義 |
#!/bin/bash | |
[ -d .git ] && git pull | |
[ -d .hg ] && hg pull -u | |
[ -d .svn ] && svn update | |
[ -d .bzr ] && bzr update |