##// END OF EJS Templates
hg import: abort with uncommitted changes, override with --force
mpm@selenic.com -
r966:022bcc73 default
parent child Browse files
Show More
@@ -188,13 +188,14 b' identify::'
188
188
189 aliases: id
189 aliases: id
190
190
191 import [-p <n> -b <base> -q] <patches>::
191 import [-p <n> -b <base> -f] <patches>::
192 Import a list of patches and commit them individually.
192 Import a list of patches and commit them individually.
193
193
194 options:
194 options:
195 -p, --strip <n> directory strip option for patch. This has the same
195 -p, --strip <n> directory strip option for patch. This has the same
196 meaning as the correnponding patch option
196 meaning as the correnponding patch option
197 -b <path> base directory to read patches from
197 -b <path> base directory to read patches from
198 -f, --force skip check for outstanding uncommitted changes
198
199
199 aliases: patch
200 aliases: patch
200
201
@@ -737,6 +737,12 b' def import_(ui, repo, patch1, *patches, '
737 """import an ordered set of patches"""
737 """import an ordered set of patches"""
738 patches = (patch1,) + patches
738 patches = (patch1,) + patches
739
739
740 if not opts['force']:
741 (c, a, d, u) = repo.changes()
742 if c or a or d:
743 ui.warn("abort: outstanding uncommitted changes!\n")
744 return 1
745
740 d = opts["base"]
746 d = opts["base"]
741 strip = opts["strip"]
747 strip = opts["strip"]
742
748
@@ -1329,6 +1335,7 b' table = {'
1329 "import|patch":
1335 "import|patch":
1330 (import_,
1336 (import_,
1331 [('p', 'strip', 1, 'path strip'),
1337 [('p', 'strip', 1, 'path strip'),
1338 ('f', 'force', None, 'skip check for outstanding changes'),
1332 ('b', 'base', "", 'base path')],
1339 ('b', 'base', "", 'base path')],
1333 "hg import [-p NUM] [-b BASE] PATCH..."),
1340 "hg import [-p NUM] [-b BASE] PATCH..."),
1334 "incoming|in": (incoming, [], 'hg incoming [SOURCE]'),
1341 "incoming|in": (incoming, [], 'hg incoming [SOURCE]'),
General Comments 0
You need to be logged in to leave comments. Login now