Re: clone, apply patch then pull, pulled «identical» changeset?

Benjamin Fritz fritzophrenic at gmail.com
Tue Dec 27 18:08:41 UTC 2016


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 at 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 at 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 at 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 at mat.ucm.es>
|  date:        Mon Dec 26 17:04:25 2016 +0000
|  summary:     Patch applied
|
| @  changeset:   4:ad5637734560
| |  bookmark:    feature
| |  user:        Uwe Brauer <oub at mat.ucm.es>
| |  date:        Mon Dec 26 17:03:37 2016 +0000
| |  summary:     feature2
| |
| o  changeset:   3:ae2f0f166c8e
|/   user:        Uwe Brauer <oub at mat.ucm.es>
|    date:        Mon Dec 26 17:03:36 2016 +0000
|    summary:     feature
|
o  changeset:   2:611fd79e42e3
|  bookmark:    master
|  user:        Uwe Brauer <oub at 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 at mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20161227/e1b10957/attachment-0002.html>


More information about the Mercurial mailing list