##// END OF EJS Templates
Add lookup smarts everywhere...
mpm@selenic.com -
r39:adf70fff default
parent child Browse files
Show More
@@ -112,12 +112,8 b' else:'
112
112
113 if cmd == "checkout" or cmd == "co":
113 if cmd == "checkout" or cmd == "co":
114 node = repo.changelog.tip()
114 node = repo.changelog.tip()
115 if len(args):
115 if args:
116 if len(args[0]) < 40:
116 node = repo.changelog.lookup(args[0])
117 rev = int(args[0])
118 node = repo.changelog.node(rev)
119 else:
120 node = args[0]
121 repo.checkout(node)
117 repo.checkout(node)
122
118
123 elif cmd == "add":
119 elif cmd == "add":
@@ -150,7 +146,7 b' elif cmd == "import" or cmd == "patch":'
150 f = os.popen("lsdiff --strip %d %s" % (strip, pf))
146 f = os.popen("lsdiff --strip %d %s" % (strip, pf))
151 files = f.read().splitlines()
147 files = f.read().splitlines()
152 f.close()
148 f.close()
153 repo.commit(files)
149 repo.commit(repo.current, files)
154
150
155 elif cmd == "status":
151 elif cmd == "status":
156 (c, a, d) = repo.diffdir(repo.root, repo.current)
152 (c, a, d) = repo.diffdir(repo.root, repo.current)
@@ -224,7 +220,7 b' elif cmd == "dump":'
224 if args:
220 if args:
225 r = repo.file(args[0])
221 r = repo.file(args[0])
226 n = r.tip()
222 n = r.tip()
227 if len(args) > 1: n = hg.bin(args[1])
223 if len(args) > 1: n = r.lookup(args[1])
228 sys.stdout.write(r.read(n))
224 sys.stdout.write(r.read(n))
229 else:
225 else:
230 print "missing filename"
226 print "missing filename"
@@ -232,7 +228,7 b' elif cmd == "dump":'
232 elif cmd == "dumpmanifest":
228 elif cmd == "dumpmanifest":
233 n = repo.manifest.tip()
229 n = repo.manifest.tip()
234 if len(args) > 0:
230 if len(args) > 0:
235 n = hg.bin(args[0])
231 n = repo.manifest.lookup(args[0])
236 m = repo.manifest.read(n)
232 m = repo.manifest.read(n)
237 files = m.keys()
233 files = m.keys()
238 files.sort()
234 files.sort()
General Comments 0
You need to be logged in to leave comments. Login now