##// END OF EJS Templates
update: localize logic around which ancestor to use...
Martin von Zweigbergk -
r30901:47278970 default
parent child Browse files
Show More
@@ -1556,7 +1556,7 b' def update(repo, node, branchmerge, forc'
1556 foreground = obsolete.foreground(repo, [p1.node()])
1556 foreground = obsolete.foreground(repo, [p1.node()])
1557 # note: the <node> variable contains a random identifier
1557 # note: the <node> variable contains a random identifier
1558 if repo[node].node() in foreground:
1558 if repo[node].node() in foreground:
1559 pas = [p1] # allow updating to successors
1559 pass # allow updating to successors
1560 elif dirty:
1560 elif dirty:
1561 msg = _("uncommitted changes")
1561 msg = _("uncommitted changes")
1562 if onode is None:
1562 if onode is None:
@@ -1572,15 +1572,17 b' def update(repo, node, branchmerge, forc'
1572 raise error.Abort(msg, hint=hint)
1572 raise error.Abort(msg, hint=hint)
1573 else:
1573 else:
1574 # Allow jumping branches if clean and specific rev given
1574 # Allow jumping branches if clean and specific rev given
1575 pas = [p1]
1575 pass
1576
1577 if overwrite:
1578 pas = [wc]
1579 elif not branchmerge:
1580 pas = [p1]
1576
1581
1577 # deprecated config: merge.followcopies
1582 # deprecated config: merge.followcopies
1578 followcopies = repo.ui.configbool('merge', 'followcopies', True)
1583 followcopies = repo.ui.configbool('merge', 'followcopies', True)
1579 if overwrite:
1584 if overwrite:
1580 pas = [wc]
1581 followcopies = False
1585 followcopies = False
1582 elif pas == [p2]: # backwards
1583 pas = [p1]
1584 elif not pas[0]:
1586 elif not pas[0]:
1585 followcopies = False
1587 followcopies = False
1586 if not branchmerge and not wc.dirty(missing=True):
1588 if not branchmerge and not wc.dirty(missing=True):
General Comments 0
You need to be logged in to leave comments. Login now