changeset 230 | 00ea3613f82c |
parent 227 | f57519cddd3d |
child 232 | fc4a6e5b5812 |
229:1b11da6ee69e | 230:00ea3613f82c |
---|---|
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, u) = repo.diffdir(repo.root, repo.current) |
73 (c, a, d, u) = repo.diffdir(repo.root) |
74 if c or a or d: |
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() |
158 |
158 |
159 C = changed |
159 C = changed |
160 A = added |
160 A = added |
161 R = removed |
161 R = removed |
162 ? = not tracked''' |
162 ? = not tracked''' |
163 (c, a, d, u) = repo.diffdir(repo.root, repo.current) |
163 (c, a, d, u) = repo.diffdir(repo.root) |
164 (c, a, d, u) = map(lambda x: relfilter(repo, x), (c, a, d, u)) |
164 (c, a, d, u) = map(lambda x: relfilter(repo, x), (c, a, d, u)) |
165 |
165 |
166 for f in c: print "C", f |
166 for f in c: print "C", f |
167 for f in a: print "A", f |
167 for f in a: print "A", f |
168 for f in d: print "R", f |
168 for f in d: print "R", f |