##// END OF EJS Templates
Change hgit revision lookup to use repo.lookup
mason@suse.com -
r720:095dd8c7 default
parent child Browse files
Show More
@@ -111,7 +111,7 b' def catfile(args, ui, repo):'
111 if type != "commit":
111 if type != "commit":
112 sys.stderr.write("aborting hg cat-file only understands commits\n")
112 sys.stderr.write("aborting hg cat-file only understands commits\n")
113 sys.exit(1);
113 sys.exit(1);
114 n = repo.changelog.lookup(r)
114 n = repo.lookup(r)
115 catcommit(repo, n, prefix)
115 catcommit(repo, n, prefix)
116 if doptions['stdin']:
116 if doptions['stdin']:
117 try:
117 try:
@@ -146,17 +146,17 b' def revtree(args, repo, full="tree", max'
146 # figure out which commits they are asking for and which ones they
146 # figure out which commits they are asking for and which ones they
147 # want us to stop on
147 # want us to stop on
148 for i in range(len(args)):
148 for i in range(len(args)):
149 if args[i].count('^'):
149 if args[i].startswith('^'):
150 s = args[i].split('^')[1]
150 s = repo.lookup(args[i][1:])
151 stop_sha1.append(repo.changelog.lookup(s))
151 stop_sha1.append(s)
152 want_sha1.append(s)
152 want_sha1.append(s)
153 elif args[i] != 'HEAD':
153 elif args[i] != 'HEAD':
154 want_sha1.append(args[i])
154 want_sha1.append(repo.lookup(args[i]))
155
155
156 # calculate the graph for the supplied commits
156 # calculate the graph for the supplied commits
157 for i in range(len(want_sha1)):
157 for i in range(len(want_sha1)):
158 reachable.append({});
158 reachable.append({});
159 n = repo.changelog.lookup(want_sha1[i]);
159 n = want_sha1[i];
160 visit = [n];
160 visit = [n];
161 reachable[i][n] = 1
161 reachable[i][n] = 1
162 while visit:
162 while visit:
@@ -224,7 +224,7 b' def help():'
224 sys.stderr.write(" hgit cat-file [type] sha1\n")
224 sys.stderr.write(" hgit cat-file [type] sha1\n")
225 sys.stderr.write(" hgit diff-tree [-p] [-r] sha1 sha1\n")
225 sys.stderr.write(" hgit diff-tree [-p] [-r] sha1 sha1\n")
226 sys.stderr.write(" hgit rev-tree [sha1 ... [^stop sha1]]\n")
226 sys.stderr.write(" hgit rev-tree [sha1 ... [^stop sha1]]\n")
227 sys.stderr.write(" hgit rev-list [-c]\n")
227 sys.stderr.write(" hgit rev-list [-c] [sha1 [stop sha1]\n")
228
228
229 cmd = sys.argv[1]
229 cmd = sys.argv[1]
230 args = sys.argv[2:]
230 args = sys.argv[2:]
General Comments 0
You need to be logged in to leave comments. Login now