equal
deleted
inserted
replaced
1275 |
1275 |
1276 parents = wparents[0].parents() |
1276 parents = wparents[0].parents() |
1277 displayer = cmdutil.show_changeset(ui, repo, {'template': shorttemplate}) |
1277 displayer = cmdutil.show_changeset(ui, repo, {'template': shorttemplate}) |
1278 if len(parents) == 1: |
1278 if len(parents) == 1: |
1279 p = parents[0] |
1279 p = parents[0] |
1280 hg.update(repo, p.rev()) |
1280 bm = bookmarks.readcurrent(repo) |
|
1281 shouldmove = bm is not None and bookmarks.iscurrent(repo, bm) |
|
1282 ret = hg.update(repo, p.rev()) |
|
1283 if not ret and shouldmove: |
|
1284 repo._bookmarks[bm] = p.node() |
|
1285 repo._bookmarks.write() |
1281 displayer.show(p) |
1286 displayer.show(p) |
1282 return 0 |
1287 return 0 |
1283 else: |
1288 else: |
1284 for p in parents: |
1289 for p in parents: |
1285 displayer.show(p) |
1290 displayer.show(p) |
1301 if not children: |
1306 if not children: |
1302 ui.warn(_('no non-obsolete children\n')) |
1307 ui.warn(_('no non-obsolete children\n')) |
1303 return 1 |
1308 return 1 |
1304 if len(children) == 1: |
1309 if len(children) == 1: |
1305 c = children[0] |
1310 c = children[0] |
1306 hg.update(repo, c.rev()) |
1311 bm = bookmarks.readcurrent(repo) |
|
1312 shouldmove = bm is not None and bookmarks.iscurrent(repo, bm) |
|
1313 ret = hg.update(repo, c.rev()) |
|
1314 if not ret and shouldmove: |
|
1315 repo._bookmarks[bm] = c.node() |
|
1316 repo._bookmarks.write() |
1307 displayer.show(c) |
1317 displayer.show(c) |
1308 return 0 |
1318 return 0 |
1309 else: |
1319 else: |
1310 for c in children: |
1320 for c in children: |
1311 displayer.show(c) |
1321 displayer.show(c) |