Mercurial > hg > mercurial-crew-with-dirclash
comparison hg @ 227:f57519cddd3d
move repo.current to dirstate.parents()
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
move repo.current to dirstate.parents()
dirstate now tracks the parents for the working dir
add a parents command to show them
manifest hash: cd69237838c3f69f7937723c4a6803d47cb27cfa
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
iD8DBQFCoMGuywK+sNU5EO8RAg5UAKCVLUrsJtkoIOTM+e0BLqEVN3Ni3gCeNDyy
ZF8jD728cl9K7S4sIN4gX4Y=
=P4bu
-----END PGP SIGNATURE-----
author | mpm@selenic.com |
---|---|
date | Fri, 03 Jun 2005 12:46:38 -0800 |
parents | 1536ccac47e9 |
children | 00ea3613f82c |
comparison
equal
deleted
inserted
replaced
226:1536ccac47e9 | 227:f57519cddd3d |
---|---|
64 def read(f): return repo.file(f).read(mmap2[f]) | 64 def read(f): return repo.file(f).read(mmap2[f]) |
65 date2 = date(change) | 65 date2 = date(change) |
66 else: | 66 else: |
67 date2 = time.asctime() | 67 date2 = time.asctime() |
68 if not node1: | 68 if not node1: |
69 node1 = repo.current | 69 node1 = repo.dirstate.parents()[0] |
70 (c, a, d, u) = repo.diffdir(repo.root, node1) | 70 (c, a, d, u) = repo.diffdir(repo.root, node1) |
71 a = [] # ignore unknown files in repo, by popular request | |
72 def read(f): return file(os.path.join(repo.root, f)).read() | 71 def read(f): return file(os.path.join(repo.root, f)).read() |
73 | 72 |
74 change = repo.changelog.read(node1) | 73 change = repo.changelog.read(node1) |
75 mmap = repo.manifest.read(change[0]) | 74 mmap = repo.manifest.read(change[0]) |
76 date1 = date(change) | 75 date1 = date(change) |
137 repo.remove(args) | 136 repo.remove(args) |
138 | 137 |
139 elif cmd == "commit" or cmd == "checkin" or cmd == "ci": | 138 elif cmd == "commit" or cmd == "checkin" or cmd == "ci": |
140 if 1: | 139 if 1: |
141 if len(args) > 0: | 140 if len(args) > 0: |
142 repo.commit(repo.current, args) | 141 repo.commit(args) |
143 else: | 142 else: |
144 repo.commit(repo.current) | 143 repo.commit() |
145 elif cmd == "rawcommit": | 144 elif cmd == "rawcommit": |
146 "raw commit interface" | 145 "raw commit interface" |
147 rc = {} | 146 rc = {} |
148 opts = [('p', 'parent', [], 'parent'), | 147 opts = [('p', 'parent', [], 'parent'), |
149 ('d', 'date', "", 'data'), | 148 ('d', 'date', "", 'data'), |
202 f.close() | 201 f.close() |
203 | 202 |
204 if files: | 203 if files: |
205 if os.system("patch -p%d < %s %s" % (strip, pf, quiet)): | 204 if os.system("patch -p%d < %s %s" % (strip, pf, quiet)): |
206 raise "patch failed!" | 205 raise "patch failed!" |
207 repo.commit(repo.current, files, text) | 206 repo.commit(files, text) |
208 | 207 |
209 elif cmd == "diff": | 208 elif cmd == "diff": |
210 revs = [] | 209 revs = [] |
211 | 210 |
212 if args: | 211 if args: |