changeset 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
files hgext/fetch.py
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/fetch.py	Mon Aug 07 17:27:38 2006 -0700
+++ b/hgext/fetch.py	Mon Aug 07 17:33:14 2006 -0700
@@ -70,6 +70,9 @@
                            '(use "hg update" to check out tip)'))
     if p2 != nullid:
         raise util.Abort(_('outstanding uncommitted merge'))
+    mod, add, rem = repo.status()[:3]
+    if mod or add or rem:
+        raise util.Abort(_('outstanding uncommitted changes'))
     if len(repo.heads()) > 1:
         raise util.Abort(_('multiple heads in this repository '
                            '(use "hg heads" and "hg merge" to merge them)'))