Mercurial > hg
comparison mercurial/merge.py @ 33146:7017567ebdf2
obsutil: move 'foreground' to the new modules
We have a new 'obsutil' module now. We move the high level utility there to
bring 'obsolete.py' back to a more reasonable size.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Tue, 27 Jun 2017 01:40:34 +0200 |
parents | 9fc880dff5f3 |
children | 634b259079c5 |
comparison
equal
deleted
inserted
replaced
33145:0a370b93cca2 | 33146:7017567ebdf2 |
---|---|
26 from . import ( | 26 from . import ( |
27 copies, | 27 copies, |
28 error, | 28 error, |
29 filemerge, | 29 filemerge, |
30 match as matchmod, | 30 match as matchmod, |
31 obsolete, | 31 obsutil, |
32 pycompat, | 32 pycompat, |
33 scmutil, | 33 scmutil, |
34 subrepo, | 34 subrepo, |
35 util, | 35 util, |
36 worker, | 36 worker, |
1586 if (updatecheck == 'linear' and | 1586 if (updatecheck == 'linear' and |
1587 pas not in ([p1], [p2])): # nonlinear | 1587 pas not in ([p1], [p2])): # nonlinear |
1588 dirty = wc.dirty(missing=True) | 1588 dirty = wc.dirty(missing=True) |
1589 if dirty: | 1589 if dirty: |
1590 # Branching is a bit strange to ensure we do the minimal | 1590 # Branching is a bit strange to ensure we do the minimal |
1591 # amount of call to obsolete.foreground. | 1591 # amount of call to obsutil.foreground. |
1592 foreground = obsolete.foreground(repo, [p1.node()]) | 1592 foreground = obsutil.foreground(repo, [p1.node()]) |
1593 # note: the <node> variable contains a random identifier | 1593 # note: the <node> variable contains a random identifier |
1594 if repo[node].node() in foreground: | 1594 if repo[node].node() in foreground: |
1595 pass # allow updating to successors | 1595 pass # allow updating to successors |
1596 else: | 1596 else: |
1597 msg = _("uncommitted changes") | 1597 msg = _("uncommitted changes") |