Show More
@@ -16,7 +16,7 b' https://mercurial-scm.org/wiki/RebaseExt' | |||
|
16 | 16 | |
|
17 | 17 | from mercurial import hg, util, repair, merge, cmdutil, commands, bookmarks |
|
18 | 18 | from mercurial import extensions, patch, scmutil, phases, obsolete, error |
|
19 | from mercurial import copies, repoview, revset | |
|
19 | from mercurial import copies, destutil, repoview, revset | |
|
20 | 20 | from mercurial.commands import templateopts |
|
21 | 21 | from mercurial.node import nullrev, nullid, hex, short |
|
22 | 22 | from mercurial.lock import release |
@@ -1145,7 +1145,6 b' def pullrebase(orig, ui, repo, *args, **' | |||
|
1145 | 1145 | ui.debug('--update and --rebase are not compatible, ignoring ' |
|
1146 | 1146 | 'the update flag\n') |
|
1147 | 1147 | |
|
1148 | movemarkfrom = repo['.'].node() | |
|
1149 | 1148 | revsprepull = len(repo) |
|
1150 | 1149 | origpostincoming = commands.postincoming |
|
1151 | 1150 | def _dummy(*args, **kwargs): |
@@ -1166,15 +1165,11 b' def pullrebase(orig, ui, repo, *args, **' | |||
|
1166 | 1165 | if 'source' in opts: |
|
1167 | 1166 | del opts['source'] |
|
1168 | 1167 | if rebase(ui, repo, **opts) == _nothingtorebase(): |
|
1169 | branch = repo[None].branch() | |
|
1170 |
|
|
|
1171 | if dest != repo['.'].rev(): | |
|
1172 |
# |
|
|
1173 |
|
|
|
1174 | if bookmarks.update(repo, [movemarkfrom], | |
|
1175 | repo['.'].node()): | |
|
1176 | ui.status(_("updating bookmark %s\n") | |
|
1177 | % repo._activebookmark) | |
|
1168 | rev, _a, _b = destutil.destupdate(repo) | |
|
1169 | if rev != repo['.'].rev(): # we could update | |
|
1170 | # not passing argument to get the bare update behavior | |
|
1171 | # with warning and trumpets | |
|
1172 | commands.update(ui, repo) | |
|
1178 | 1173 | finally: |
|
1179 | 1174 | release(lock, wlock) |
|
1180 | 1175 | else: |
@@ -266,3 +266,46 b' pull --rebase only update if there is no' | |||
|
266 | 266 | | |
|
267 | 267 | o 0: 'C1' |
|
268 | 268 | |
|
269 | ||
|
270 | pull --rebase update (no rebase) use proper update: | |
|
271 | ||
|
272 | - warn about other head. | |
|
273 | ||
|
274 | $ cd ../a | |
|
275 | $ echo R6 > R6 | |
|
276 | $ hg ci -Am R6 | |
|
277 | adding R6 | |
|
278 | $ cd ../c | |
|
279 | $ hg up 'desc(R5)' | |
|
280 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
|
281 | $ hg pull --rebase | |
|
282 | pulling from $TESTTMP/a (glob) | |
|
283 | searching for changes | |
|
284 | adding changesets | |
|
285 | adding manifests | |
|
286 | adding file changes | |
|
287 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
|
288 | nothing to rebase - working directory parent is already an ancestor of destination 65bc164c1d9b | |
|
289 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
290 | 1 other heads for branch "default" | |
|
291 | $ hg tglog | |
|
292 | @ 9: 'R6' | |
|
293 | | | |
|
294 | | o 8: 'L2' | |
|
295 | | | | |
|
296 | | o 7: 'L1' | |
|
297 | |/ | |
|
298 | o 6: 'R5' | |
|
299 | | | |
|
300 | o 5: 'R4' | |
|
301 | | | |
|
302 | o 4: 'R3' | |
|
303 | | | |
|
304 | o 3: 'R2' | |
|
305 | | | |
|
306 | o 2: 'R1' | |
|
307 | | | |
|
308 | o 1: 'C2' | |
|
309 | | | |
|
310 | o 0: 'C1' | |
|
311 |
General Comments 0
You need to be logged in to leave comments.
Login now