{"id":613,"date":"2009-03-21T23:48:40","date_gmt":"2009-03-21T14:48:40","guid":{"rendered":"http:\/\/www.ic-tact.co.jp\/?p=613"},"modified":"2009-03-22T17:00:48","modified_gmt":"2009-03-22T08:00:48","slug":"mercurial-%e3%81%a7%e5%a4%a7%e3%81%84%e3%81%ab%e3%83%8f%e3%83%9e%e3%82%8b","status":"publish","type":"post","link":"http:\/\/www.ic-tact.co.jp\/?p=613","title":{"rendered":"Mercurial \u3067\u5927\u3044\u306b\u30cf\u30de\u308b"},"content":{"rendered":"<p>\u793e\u5185 Django \u52c9\u5f37\u4f1a\u3067 hdknr \u3055\u3093\u3068\u6295\u7968\u30b7\u30b9\u30c6\u30e0\u3092\u4f5c\u308a\u306a\u304c\u3089\u52c9\u5f37\u3057\u3066\u3044\u307e\u3059\u3002Mercurial \u3068\u3044\u3046\u30d0\u30fc\u30b8\u30e7\u30f3\u7ba1\u7406\u30b7\u30b9\u30c6\u30e0\u3067\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u7ba1\u7406\u3057\u3066\u3044\u308b\u306e\u3067\u3059\u304c\u3001\u30b3\u30df\u30c3\u30c8\u3059\u308b\u969b\u306b\u6df7\u4e71\u3057\u305f\u8a71\u3092\u8a18\u3057\u307e\u3059\u3002<\/p>\n<p>Mercurial \u306f\u5206\u6563\u7ba1\u7406\u306a\u306e\u3067\u30ea\u30dd\u30b8\u30c8\u30ea\u306f\u516c\u958b\u30ea\u30dd\u30b8\u30c8\u30ea\u3068\u30ed\u30fc\u30ab\u30eb\u30ea\u30dd\u30b8\u30c8\u30ea\u304c\u3042\u308a\u307e\u3059\u3002\u79c1\u306e commit \u3092\u516c\u958b\u30ea\u30dd\u30b8\u30c8\u30ea\u306b push \u3057\u3088\u3046\u3068\u3057\u305f\u3089<\/p>\n<blockquote><p>\nssk@debonvm01 tohyo $ hg push<br \/>\nEnter passphrase for key &#8216;\/home\/ssk\/.ssh\/id_rsa&#8217;:<br \/>\npushing to ssh:\/\/hg@bitbucket.org\/hdknr\/tohyo\/<br \/>\nsearching for changes<br \/>\nabort: push creates new remote heads!<br \/>\n(did you forget to merge? use push -f to force)\n<\/p><\/blockquote>\n<p>\u3068\u8a00\u308f\u308c\u307e\u3057\u305f\u3002merge \u304b\u5f37\u5236\u7684\u306b push \u3057\u308d\u3068\u306e\u3053\u3068\u3067\u3059\u3002hdknr \u3055\u3093\u306e\u30ea\u30d3\u30b8\u30e7\u30f3\u6301\u3063\u3066\u306a\u3044\u304b\u3089\u3060\u306a\u3001\u3068\u601d\u3063\u305f\u306e\u3067 pull \u3057\u3066 update \u3059\u308c\u3070\u3044\u3044\u3093\u3060\u306a\u3001\u3068\u601d\u3063\u305f\u306e\u3067\u5b9f\u884c\u3002<\/p>\n<blockquote><p>\nssk@debonvm01 tohyo $ hg pull<br \/>\nEnter passphrase for key &#8216;\/home\/ssk\/.ssh\/id_rsa&#8217;:<br \/>\npulling from ssh:\/\/hg@bitbucket.org\/hdknr\/tohyo\/<br \/>\nsearching for changes<br \/>\nadding changesets<br \/>\nadding manifests<br \/>\nadding file changes<br \/>\nadded 1 changesets with 3 changes to 4 files (+1 heads)<br \/>\n(run &#8216;hg heads&#8217; to see heads, &#8216;hg merge&#8217; to merge)<br \/>\nssk@debonvm01 tohyo $ hg update<br \/>\nabort: crosses branches (use &#8216;hg merge&#8217; or &#8216;hg update -C&#8217;)\n<\/p><\/blockquote>\n<p>\u3042\u3042\u3001merge \u3059\u308b\u304b -C \u3064\u3051\u3066 update \u3057\u306a\u3055\u3044\u3001\u3068\u306e\u3053\u3068\u3002\u3067\u306f merge \u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<blockquote><p>\nssk@debonvm01 tohyo $ hg merge<br \/>\nabort: repo has 3 heads &#8211; please merge with an explicit rev\n<\/p><\/blockquote>\n<p>\u3093\u3093\uff1f\u3000\u898b\u305f\u3053\u3068\u7121\u3044\u30e1\u30c3\u30bb\u30fc\u30b8\u3067\u3057\u305f\u3002 head \u304c3\u3064\u3042\u308a\u307e\u3059\u3002 merge \u3059\u308b\u969b\u306f\u660e\u793a\u7684\u306b\u30ea\u30d3\u30b8\u30e7\u30f3\u3092\u6307\u5b9a\u3057\u306a\u3055\u3044\u3001\u3068\u306e\u3053\u3068\u3002\u307e\u305a\u306f head \u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n<blockquote><p>\nssk@debonvm01 tohyo $ hg heads<br \/>\nchangeset:   32:aba5296ed68f<br \/>\ntag:         tip<br \/>\nuser:        naoto<br \/>\ndate:        Sat Mar 21 16:57:22 2009 +0900<br \/>\nsummary:     added Tag table in microblog\/models.py. added Tags editor in admin site.  #29<\/p>\n<p>changeset:   30:6603fe6fa57b<br \/>\nuser:        naoto<br \/>\ndate:        Sat Mar 21 16:50:32 2009 +0900<br \/>\nsummary:     added tags editor in admin. related #29 .<\/p>\n<p>changeset:   15:394bfbc17e5c<br \/>\nuser:        ssk<br \/>\ndate:        Tue Mar 10 03:02:58 2009 +0900<br \/>\nsummary:     added username line in .hgrc\n<\/p><\/blockquote>\n<p>\u78ba\u304b\u306b3\u3064\u3042\u308a\u307e\u3059\u3002\u6700\u65b0\u306e\u30ea\u30d3\u30b8\u30e7\u30f3 32 \u306b\u3057\u305f\u3044\u306e\u3067\u660e\u793a\u7684\u306b merge \u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n<blockquote><p>\nssk@debonvm01 tohyo $ hg merge -r 32<br \/>\nabort: can&#8217;t merge with ancestor\n<\/p><\/blockquote>\n<p>\u5931\u6557\u3057\u307e\u3059\u3002\u4eca\u5ea6\u306f\u30ea\u30d3\u30b8\u30e7\u30f3\u3092 30 \u306b\u3057\u307e\u3059\u3002<\/p>\n<blockquote><p>\nssk@debonvm01 tohyo $ hg merge -r 30<br \/>\nmerging trunk\/tohyo\/microblog\/admin.py<br \/>\nmerge: warning: conflicts during merge<br \/>\nmerging trunk\/tohyo\/microblog\/admin.py failed!<br \/>\n0 files updated, 0 files merged, 0 files removed, 1 files unresolved<br \/>\nThere are unresolved merges, you can redo the full merge using:<br \/>\n  hg update -C 32<br \/>\n  hg merge 30\n<\/p><\/blockquote>\n<p>\u307e\u305f\u3082\u3084\u30a8\u30e9\u30fc\u3002\u4eca\u5ea6\u306f\u3053\u306e\u30b3\u30de\u30f3\u30c9\u6253\u3061\u306a\u3055\u3044\u3068\u8a00\u308f\u308c\u305f\u306e\u3067\u3084\u3063\u3066\u307f\u307e\u3059\u3002<\/p>\n<blockquote><p>\nssk@debonvm01 tohyo $ hg merge 30<br \/>\nabort: outstanding uncommitted merges\n<\/p><\/blockquote>\n<p>\u307e\u305f\u3082\u3084\u5931\u6557\u3002\u3069\u3046\u3059\u308c\u3070\u2026\u2026\u3002<br \/>\n\u3044\u3063\u305f\u3093 head \u3092\u78ba\u8a8d\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n<blockquote><p>\nssk@debonvm01 tohyo $ hg heads<br \/>\nchangeset:   31:74a91ce0a085<br \/>\ntag:         tip<br \/>\nparent:      28:cfe09cdb9e4a<br \/>\nuser:        hdknr<br \/>\ndate:        Sat Mar 21 16:09:32 2009 +0900<br \/>\nsummary:     re-created database and syncdb after addring Tag model which ManyToMany to Note<\/p>\n<p>changeset:   30:6603fe6fa57b<br \/>\nuser:        naoto<br \/>\ndate:        Sat Mar 21 16:50:32 2009 +0900<br \/>\nsummary:     added tags editor in admin. related #29 .<\/p>\n<p>changeset:   15:394bfbc17e5c<br \/>\nuser:        ssk<br \/>\ndate:        Tue Mar 10 03:02:58 2009 +0900<br \/>\nsummary:     added username line in .hgrc\n<\/p><\/blockquote>\n<p>\u30ea\u30d3\u30b8\u30e7\u30f3 32 \u304c\u6d88\u3048\u3066\u3044\u307e\u3059\u3002\u72b6\u6cc1\u306b\u5909\u5316\u304c\u3042\u308a\u307e\u3057\u305f\u304c\u5f8c\u9000\u3057\u3066\u3044\u308b\u6c17\u304c\u3057\u307e\u3059\u3002<br \/>\npull \u3057\u3066\u30ea\u30d3\u30b8\u30e7\u30f332\u3092\u6539\u3081\u3066\u6301\u3063\u3066\u304d\u307e\u3059\u3002<\/p>\n<blockquote><p>\nssk@debonvm01 tohyo $ hg pull<br \/>\nEnter passphrase for key &#8216;\/home\/ssk\/.ssh\/id_rsa&#8217;:<br \/>\npulling from ssh:\/\/hg@bitbucket.org\/hdknr\/tohyo\/<br \/>\nsearching for changes<br \/>\nno changes found\n<\/p><\/blockquote>\n<p>32 \u304c\u843d\u3061\u3066\u304d\u307e\u305b\u3093\u3002\u3053\u308c\u3067\u306a\u3093\u3060\u304b\u5206\u304b\u3089\u306a\u304f\u306a\u308a\u307e\u3057\u305f\u3002<br \/>\n\u3053\u3053\u3067\u4e00\u6c17\u306b\u3054\u3061\u3083\u3054\u3061\u3083\u6253\u3061\u8fbc\u3093\u3067\u307f\u308b\u3053\u3068\u306b\u3057\u307e\u3057\u305f\u3002<\/p>\n<blockquote><p>\nssk@debonvm01 tohyo $ hg merge<br \/>\nabort: repo has 3 heads &#8211; please merge with an explicit rev<br \/>\nssk@debonvm01 tohyo $ hg merge 30<br \/>\nabort: outstanding uncommitted changes<br \/>\nssk@debonvm01 tohyo $ hg merge 31<br \/>\nabort: can&#8217;t merge with ancestor<br \/>\nssk@debonvm01 tohyo $ hg merge -r 31<br \/>\nabort: can&#8217;t merge with ancestor<br \/>\nssk@debonvm01 tohyo $ hg update -C 31<br \/>\n2 files updated, 0 files merged, 0 files removed, 0 files unresolved\n<\/p><\/blockquote>\n<p>\u30ea\u30d3\u30b8\u30e7\u30f3 31 \u306f\u6210\u529f\u3057\u305f\u6a21\u69d8\u300231 \u306f\u81ea\u5206\u306e\u30b3\u30df\u30c3\u30c8\u5206\u306a\u306e\u3067\u30ed\u30fc\u30ab\u30eb\u30ea\u30dd\u30b8\u30c8\u30ea\u304b\u3089\u6301\u3063\u3066\u304d\u305f\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002<br \/>\nmercurial \u306e\u672c\u3092\u898b\u3066\u3044\u305f\u3089 resolve \u30b3\u30de\u30f3\u30c9\u3067\u8907\u6570 head \u3092\u72b6\u614b\u3092\u89e3\u6d88\u3067\u304d\u308b\u3088\u3046\u306a\u3053\u3068\u304c\u66f8\u3044\u3066\u3042\u3063\u305f\u306e\u3067\u8a66\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n<blockquote><p>\nssk@debonvm01 tohyo $ hg resolve -l<br \/>\nhg: unknown command &#8216;resolve&#8217;<br \/>\nMercurial Distributed SCM<\/p>\n<p>basic commands:<\/p>\n<p> add        add the specified files on the next commit<br \/>\n annotate   show changeset information per file line<br \/>\n clone      make a copy of an existing repository<br \/>\n commit     commit the specified files or all outstanding changes<br \/>\n diff       diff repository (or selected files)<br \/>\n export     dump the header and diffs for one or more changesets<br \/>\n imerge     interactive merge<br \/>\n init       create a new repository in the given directory<br \/>\n inserve    start an inotify server for this repository<br \/>\n log        show revision history of entire repository or files<br \/>\n merge      merge working directory with another revision<br \/>\n parents    show the parents of the working dir or revision<br \/>\n pull       pull changes from the specified source<br \/>\n push       push changes to the specified destination<br \/>\n qdiff      diff of the current patch and subsequent modifications<br \/>\n qimport    import a patch<br \/>\n qinit      init a new queue repository<br \/>\n qpop       pop the current patch off the stack<br \/>\n qpush      push the next patch onto the stack<br \/>\n qrefresh   update the current patch<br \/>\n remove     remove the specified files on the next commit<br \/>\n serve      export the repository via HTTP<br \/>\n status     show changed files in the working directory<br \/>\n strip      strip a revision and all later revs on the same branch<br \/>\n update     update working directory<\/p>\n<p>use &#8220;hg help&#8221; for the full list of commands or &#8220;hg -v&#8221; for details\n<\/p><\/blockquote>\n<p>resolve \u30b3\u30de\u30f3\u30c9\u306a\u3093\u3066\u306a\u3044\u3001\u3068\u8a00\u308f\u308c\u307e\u3057\u305f\u3002\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u78ba\u8a8d\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n<blockquote><p>\nssk@debonvm01 tohyo $ dpkg -l |grep mercurial<br \/>\nii  mercurial                         1.0.1-5.1             Scalable distributed version control system<br \/>\nii  mercurial-common                  1.0.1-5.1             Scalable distributed version control system (Common files)\n<\/p><\/blockquote>\n<p>Debian Lenny \u306e mercurial \u306f 1.0.1 \u306a\u306e\u3067\u3057\u305f\u3002resolove \u306f 1.1 \u304b\u3089\u306e\u6a5f\u80fd\u3067\u3059\u3002\u3053\u308c\u3067\u843d\u80c6\u3057\u307e\u3059\u3002<\/p>\n<p>\u305d\u306e\u5f8c \u3053\u308c\u307e\u3067\u6253\u3061\u8fbc\u3093\u3060\u30b3\u30de\u30f3\u30c9\u3092\u9014\u65b9\u306b\u304f\u308c\u306a\u304c\u3089\u7e70\u308a\u8fd4\u3057\u307e\u3057\u305f\u304c\u5909\u5316\u306a\u3057(pull,merge,head)\u3002<br \/>\npush \u3057\u305f\u3044\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092 ls \u3057\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<blockquote><p>\nssk@debonvm01 tohyo $ ls microblog\/<br \/>\n__init__.py   admin.py.orig  backends.pyc  mails.py   models.pyc  views.py<br \/>\n__init__.pyc  admin.pyc      forms.py      mails.pyc  urls.py     views.pyc<br \/>\nadmin.py      backends.py    forms.pyc     models.py  urls.pyc\n<\/p><\/blockquote>\n<p>admin.py.orig \u3068\u3044\u3046 .orig \u306e\u3064\u3044\u305f\u30d5\u30a1\u30a4\u30eb\u304c\u3042\u308a\u307e\u3059\u3002merge \u3059\u308b\u969b\u306e\u30d5\u30a1\u30a4\u30eb\u3067\u3059\u306d\u3002\u3053\u308c\u304c\u3042\u308b\u304b\u3089\u304b\u306a\u3001\u3068\u601d\u3044\u624b\u52d5\u3067\u30b3\u30d4\u30fc\u3057\u307e\u3059\u3002\u3064\u3044\u3067\u306b merge\u3002<\/p>\n<blockquote><p>\nssk@debonvm01 tohyo $ mv microblog\/admin.py.orig microblog\/admin.py<br \/>\nssk@debonvm01 tohyo $ hg merge<br \/>\nabort: repo has 3 heads &#8211; please merge with an explicit rev<br \/>\nssk@debonvm01 tohyo $ hg merge -r 31<br \/>\nabort: outstanding uncommitted merges\n<\/p><\/blockquote>\n<p>\u3084\u3063\u3071\u308a\u5909\u5316\u306a\u3044\u3067\u3059\u306d\u3002\u6700\u521d\u306e\u9803\u304b\u3089 push \u3057\u3066\u306a\u3044\u304b\u3089 commit \u3057\u3066 push \u3057\u3066\u307f\u3088\u3046\u304b\u306a\u3001\u3068\u30a8\u30e9\u30fc\u899a\u609f\u3067\u3084\u3063\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<blockquote><p>\nssk@debonvm01 tohyo $ hg ci -m &#8220;added Tag table in microblog\/models.py. added editor for Tag in microblog\/admin.py. #29&#8221;<br \/>\nssk@debonvm01 tohyo $ hg push<br \/>\nEnter passphrase for key &#8216;\/home\/ssk\/.ssh\/id_rsa&#8217;:<br \/>\npushing to ssh:\/\/hg@bitbucket.org\/hdknr\/tohyo\/<br \/>\nsearching for changes<br \/>\nremote: adding changesets<br \/>\nremote: adding manifests<br \/>\nremote: adding file changes<br \/>\nremote: added 3 changesets with 4 changes to 2 files<br \/>\nremote: bb\/acl: naoto is allowed. accepted payload.<br \/>\nremote: quota: 595.4 KB in use, 150.0 MB available (0.39% used)\n<\/p><\/blockquote>\n<p>\u3042\u308c\u3001\u3067\u304d\u305f\u3002head \u3082\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n<blockquote><p>\nssk@debonvm01 tohyo $ hg heads<br \/>\nchangeset:   32:011ae90a4b6d<br \/>\ntag:         tip<br \/>\nparent:      31:74a91ce0a085<br \/>\nparent:      15:394bfbc17e5c<br \/>\nuser:        naoto<br \/>\ndate:        Sat Mar 21 17:31:01 2009 +0900<br \/>\nsummary:     added Tag table in microblog\/models.py. added editor for Tag in microblog\/admin.py. #29<\/p>\n<p>changeset:   30:6603fe6fa57b<br \/>\nuser:        naoto<br \/>\ndate:        Sat Mar 21 16:50:32 2009 +0900<br \/>\nsummary:     added tags editor in admin. related #29 .\n<\/p><\/blockquote>\n<p>head \u30822\u3064\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<br \/>\n\u7d50\u5c40\u4f55\u304c push \u3067\u304d\u306a\u304b\u3063\u305f\u539f\u56e0\u304b\u306f\u5206\u304b\u3089\u305a\u3002\u305f\u3060\u3001\u3053\u308c\u307e\u3067 pull \u3057\u305f\u3042\u3068\u306f merge \u3057\u306a\u3044\u3067 update \u3070\u304b\u308a\u3057\u3066\u3044\u305f\u306e\u3067\u8907\u6570 head \u306b\u306a\u3063\u3066\u3057\u307e\u3063\u305f\u6c17\u304c\u3057\u307e\u3059\u3002pull \u3057\u305f\u3089 merge \u3059\u308b\u7656\u3092\u3064\u3051\u308c\u3070\u3053\u3093\u306a\u3053\u3068\u306b\u306f\u306a\u3089\u306a\u304b\u3063\u305f\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002<\/p>\n<p>pull \u3057\u305f\u3089 merge \u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u793e\u5185 Django \u52c9\u5f37\u4f1a\u3067 hdknr \u3055\u3093\u3068\u6295\u7968\u30b7\u30b9\u30c6\u30e0\u3092\u4f5c\u308a\u306a\u304c\u3089\u52c9\u5f37\u3057\u3066\u3044\u307e\u3059\u3002Mercurial \u3068\u3044\u3046\u30d0\u30fc\u30b8\u30e7\u30f3\u7ba1\u7406\u30b7\u30b9\u30c6\u30e0\u3067\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u7ba1\u7406\u3057\u3066\u3044\u308b\u306e\u3067\u3059\u304c\u3001\u30b3\u30df\u30c3\u30c8\u3059\u308b\u969b\u306b\u6df7\u4e71\u3057\u305f\u8a71\u3092\u8a18\u3057\u307e\u3059\u3002 Merc [&hellip;]<\/p>\n","protected":false},"author":13,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"http:\/\/www.ic-tact.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/613"}],"collection":[{"href":"http:\/\/www.ic-tact.co.jp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.ic-tact.co.jp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.ic-tact.co.jp\/index.php?rest_route=\/wp\/v2\/users\/13"}],"replies":[{"embeddable":true,"href":"http:\/\/www.ic-tact.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=613"}],"version-history":[{"count":2,"href":"http:\/\/www.ic-tact.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/613\/revisions"}],"predecessor-version":[{"id":615,"href":"http:\/\/www.ic-tact.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/613\/revisions\/615"}],"wp:attachment":[{"href":"http:\/\/www.ic-tact.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=613"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.ic-tact.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=613"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.ic-tact.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=613"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}