Mercurial > public > mercurial-scm > hg
diff mercurial/commands.py @ 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 | 2bfe525ef6ca |
line wrap: on
line diff
--- a/mercurial/commands.py Wed Jun 01 19:19:38 2005 -0800 +++ b/mercurial/commands.py Thu Jun 02 17:39:29 2005 -0800 @@ -70,8 +70,8 @@ def checkout(ui, repo, changeset=None): '''checkout a given changeset or the current tip''' - (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) @@ -129,12 +129,13 @@ A = added R = removed ? = not tracked''' - (c, a, d) = repo.diffdir(repo.root, repo.current) - (c, a, d) = map(lambda x: relfilter(repo, x), (c, a, d)) + (c, a, d, u) = repo.diffdir(repo.root, repo.current) + (c, a, d, u) = map(lambda x: relfilter(repo, x), (c, a, d, u)) for f in c: print "C", f - for f in a: print "?", f + for f in a: print "A", f for f in d: print "R", f + for f in u: print "?", f def undo(ui, repo): repo.undo()