Mercurial > hg-stable
comparison hgext/fetch.py @ 2801:bd4dada96c2e
fetch: do not fetch if working dir modified
author | Vadim Gelfer <vadim.gelfer@gmail.com> |
---|---|
date | Mon, 07 Aug 2006 17:33:14 -0700 |
parents | 135823f37304 |
children | df220d0974dd |
comparison
equal
deleted
inserted
replaced
2800:135823f37304 | 2801:bd4dada96c2e |
---|---|
68 if parent != repo.changelog.tip(): | 68 if parent != repo.changelog.tip(): |
69 raise util.Abort(_('working dir not at tip ' | 69 raise util.Abort(_('working dir not at tip ' |
70 '(use "hg update" to check out tip)')) | 70 '(use "hg update" to check out tip)')) |
71 if p2 != nullid: | 71 if p2 != nullid: |
72 raise util.Abort(_('outstanding uncommitted merge')) | 72 raise util.Abort(_('outstanding uncommitted merge')) |
73 mod, add, rem = repo.status()[:3] | |
74 if mod or add or rem: | |
75 raise util.Abort(_('outstanding uncommitted changes')) | |
73 if len(repo.heads()) > 1: | 76 if len(repo.heads()) > 1: |
74 raise util.Abort(_('multiple heads in this repository ' | 77 raise util.Abort(_('multiple heads in this repository ' |
75 '(use "hg heads" and "hg merge" to merge them)')) | 78 '(use "hg heads" and "hg merge" to merge them)')) |
76 return pull() | 79 return pull() |
77 | 80 |