changeset 174:23057dc57d1b

hg merge: abort if there are outstanding changes in the working directory We currently don't support merging from the tip into the working directory, so merge with outstanding local changes is asking for trouble.
author mpm@selenic.com
date Thu, 26 May 2005 22:54:48 -0800
parents 8da1df932c16
children 0eb6e2c9800d
files hg
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/hg	Thu May 26 22:47:43 2005 -0800
+++ b/hg	Thu May 26 22:54:48 2005 -0800
@@ -406,6 +406,11 @@
     print "}"
 
 elif cmd == "merge":
+    (c, a, d) = repo.diffdir(repo.root, repo.current)
+    if c:
+        ui.warn("aborting (outstanding changes in working directory)\n")
+        sys.exit(1)
+
     if args:
         other = hg.repository(ui, args[0])
         ui.status("requesting changegroup\n")