-
Notifications
You must be signed in to change notification settings - Fork 0
/
2010-03-09-mercurial-rebase-and-merges.html
200 lines (200 loc) · 14.2 KB
/
2010-03-09-mercurial-rebase-and-merges.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Dimitris Glezos' Personal website</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta http-equiv="imagetoolbar" content="no">
<meta http-equiv="pragma" content="cache">
<meta http-equiv="cache-control" content="cache">
<meta http-equiv="vary" content="content-language">
<meta http-equiv="Cache-control" content="max-age=2592000, public">
<meta http-equiv="content-style-type" content="text/css">
<link rel="stylesheet" type="text/css" href="http://dimitris.glezos.com/theme/css/screen.css">
<link rel="stylesheet" type="text/css" href="http://dimitris.glezos.com/theme/css/highlight.css">
<link rel="stylesheet" type="text/css" href="http://dimitris.glezos.com/theme/css/custom.css">
<link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Merriweather:300,700,700italic,300italic|Open+Sans:700,400" />
<link rel="publisher" href="">
<link rel="apple-touch-startup-image" href="http://dimitris.glezos.com/theme/images/logo.png">
<link type="text/plain" rel="socialmedia" href="http://dimitris.glezos.com/socialmedia.txt">
<link rel="dns-prefetch" href="http://dimitris.glezos.com"/>
<link rel="dns-prefetch" href="//www.gstatic.com"/>
<link rel="dns-prefetch" href="//fonts.gstatic.com"/>
<link rel="dns-prefetch" href="//fonts.googleapis.com"/>
<link rel="dns-prefetch" href="//accounts.google.com"/>
<link rel="dns-prefetch" href="//ssl.google-analytics.com"/>
<link rel="dns-prefetch" href="//www.google-analytics.com"/>
<link rel="dns-prefetch" href="//googleads.g.doubleclick.net"/>
<link rel="dns-prefetch" href="//pagead2.googlesyndication.com"/>
<link rel="dns-prefetch" href="//twemoji.maxcdn.com"/>
<link rel="dns-prefetch" href="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"/>
<link rel="dns-prefetch" href="//fonts.googleapis.com/css?family=Merriweather:300,700,700italic,300italic|Open+Sans:700,400"/>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"/>
<meta name="apple-mobile-web-app-capable" content="yes"/>
<meta name="application-name" content="Dimitris Glezos' Personal website"/>
<meta name="msapplication-starturl" content="http:http://dimitris.glezos.com"/>
<meta name="msapplication-tooltip" content=""/>
<meta name="msapplication-window" content="width=1024;height=768"/>
<meta name="msapplication-task" content="name=Dimitris Glezos' Personal website;action-uri=http:http://dimitris.glezos.com;icon-uri=http://dimitris.glezos.com/theme/images/favicon.ico"/>
<meta name="msapplication-TileImage" content="http://dimitris.glezos.com/theme/images/apple-touch-icon-144x144.png"/>
<meta name="msapplication-TileColor" content="#1F1F21"/>
<meta name="application-name" content="Dimitris Glezos' Personal website">
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320"/>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="google-site-verification" content="">
<meta name="alexaVerifyID" content=""/>
<meta name="wot-verification" content=""/>
<meta name="msvalidate.01" content="" />
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="medium" content="mult">
<meta name="adblock" content="disable">
<meta name="rating" content="General">
<meta name="resource-type" content="document">
<meta name="revisit-after" content="1 days">
<meta name="revisit" content="1">
<meta name="robots" content="index,follow">
<meta name="no-email-collection" content="http://www.unspam.com/noemailcollection/">
<meta name="twitter:card" content="summary">
<meta name="twitter:site" content="@">
<meta property="og:site_name" content="Dimitris Glezos' Personal website">
<meta property="og:locale" content="en">
<link rel="canonical" href="http://dimitris.glezos.com/2010-03-09-mercurial-rebase-and-merges.html">
<meta property="og:type" content="article">
<meta property="og:title" content="Mercurial rebase and merges">
<meta property="og:url" content="2010-03-09-mercurial-rebase-and-merges.html">
<meta property="og:description" content="Epiphany! The past days I learned great things today about Mercurial. I found out Joel Spolsky's hginit.com. It teaches you the key concepts behind hg in a way which doesn't mess with complex internals, but focuses on what's important: the user experience. I found out that ...">
<meta property="article:published_time" content="Tuesday, March 09, 2010">
<meta name="twitter:title" content="Mercurial rebase and merges">
<meta name="twitter:description" content="Epiphany! The past days I learned great things today about Mercurial. I found out Joel Spolsky's hginit.com. It teaches you the key concepts behind hg in a way which doesn't mess with complex internals, but focuses on what's important: the user experience. I found out that ...">
<meta name="description" content="Epiphany! The past days I learned great things today about Mercurial. I found out Joel Spolsky's hginit.com. It teaches you the key concepts behind hg in a way which doesn't mess with complex internals, but focuses on what's important: the user experience. I found out that ...">
<meta name="twitter:creator" content="@">
<meta property="og:image" content="http://dimitris.glezos.com/theme/images/logo.png">
<meta name="twitter:image" content="http://dimitris.glezos.com/theme/images/logo.png">
<meta property="og:image:type" content="image/png">
<meta property="og:image:width" content="300">
<meta property="og:image:height" content="300">
<meta property="article:section" content="text">
<meta property="article:author" content="glezos-blog">
<script type="text/javascript">(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','//www.google-analytics.com/analytics.js','ga');ga('create', '', 'auto');ga('send', 'pageview');var _qevents = _qevents || [];setTimeout(function() { window.onscroll = function() { window.onscroll = null;
ga('send','event','Ajuste de Tasa de Rebote','Scroll despues de 5 segundos');}}, 5000);</script>
<script src="//twemoji.maxcdn.com/twemoji.min.js"></script>
</head>
<body class="post-template nav-closed" itemscope itemtype="http://schema.org/WebPage">
<meta itemprop="name" content="Dimitris Glezos' Personal website">
<meta itemprop="url" content="http://dimitris.glezos.com">
<meta itemprop="headline" content="Dimitris Glezos' Personal website || ">
<meta itemprop="description about" content="">
<meta itemprop="keywords" content="">
<meta itemprop="inLanguage" content="en">
<nav class="nav">
<h3 class="nav-title">Menu</h3>
<a href="#" class="nav-close">
<span class="hidden">Close</span>
</a>
<ul role="menubar">
<li class="" role="presentation"><a href="http://dimitris.glezos.com/index.html" title="Dimitris Glezos' Personal website" itemprop="name" itemprop="significantLink">Home</a></li>
<li role="presentation"><a href="http://www.transifex.com/" title="Transifex" itemprop="name" itemprop="significantLink">Transifex</a></li>
<li role="presentation"><a href="old" title="My really old website" itemprop="name" itemprop="significantLink">My really old website</a></li>
<li class="" role="presentation"><a href="http://dimitris.glezos.com/archives.html" title="Dimitris Glezos' Personal website | Archives" itemprop="name" itemprop="significantLink">Archives</a></li>
</ul>
</nav>
<span class="nav-cover"></span> <div class="site-wrapper">
<header class="main-header post-head" style="background-image: url('http://dimitris.glezos.com/');" itemscope itemtype="http://schema.org/WPHeader">
<div class="vertical">
<div class="main-header-content inner">
<h1 class="page-title" itemprop="headline">Mercurial rebase and merges</h1>
<section class="post-meta">
<time class="post-date" itemprop="datePublished" datetime="2010YYY-51M-%DD">Tuesday, March 09, 2010</time>
on </section>
</div>
</div>
<nav class="main-nav overlay clearfix">
<a class="menu-button" href="#">
<span class="burger">☰</span>
<span class="word">Menu</span>
</a>
</nav>
<div class="vertical">
<div class="main-header-content inner">
</div>
</div>
</header>
<main id="content" class="content" role="main">
<article class="post" itemscope="" itemtype="http://schema.org/BlogPosting" itemprop="blogPost">
<!-- <header class="post-header">
<h1 class="post-title" itemprop="headline">Mercurial rebase and merges</h1>
<section class="post-meta">
<time class="post-date" itemprop="datePublished" datetime="2010YYY-51M-%DD">Tuesday, March 09, 2010</time>
on </section>
</header>-->
<section class="post-content">
<p>Epiphany!</p>
<p>The past days I learned great things today about Mercurial.</p>
<ol>
<li>
<p>I found out Joel Spolsky's <a href="hginit.com">hginit.com</a>. It teaches you the key concepts behind hg in a way which doesn't mess with complex internals, but focuses on what's important: the user experience.</p>
</li>
<li>
<p>I found out that the latest version of the hgtk history window supports running an 'Outgoing' command, which directly marks the nodes which will be pushed.</p>
</li>
<li>
<p>I noticed that sometimes when I rebase, I get a merged head node instead of a linear history. That is, the rebase doesn't work 100%. Not sure why this was happening, but I found a few hackish workarounds. The funny thing is that I also found a solution: I then rebased the branche's root node on top of the merged node.</p>
</li>
</ol>
<p>I now understand that the problem was much simpler: I just run accidentally hg rebase with <code>--source</code> instead of <code>--branch</code>. The first flag rebases a single node and the latter a whole branch. So, obviously, only the last node was "rebased" to look on top of tip. Instead, when you rebase with <code>--branch</code>, the branche's base node is rebased, and the history is, of course, linearized.</p>
<p>Success.</p>
<p><img alt="Success" src="http://media.tumblr.com/tumblr_kz1be0Vx0s1qati3p.jpg" />
(The Beast playing some hoops at the office.)</p>
<br/>
</section>
<footer class="post-footer">
<figure class="author-image">
<a class="img" href="author/glezos-blog.html" style="background-image: url('/theme/glezos_portrait_square.jpg')"><span class="hidden">glezos-blog's Picture</span></a>
</figure>
<section class="author">
<h4>
<a href="author/glezos-blog.html">glezos-blog</a>
</h4>
<p></p>
<div class="author-meta">
<span class="author-location icon-location"></span>
</div>
</section>
<section class="share">
<h4>Share this post</h4>
<a class="icon-twitter" href="https://twitter.com/share?text=Mercurial%20rebase%20and%20merges%20via%20%40&url=http://dimitris.glezos.com/2010-03-09-mercurial-rebase-and-merges.html" onclick="window.open(this.href, 'twitter-share', 'width=550,height=235');return false;">
<span class="hidden">Twitter</span>
</a>
<a class="icon-facebook" href="https://www.facebook.com/sharer/sharer.php?u=http://dimitris.glezos.com/2010-03-09-mercurial-rebase-and-merges.html" onclick="window.open(this.href, 'facebook-share','width=580,height=296');return false;">
<span class="hidden">Facebook</span>
</a>
<a class="icon-google-plus" href="https://plus.google.com/share?url=http://dimitris.glezos.com/2010-03-09-mercurial-rebase-and-merges.html" onclick="window.open(this.href, 'google-plus-share', 'width=490,height=530');return false;">
<span class="hidden">Google+</span>
</a>
</section>
</footer>
</article>
</main>
<aside class="read-next">
</aside> <footer class="site-footer clearfix" role="contentinfo" itemscope itemtype="http://schema.org/WPFooter">
<!--
<section class="copyright">
<a itemprop="url" href="http://creativecommons.org/licenses/by-nc-sa/4.0/" target="_blank">
CC Attribution-NonCommercial-ShareAlike 4.0 International License</a>.
</section>
-->
<section class="poweredby">
Proudly published with
<a itemprop="url" href="https://getpelican.org" target="_blank">Pelican</a>
</section>
</footer>
</div>
<script type="text/javascript" src="http://dimitris.glezos.com/theme/js/jquery-1.11.2.min.js"></script>
<script type="text/javascript" src="http://dimitris.glezos.com/theme/js/jquery.fitvids.min.js"></script>
<script type="text/javascript" src="http://dimitris.glezos.com/theme/js/index.min.js"></script>
<script>twemoji.parse(document, {"size":16});</script>
</body>
</html>