Mercurial > public > mercurial-scm > hg-stable
comparison 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 |
comparison
equal
deleted
inserted
replaced
219:8ff4532376a4 | 220:3113a94c1bff |
---|---|
68 # this should eventually support remote repos | 68 # this should eventually support remote repos |
69 os.system("cp -al %s/.hg .hg" % path) | 69 os.system("cp -al %s/.hg .hg" % path) |
70 | 70 |
71 def checkout(ui, repo, changeset=None): | 71 def checkout(ui, repo, changeset=None): |
72 '''checkout a given changeset or the current tip''' | 72 '''checkout a given changeset or the current tip''' |
73 (c, a, d) = repo.diffdir(repo.root, repo.current) | 73 (c, a, d, u) = repo.diffdir(repo.root, repo.current) |
74 if c: | 74 if c or a or d: |
75 ui.warn("aborting (outstanding changes in working directory)\n") | 75 ui.warn("aborting (outstanding changes in working directory)\n") |
76 sys.exit(1) | 76 sys.exit(1) |
77 | 77 |
78 node = repo.changelog.tip() | 78 node = repo.changelog.tip() |
79 if changeset: | 79 if changeset: |
127 | 127 |
128 C = changed | 128 C = changed |
129 A = added | 129 A = added |
130 R = removed | 130 R = removed |
131 ? = not tracked''' | 131 ? = not tracked''' |
132 (c, a, d) = repo.diffdir(repo.root, repo.current) | 132 (c, a, d, u) = repo.diffdir(repo.root, repo.current) |
133 (c, a, d) = map(lambda x: relfilter(repo, x), (c, a, d)) | 133 (c, a, d, u) = map(lambda x: relfilter(repo, x), (c, a, d, u)) |
134 | 134 |
135 for f in c: print "C", f | 135 for f in c: print "C", f |
136 for f in a: print "?", f | 136 for f in a: print "A", f |
137 for f in d: print "R", f | 137 for f in d: print "R", f |
138 for f in u: print "?", f | |
138 | 139 |
139 def undo(ui, repo): | 140 def undo(ui, repo): |
140 repo.undo() | 141 repo.undo() |
141 | 142 |
142 table = { | 143 table = { |