hg
changeset 220 3113a94c1bff
parent 219 8ff4532376a4
child 224 ccbcc4d76f81
--- a/hg	Wed Jun 01 19:19:38 2005 -0800
+++ b/hg	Thu Jun 02 17:39:29 2005 -0800
@@ -67,7 +67,7 @@
         date2 = time.asctime()
         if not node1:
             node1 = repo.current
-        (c, a, d) = repo.diffdir(repo.root, node1)
+        (c, a, d, u) = repo.diffdir(repo.root, node1)
         a = [] # ignore unknown files in repo, by popular request
         def read(f): return file(os.path.join(repo.root, f)).read()
 
@@ -79,9 +79,7 @@
         c, a, d = map(lambda x: filterfiles(x, files), (c, a, d))
 
     for f in c:
-        to = ""
-        if mmap.has_key(f):
-            to = repo.file(f).read(mmap[f])
+        to = repo.file(f).read(mmap[f])
         tn = read(f)
         sys.stdout.write(mdiff.unidiff(to, date1, tn, date2, f))
     for f in a:
@@ -132,6 +130,9 @@
 elif cmd == "add":
     repo.add(args)
 
+elif cmd == "forget":
+    repo.forget(args)
+
 elif cmd == "remove" or cmd == "rm" or cmd == "del" or cmd == "delete":
     repo.remove(args)
 
@@ -250,7 +251,7 @@
     repo.addchangegroup(data)
 
 elif cmd == "addremove":
-    (c, a, d) = repo.diffdir(repo.root, repo.current)
+    (c, a, d, u) = repo.diffdir(repo.root, repo.current)
     repo.add(a)
     repo.remove(d)
     
@@ -355,8 +356,8 @@
     print "}"
 
 elif cmd == "merge":
-    (c, a, d) = repo.diffdir(repo.root, repo.current)
-    if c:
+    (c, a, d, u) = repo.diffdir(repo.root, repo.current)
+    if c or a or d:
         ui.warn("aborting (outstanding changes in working directory)\n")
         sys.exit(1)