[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mercurial
Subject:    =?UTF-8?Q?Re=3A_clone=2C_apply_patch_then_pull=2C_pulled_=C2=ABidentical?= =?UTF-8?Q?=C2=BB_changese
From:       Benjamin Fritz <fritzophrenic () gmail ! com>
Date:       2016-12-27 18:08:41
Message-ID: CAMaohidEt4g-wUbLv9wg+9eWyp-p=E2tuF8iD=hFL-KWXe3BfA () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


The changesets are not identical, they have different commit messages. Thus
the hash over the entire changeset differs, making the changeset ID
different.

On Dec 26, 2016 11:27 AM, "Uwe Brauer" <oub@mat.ucm.es> wrote:

Hi

The following seems a bit contra intuitive.

First the repo server is generated.

hg init server
cd server
hg bookmark master
echo main > new.el
hg add new.el
hg commit -m main1
echo offical2 >> new.el
hg commit -m main2
echo main3 >> new.el
hg commit -m main3

That repo gets cloned

 hg clone server clone

Then a bookmark is added to server and a patch is generated
cd server
hg bookmark feature
echo feature > feature.el
hg add feature.el
hg commit -m feature
echo feature2 >> feature.el
hg commit -m feature2
hg update master
hg diff -r master -feature -o mypatch.patch

The patch gets applied on clone
them in server clone is pulled (also all files are identical) and indeed
the last changset is pulled resulting in the following graphs.

Clone
o changeset:   3:01f5c2db879d
|  tag:         tip
|  user:        Uwe Brauer <oub@mat.ucm.es>
|  date:        Mon Dec 26 17:04:25 2016 +0000
|  summary:     Patch applied
|
o  changeset:   2:611fd79e42e3
|  bookmark:    master
|  user:        Uwe Brauer <oub@mat.ucm.es>
|  date:        Mon Dec 26 17:03:07 2016 +0000
|  summary:     main3

And    Server

o  changeset:   5:01f5c2db879d
|  tag:         tip
|  parent:      2:611fd79e42e3
|  user:        Uwe Brauer <oub@mat.ucm.es>
|  date:        Mon Dec 26 17:04:25 2016 +0000
|  summary:     Patch applied
|
| @  changeset:   4:ad5637734560
| |  bookmark:    feature
| |  user:        Uwe Brauer <oub@mat.ucm.es>
| |  date:        Mon Dec 26 17:03:37 2016 +0000
| |  summary:     feature2
| |
| o  changeset:   3:ae2f0f166c8e
|/   user:        Uwe Brauer <oub@mat.ucm.es>
|    date:        Mon Dec 26 17:03:36 2016 +0000
|    summary:     feature
|
o  changeset:   2:611fd79e42e3
|  bookmark:    master
|  user:        Uwe Brauer <oub@mat.ucm.es>
|  date:        Mon Dec 26 17:03:07 2016 +0000
|  summary:     main3


diff -r 4

Is empty

I find  this behavior a bit contra intuitive.

Uwe Brauer
_______________________________________________
Mercurial mailing list
Mercurial@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial

[Attachment #5 (text/html)]

<div dir="auto">The changesets are not identical, they have different commit \
messages. Thus the hash over the entire changeset differs, making the changeset ID \
different.</div><div class="gmail_extra"><br><div class="gmail_quote">On Dec 26, 2016 \
11:27 AM, &quot;Uwe Brauer&quot; &lt;<a \
href="mailto:oub@mat.ucm.es">oub@mat.ucm.es</a>&gt; wrote:<br \
type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px \
#ccc solid;padding-left:1ex">Hi<br> <br>
The following seems a bit contra intuitive.<br>
<br>
First the repo server is generated.<br>
<br>
hg init server<br>
cd server<br>
hg bookmark master<br>
echo main &gt; new.el<br>
hg add new.el<br>
hg commit -m main1<br>
echo offical2 &gt;&gt; new.el<br>
hg commit -m main2<br>
echo main3 &gt;&gt; new.el<br>
hg commit -m main3<br>
<br>
That repo gets cloned<br>
<br>
  hg clone server clone<br>
<br>
Then a bookmark is added to server and a patch is generated<br>
cd server<br>
hg bookmark feature<br>
echo feature &gt; feature.el<br>
hg add feature.el<br>
hg commit -m feature<br>
echo feature2 &gt;&gt; feature.el<br>
hg commit -m feature2<br>
hg update master<br>
hg diff -r master -feature -o mypatch.patch<br>
<br>
The patch gets applied on clone<br>
them in server clone is pulled (also all files are identical) and indeed<br>
the last changset is pulled resulting in the following graphs.<br>
<br>
Clone<br>
o changeset:     3:01f5c2db879d<br>
> tag:              tip<br>
> user:            Uwe Brauer &lt;<a \
> href="mailto:oub@mat.ucm.es">oub@mat.ucm.es</a>&gt;<br>
> date:            Mon Dec 26 17:04:25 2016 +0000<br>
> summary:        Patch applied<br>
> <br>
o   changeset:     2:611fd79e42e3<br>
> bookmark:      master<br>
> user:            Uwe Brauer &lt;<a \
> href="mailto:oub@mat.ucm.es">oub@mat.ucm.es</a>&gt;<br>
> date:            Mon Dec 26 17:03:07 2016 +0000<br>
> summary:        main3<br>
<br>
And      Server<br>
<br>
o   changeset:     5:01f5c2db879d<br>
> tag:              tip<br>
> parent:         2:611fd79e42e3<br>
> user:            Uwe Brauer &lt;<a \
> href="mailto:oub@mat.ucm.es">oub@mat.ucm.es</a>&gt;<br>
> date:            Mon Dec 26 17:04:25 2016 +0000<br>
> summary:        Patch applied<br>
> <br>
> @   changeset:     4:ad5637734560<br>
> > bookmark:      feature<br>
> > user:            Uwe Brauer &lt;<a \
> > href="mailto:oub@mat.ucm.es">oub@mat.ucm.es</a>&gt;<br>
> > date:            Mon Dec 26 17:03:37 2016 +0000<br>
> > summary:        feature2<br>
> > <br>
> o   changeset:     3:ae2f0f166c8e<br>
> /     user:            Uwe Brauer &lt;<a \
> href="mailto:oub@mat.ucm.es">oub@mat.ucm.es</a>&gt;<br>
> date:            Mon Dec 26 17:03:36 2016 +0000<br>
> summary:        feature<br>
> <br>
o   changeset:     2:611fd79e42e3<br>
> bookmark:      master<br>
> user:            Uwe Brauer &lt;<a \
> href="mailto:oub@mat.ucm.es">oub@mat.ucm.es</a>&gt;<br>
> date:            Mon Dec 26 17:03:07 2016 +0000<br>
> summary:        main3<br>
<br>
<br>
diff -r 4<br>
<br>
Is empty<br>
<br>
I find   this behavior a bit contra intuitive.<br>
<font color="#888888"><br>
Uwe Brauer<br>
______________________________<wbr>_________________<br>
Mercurial mailing list<br>
<a href="mailto:Mercurial@mercurial-scm.org">Mercurial@mercurial-scm.org</a><br>
<a href="https://www.mercurial-scm.org/mailman/listinfo/mercurial" rel="noreferrer" \
target="_blank">https://www.mercurial-scm.org/<wbr>mailman/listinfo/mercurial</a><br> \
</font></blockquote></div><br></div>


[Attachment #6 (text/plain)]

_______________________________________________
Mercurial mailing list
Mercurial@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic