Mercurial > hg > gitweb
diff hg @ 220:3113a94c1bff
change dircache into dirstate
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
change dircache into dirstate
The dircache now tracks adds and removes directly
diffdir now makes a proper distinction between added and unknown files
Add a forget command to unadd files
Undo tries to fix up the state of just the files in the undone commit
Add and remove complain about files that are not in a proper state of
existence
manifest hash: ca0cd6abc5e119670acf11a54fefa2bc986eadf3
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
iD8DBQFCn7TRywK+sNU5EO8RAhnSAKC2oHg1HJOCGsvpUYj4SBEq0HmuJQCgr5gl
jEBTs5AFD5IhF73YAgrcnkE=
=prQA
-----END PGP SIGNATURE-----
author | mpm@selenic.com |
---|---|
date | Thu, 02 Jun 2005 17:39:29 -0800 |
parents | 8ff4532376a4 |
children | ccbcc4d76f81 |
line wrap: on
line diff
--- 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)