Fwd: Advantages of MQ over vanilla hg

Giorgos Keramidas keramida at ceid.upatras.gr
Tue Mar 13 10:56:56 UTC 2007


On 2007-03-13 06:48, Ben Hood <0x6e6562 at gmail.com> wrote:
> Thanks for the advice.
> 
> One feature I like about hg is its ability to handle file history
> during renames.
> 
> Does this work with MQ?

Yes.  If you use the --git option of qrefresh, then renames are shown in
the .hg/patches tree as shown below (look at the lines marked with a '+'
character at the beginning of the line):

  keramida at kobe:/home/keramida$ cd /tmp
  keramida at kobe:/tmp$ mkdir hgtest
  keramida at kobe:/tmp$ cd hgtest
  keramida at kobe:/tmp/hgtest$ hg init
  keramida at kobe:/tmp/hgtest$ echo a > a
  keramida at kobe:/tmp/hgtest$ hg commit -A -u test -m 'Initial revision.'
  adding a
  keramida at kobe:/tmp/hgtest$ hg log -v
  changeset:   0:d850823f947f
  tag:         tip
  user:        test
  date:        Tue Mar 13 12:54:26 2007 +0200
  files:       a
  description:
  Initial revision.
  
  
  keramida at kobe:/tmp/hgtest$ hg qinit -c
  keramida at kobe:/tmp/hgtest$ hg qnew -fe foo
  [insert patch log in editor]
  keramida at kobe:/tmp/hgtest$ hg rename a b
  keramida at kobe:/tmp/hgtest$ hg qrefresh --git
  keramida at kobe:/tmp/hgtest$ more .hg/patches/foo
  rename 'a' to 'b'
  
  diff --git a/a b/b
+ rename from a
+ rename to b
  keramida at kobe:/tmp/hgtest$




More information about the Mercurial mailing list