5035
Comment:
|
5918
None
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
Available tips: [[TableOfContents]] === Make a clean copy of a source tree, like CVS export === {{{ hg clone source export rm -rf export/.hg }}} === The same thing, but for a tagged release === {{{ hg clone --noupdate source export-tagged cd export-tagged hg update mytag rm -rf .hg }}} === See diffs when editing commit message with VIM === Make a private copy of the 'hgeditor' script provided with mercurial and replace the call to the editor with following command: {{{ vim "+e $HGTMP/diff" '+set buftype=help filetype=diff' "+vsplit $HGTMP/msg" || exit $? }}} This will start up VIM in vertical split mode with commit message in the left pane and diff in the right pane. The {{{buftype=help}}} setting for diff window tells vim to exit when all other windows are closed, so when you write and quit the log with {{{:x}}} ({{{:wq}}} - they are equivalent), vim exits. If you have syntax highlight set up, the diff will be properly highlighted. This setting is suitable for wide terminals. If you have a narrow terminal, you may want to replace the {{{+vsplit}}} above with {{{+split}}} or add {{{nowrap}}} to the {{{+set}}}. === See diffstat of pulled changes === Place the following script (named "pull-diffstat" here) somewhere in your $PATH: {{{ #!/bin/sh test -n "$NODE" || exit 0 PARENT=`hg parents $NODE | head -1 | awk -F':' '{print $3}'` TIP=`hg tip | head -1 | awk -F':' '{print $3}'` echo "diffstat for $PARENT to $TIP" hg diff -r $PARENT -r tip | diffstat }}} Add a changegroup entry to the [hooks] section of hgrc: {{{ [hooks] changegroup = pull-diffstat }}} Now you will see a diffstat of the new changes to your repo every time you do "hg pull". === One liner to remove unknown files with a pattern === To make these work, replace the {{{ls -l}}} with the command you wish to execute (ie. {{{rm}}}). You can also tweak the parameters passed to {{{hg status}}} to filter by something other than unknown files (see {{{hg help status}}}). {{{ hg status -nu0 | grep -z pattern | xargs -0r ls -l }}} The above command requires a current version of GNU grep. If you don't have one, you can use the following: {{{ hg status -nu | grep pattern | tr '\n' '\0' | xargs -0r ls -l }}} === Keyword expansion according to file revision === This is an example on how you can achieve filewise keyword expansion (similar to CVS) with [decode] and [encode] filters, and the pretxncommit-hook. This comes in handy when you want to keep track of different file revisions in the same repository. For demonstration we use just one keyword: "Hg". As [decode] and [encode] work only on a stream you'll have to include the filename ''manually'' once. Accepted formats are: * {{{$Hg$}}} (without filename "expansion") * {{{$Hg: <filename>,v$}}} You also have the choice between two date output formats: * Generic Mercurial output * YYYY/mm/dd (called 'slashday' here) With the scripts called "hgfilter.sh" and "hgpretxncommit.sh" put in your $PATH a simple setup could have the following entries in hgrc: {{{ [decode] *.txt = hgfilter.sh decode *.py = hgfilter.sh decode slashday [encode] *.txt = hgfilter.sh *.py = hgfilter.sh [hooks] pretxncommit = hgpretxncommit.sh }}} Here's the filter script "hgfilter.sh": {{{ #!/bin/sh set -e decode= slashday= for i; do case "$i" in decode) decode=true; shift ;; slashday) slashday=true; shift ;; esac done if [ "$decode" ]; then if (($# == 0)); then tip=`hg tip` cset=`echo "$tip" | awk -F ':' '/^changeset: +/ { print $3 }'` else tip="$@" cset="${HG_NODE:0:12}" fi if [ "$slashday" ]; then hgdate=`echo "$tip" | awk '/^date: +/ { printf "%d/%s/%0.2d %s %s", $6, $3, $4, $5, $7 }'` m=0 for M in Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec do let $((++m)) hgdate=${hgdate/$M/`printf %0.2d $m`} done else hgdate=`echo "$tip" | awk -F ': +' '/^date: +/ { print $2 }'` fi sed -e "s!\([$]Hg\)\(:\( [^,]\{1,\},v\)\)\{0,1\}[$]!\1:\3 $cset $hgdate \$!" else sed -e 's!\([$]Hg\(: [^,]\{1,\},v\)\{0,1\}\)[^$]*[$]!\1\$!' fi exit $? }}} In "hgpretxncommit.sh" you have to tweak the 'excl' and 'slash' variables according to your needs. Supposing above [decode] settings in hgrc the 'slash' pattern includes files with suffix ".py". {{{ #!/bin/sh set -e test $? -eq 0 || exit 1 sl="" excl='^\.hg\|\.\(p\(df\|ng\)\|jpg\)$' slash='\.\(tex\|s\(ty\|h\)\|c\(fg\|ls\)\|bib\|py\|awk\)$' tipv=`hg tip --verbose` manifest=`hg manifest | cut -d ' ' -f 3` for f in `echo "$tipv" | awk -F ': +' '/^files: +/ { print $2 }'` do if echo "$f" | grep -v -q "$excl" && echo "$manifest" | grep -x -q "$f" then echo "$f" | grep -q "$slash" && sl='slashday' hg cat "$f" | hgfilter.sh decode $sl "$tipv" > "$f" fi done exit $? }}} |
Hello, very nice site! Please also visit my homepages: [URL=http://www.greatprise.org/health-individual-insurance/index.html]health individual insurance[/URL] [URL=http://www.greatprise.org/agent-insurance/index.html]agent insurance[/URL] [URL=http://www.greatprise.org/business-insurance/index.html]business insurance[/URL] [URL=http://www.greatprise.org/auto-geico-insurance/index.html]auto geico insurance[/URL] [URL=http://www.greatprise.org/insurance-life-quote-term/index.html]insurance life quote term[/URL] [URL=http://www.greatprise.org/insurance-unemployment/index.html]insurance unemployment[/URL] [URL=http://www.greatprise.org/aaa-insurance/index.html]aaa insurance[/URL] [URL=http://www.greatprise.org/car-insurance-online/index.html]car insurance online[/URL] [URL=http://www.greatprise.org/farmer-insurance/index.html]farmer insurance[/URL] [URL=http://www.greatprise.org/auto-insurance-online/index.html]auto insurance online[/URL] [URL=http://www.greatprise.org/car-company-insurance/index.html]car company insurance[/URL] [URL=http://www.greatprise.org/insurance-quote/index.html]insurance quote[/URL] [URL=http://www.greatprise.org/health-insurance-quote/index.html]health insurance quote[/URL] [URL=http://www.greatprise.org/american-family-insurance/index.html]american family insurance[/URL] [URL=http://www.greatprise.org/company-health-insurance/index.html]company health insurance[/URL] [URL=http://www.greatprise.org/car-florida-insurance/index.html]car florida insurance[/URL] [URL=http://www.greatprise.org/insurance-marketing/index.html]insurance marketing[/URL] [URL=http://www.greatprise.org/affordable-health-insurance/index.html]affordable health insurance[/URL] [URL=http://www.greatprise.org/family-health-insurance/index.html]family health insurance[/URL] [URL=http://www.greatprise.org/car-cheap-insurance/index.html]car cheap insurance[/URL] [URL=http://www.greatprise.org/attorney-insurance/index.html]attorney insurance[/URL] [URL=http://www.greatprise.org/cost-health-insurance-low/index.html]cost health insurance low[/URL] [URL=http://www.greatprise.org/boat-insurance/index.html]boat insurance[/URL] [URL=http://www.greatprise.org/insurance-pet/index.html]insurance pet[/URL] [URL=http://www.greatprise.org/car-insurance-new-york/index.html]car insurance new york[/URL] [URL=http://www.greatprise.org/california-car-insurance/index.html]california car insurance[/URL] [URL=http://www.greatprise.org/car-insurance-rate/index.html]car insurance rate[/URL] [URL=http://www.greatprise.org/home-insurance-owner-quote/index.html]home insurance owner quote[/URL] [URL=http://www.greatprise.org/insurance-mercury/index.html]insurance mercury[/URL] [URL=http://www.greatprise.org/insurance-life-settlement/index.html]insurance life settlement[/URL] [URL=http://www.greatprise.org/car-cost-insurance-low/index.html]car cost insurance low[/URL] [URL=http://www.greatprise.org/health-insurance-short-term/index.html]health insurance short term[/URL] [URL=http://www.greatprise.org/accident-insurance-travel/index.html]accident insurance travel[/URL] [URL=http://www.greatprise.org/health-insurance/index.html]health insurance[/URL] [URL=http://www.greatprise.org/adjuster-insurance/index.html]adjuster insurance[/URL] [URL=http://www.greatprise.org/auto-cost-insurance-low/index.html]auto cost insurance low[/URL] [URL=http://www.greatprise.org/home-insurance-quote/index.html]home insurance quote[/URL] [URL=http://www.greatprise.org/automotive-de-insurance-wilmington/index.html]automotive de insurance wilmington[/URL] [URL=http://www.greatprise.org/health-insurance-plan/index.html]health insurance plan[/URL] [URL=http://www.greatprise.org/business-health-insurance-small/index.html]business health insurance small[/URL] [URL=http://www.greatprise.org/insurance-life/index.html]insurance life[/URL] [URL=http://www.greatprise.org/insurance-online-travel/index.html]insurance online travel[/URL] [URL=http://www.greatprise.org/allstate-insurance/index.html]allstate insurance[/URL] [URL=http://www.greatprise.org/car-insurance-online-quote/index.html]car insurance online quote[/URL] <a href="http://www.greatprise.org/insurance-life-term/index.html">insurance life term</a> <a href="http://www.greatprise.org/free-insurance-quote/index.html">free insurance quote</a> <a href="http://www.greatprise.org/auto-california-insurance/index.html">auto california insurance</a> <a href="http://www.greatprise.org/aaa-insurance/index.html">aaa insurance</a> <a href="http://www.greatprise.org/hartford-insurance/index.html">hartford insurance</a> <a href="http://www.greatprise.org/family-health-insurance/index.html">family health insurance</a> <a href="http://www.greatprise.org/insurance-lead/index.html">insurance lead</a> <a href="http://www.greatprise.org/insurance-life-quote/index.html">insurance life quote</a> <a href="http://www.greatprise.org/boston-insurance/index.html "> boston insurance</a> <a href="http://www.greatprise.org/auto-cost-insurance-low/index.html">auto cost insurance low</a> <a href="http://www.greatprise.org/broker-insurance/index.html">broker insurance</a> <a href="http://www.greatprise.org/accident-insurance-travel/index.html">accident insurance travel</a> http://www.greatprise.org/health-insurance-international-travel/index.html http://www.greatprise.org/insurance/index.html http://www.greatprise.org/claim-insurance/index.html http://www.greatprise.org/california-health-insurance/index.html http://www.greatprise.org/ca-health-insurance/index.html http://www.greatprise.org/insurance-nationwide/index.html http://www.greatprise.org/health-insurance-short-term/index.html http://www.greatprise.org/business-insurance/index.html http://www.greatprise.org/health-insurance/index.html http://www.greatprise.org/insurance-travel/index.html Thanks! ---- CategoryNewFeatures |
Hello, very nice site! Please also visit my homepages:
[URL=http://www.greatprise.org/health-individual-insurance/index.html]health individual insurance[/URL] [URL=http://www.greatprise.org/agent-insurance/index.html]agent insurance[/URL] [URL=http://www.greatprise.org/business-insurance/index.html]business insurance[/URL] [URL=http://www.greatprise.org/auto-geico-insurance/index.html]auto geico insurance[/URL] [URL=http://www.greatprise.org/insurance-life-quote-term/index.html]insurance life quote term[/URL] [URL=http://www.greatprise.org/insurance-unemployment/index.html]insurance unemployment[/URL] [URL=http://www.greatprise.org/aaa-insurance/index.html]aaa insurance[/URL] [URL=http://www.greatprise.org/car-insurance-online/index.html]car insurance online[/URL] [URL=http://www.greatprise.org/farmer-insurance/index.html]farmer insurance[/URL] [URL=http://www.greatprise.org/auto-insurance-online/index.html]auto insurance online[/URL] [URL=http://www.greatprise.org/car-company-insurance/index.html]car company insurance[/URL] [URL=http://www.greatprise.org/insurance-quote/index.html]insurance quote[/URL] [URL=http://www.greatprise.org/health-insurance-quote/index.html]health insurance quote[/URL] [URL=http://www.greatprise.org/american-family-insurance/index.html]american family insurance[/URL] [URL=http://www.greatprise.org/company-health-insurance/index.html]company health insurance[/URL] [URL=http://www.greatprise.org/car-florida-insurance/index.html]car florida insurance[/URL] [URL=http://www.greatprise.org/insurance-marketing/index.html]insurance marketing[/URL] [URL=http://www.greatprise.org/affordable-health-insurance/index.html]affordable health insurance[/URL] [URL=http://www.greatprise.org/family-health-insurance/index.html]family health insurance[/URL] [URL=http://www.greatprise.org/car-cheap-insurance/index.html]car cheap insurance[/URL] [URL=http://www.greatprise.org/attorney-insurance/index.html]attorney insurance[/URL] [URL=http://www.greatprise.org/cost-health-insurance-low/index.html]cost health insurance low[/URL] [URL=http://www.greatprise.org/boat-insurance/index.html]boat insurance[/URL] [URL=http://www.greatprise.org/insurance-pet/index.html]insurance pet[/URL] [URL=http://www.greatprise.org/car-insurance-new-york/index.html]car insurance new york[/URL] [URL=http://www.greatprise.org/california-car-insurance/index.html]california car insurance[/URL] [URL=http://www.greatprise.org/car-insurance-rate/index.html]car insurance rate[/URL] [URL=http://www.greatprise.org/home-insurance-owner-quote/index.html]home insurance owner quote[/URL] [URL=http://www.greatprise.org/insurance-mercury/index.html]insurance mercury[/URL] [URL=http://www.greatprise.org/insurance-life-settlement/index.html]insurance life settlement[/URL] [URL=http://www.greatprise.org/car-cost-insurance-low/index.html]car cost insurance low[/URL] [URL=http://www.greatprise.org/health-insurance-short-term/index.html]health insurance short term[/URL] [URL=http://www.greatprise.org/accident-insurance-travel/index.html]accident insurance travel[/URL] [URL=http://www.greatprise.org/health-insurance/index.html]health insurance[/URL] [URL=http://www.greatprise.org/adjuster-insurance/index.html]adjuster insurance[/URL] [URL=http://www.greatprise.org/auto-cost-insurance-low/index.html]auto cost insurance low[/URL] [URL=http://www.greatprise.org/home-insurance-quote/index.html]home insurance quote[/URL] [URL=http://www.greatprise.org/automotive-de-insurance-wilmington/index.html]automotive de insurance wilmington[/URL] [URL=http://www.greatprise.org/health-insurance-plan/index.html]health insurance plan[/URL] [URL=http://www.greatprise.org/business-health-insurance-small/index.html]business health insurance small[/URL] [URL=http://www.greatprise.org/insurance-life/index.html]insurance life[/URL] [URL=http://www.greatprise.org/insurance-online-travel/index.html]insurance online travel[/URL] [URL=http://www.greatprise.org/allstate-insurance/index.html]allstate insurance[/URL] [URL=http://www.greatprise.org/car-insurance-online-quote/index.html]car insurance online quote[/URL] <a href="http://www.greatprise.org/insurance-life-term/index.html">insurance life term</a> <a href="http://www.greatprise.org/free-insurance-quote/index.html">free insurance quote</a> <a href="http://www.greatprise.org/auto-california-insurance/index.html">auto california insurance</a> <a href="http://www.greatprise.org/aaa-insurance/index.html">aaa insurance</a> <a href="http://www.greatprise.org/hartford-insurance/index.html">hartford insurance</a> <a href="http://www.greatprise.org/family-health-insurance/index.html">family health insurance</a> <a href="http://www.greatprise.org/insurance-lead/index.html">insurance lead</a> <a href="http://www.greatprise.org/insurance-life-quote/index.html">insurance life quote</a> <a href="http://www.greatprise.org/boston-insurance/index.html "> boston insurance</a> <a href="http://www.greatprise.org/auto-cost-insurance-low/index.html">auto cost insurance low</a> <a href="http://www.greatprise.org/broker-insurance/index.html">broker insurance</a> <a href="http://www.greatprise.org/accident-insurance-travel/index.html">accident insurance travel</a> http://www.greatprise.org/health-insurance-international-travel/index.html http://www.greatprise.org/insurance/index.html http://www.greatprise.org/claim-insurance/index.html http://www.greatprise.org/california-health-insurance/index.html http://www.greatprise.org/ca-health-insurance/index.html http://www.greatprise.org/insurance-nationwide/index.html http://www.greatprise.org/health-insurance-short-term/index.html http://www.greatprise.org/business-insurance/index.html http://www.greatprise.org/health-insurance/index.html http://www.greatprise.org/insurance-travel/index.html
Thanks!