Fwd: Advantages of MQ over vanilla hg
Ben Hood
0x6e6562 at gmail.com
Tue Mar 13 23:47:15 UTC 2007
Excellent, it even handles a rename after an edit (e.g. edit b then
rename to c):
gr8:~/hgtest f00bar$ date >> b
gr8:~/hgtest f00bar$ hg mv b c
gr8:~/hgtest f00bar$ hg qrefresh --git
gr8:~/hgtest f00bar$ more .hg/patches/foo
this is just a foo message
diff --git a/a b/c
rename from a
rename to c
--- a/c
+++ b/c
@@ -1,1 +1,2 @@ Tue Mar 13 23:39:27 GMT 2007
Tue Mar 13 23:39:27 GMT 2007
+Tue Mar 13 23:44:10 GMT 2007
Thanks for the tip Giorgos.
On 3/13/07, Giorgos Keramidas <keramida at ceid.upatras.gr> wrote:
> 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$
>
>
--
int main(){long u=0x6e6562;printf("%.4s",(char*)&u);}
More information about the Mercurial
mailing list