Show More
@@ -8,7 +8,7 b'' | |||
|
8 | 8 | '''pull, update and merge in one command (DEPRECATED)''' |
|
9 | 9 | |
|
10 | 10 | from mercurial.i18n import _ |
|
11 |
from mercurial.node import |
|
|
11 | from mercurial.node import short | |
|
12 | 12 | from mercurial import commands, cmdutil, hg, util, error |
|
13 | 13 | from mercurial.lock import release |
|
14 | 14 | |
@@ -48,7 +48,7 b" def fetch(ui, repo, source='default', **" | |||
|
48 | 48 | if date: |
|
49 | 49 | opts['date'] = util.parsedate(date) |
|
50 | 50 | |
|
51 | parent, p2 = repo.dirstate.parents() | |
|
51 | parent, _p2 = repo.dirstate.parents() | |
|
52 | 52 | branch = repo.dirstate.branch() |
|
53 | 53 | try: |
|
54 | 54 | branchnode = repo.branchtip(branch) |
@@ -58,19 +58,13 b" def fetch(ui, repo, source='default', **" | |||
|
58 | 58 | raise util.Abort(_('working dir not at branch tip ' |
|
59 | 59 | '(use "hg update" to check out branch tip)')) |
|
60 | 60 | |
|
61 | if p2 != nullid: | |
|
62 | raise util.Abort(_('outstanding uncommitted merge')) | |
|
63 | ||
|
64 | 61 | wlock = lock = None |
|
65 | 62 | try: |
|
66 | 63 | wlock = repo.wlock() |
|
67 | 64 | lock = repo.lock() |
|
68 | mod, add, rem, del_ = repo.status()[:4] | |
|
69 | 65 | |
|
70 | if mod or add or rem: | |
|
71 | raise util.Abort(_('outstanding uncommitted changes')) | |
|
72 | if del_: | |
|
73 | raise util.Abort(_('working directory is missing some files')) | |
|
66 | cmdutil.bailifchanged(repo) | |
|
67 | ||
|
74 | 68 | bheads = repo.branchheads(branch) |
|
75 | 69 | bheads = [head for head in bheads if len(repo[head].children()) == 0] |
|
76 | 70 | if len(bheads) > 1: |
General Comments 0
You need to be logged in to leave comments.
Login now