Mercurial > public > mercurial-scm > hg-stable
diff mercurial/commands.py @ 966:022bcc738389
hg import: abort with uncommitted changes, override with --force
author | mpm@selenic.com |
---|---|
date | Fri, 19 Aug 2005 23:07:31 -0800 |
parents | a425123e6afe |
children | 1f3710636b45 |
line wrap: on
line diff
--- a/mercurial/commands.py Fri Aug 19 22:48:43 2005 -0800 +++ b/mercurial/commands.py Fri Aug 19 23:07:31 2005 -0800 @@ -737,6 +737,12 @@ """import an ordered set of patches""" patches = (patch1,) + patches + if not opts['force']: + (c, a, d, u) = repo.changes() + if c or a or d: + ui.warn("abort: outstanding uncommitted changes!\n") + return 1 + d = opts["base"] strip = opts["strip"] @@ -1329,6 +1335,7 @@ "import|patch": (import_, [('p', 'strip', 1, 'path strip'), + ('f', 'force', None, 'skip check for outstanding changes'), ('b', 'base', "", 'base path')], "hg import [-p NUM] [-b BASE] PATCH..."), "incoming|in": (incoming, [], 'hg incoming [SOURCE]'),