##// END OF EJS Templates
Fix tabs...
mpm@selenic.com -
r62:022d98aa default
parent child Browse files
Show More
@@ -1,7 +1,7 b''
1 #!/usr/bin/env python
1 #!/usr/bin/env python
2 #
2 #
3 # mercurial - a minimal scalable distributed SCM
3 # mercurial - a minimal scalable distributed SCM
4 # v0.4d "oedipa maas"
4 # v0.4e "sabina"
5 #
5 #
6 # Copyright 2005 Matt Mackall <mpm@selenic.com>
6 # Copyright 2005 Matt Mackall <mpm@selenic.com>
7 #
7 #
@@ -147,11 +147,11 b' elif cmd == "import" or cmd == "patch":'
147 ui.status("applying %s\n" % patch)
147 ui.status("applying %s\n" % patch)
148 pf = os.path.join(d, patch)
148 pf = os.path.join(d, patch)
149
149
150 text = ""
150 text = ""
151 for l in file(pf):
151 for l in file(pf):
152 if l[:3] == "---": break
152 if l[:3] == "---": break
153 text += l
153 text += l
154
154
155 if os.system("patch -p%d < %s %s" % (strip, pf, quiet)):
155 if os.system("patch -p%d < %s %s" % (strip, pf, quiet)):
156 raise "patch failed!"
156 raise "patch failed!"
157 f = os.popen("lsdiff --strip %d %s" % (strip, pf))
157 f = os.popen("lsdiff --strip %d %s" % (strip, pf))
@@ -188,23 +188,13 b' elif cmd == "export":'
188
188
189 elif cmd == "debugchangegroup":
189 elif cmd == "debugchangegroup":
190 newer = repo.newer(map(repo.changelog.lookup, args))
190 newer = repo.newer(map(repo.changelog.lookup, args))
191 cg = repo.changegroup(newer)
191 for chunk in repo.changegroup(newer):
192 sys.stdout.write(cg)
192 sys.stdout.write(chunk)
193
193
194 elif cmd == "debugaddchangegroup":
194 elif cmd == "debugaddchangegroup":
195 data = sys.stdin.read()
195 data = sys.stdin.read()
196 repo.addchangegroup(data)
196 repo.addchangegroup(data)
197
197
198 elif cmd == "debuggetchangegroup":
199 if args:
200 other = hg.repository(ui, args[0])
201 print "building changegroup"
202 cg = repo.getchangegroup(other)
203 print "applying changegroup"
204 repo.addchangegroup(cg)
205 else:
206 print "missing source repository"
207
208 elif cmd == "addremove":
198 elif cmd == "addremove":
209 (c, a, d) = repo.diffdir(repo.root, repo.current)
199 (c, a, d) = repo.diffdir(repo.root, repo.current)
210 repo.add(a)
200 repo.add(a)
@@ -283,6 +273,15 b' elif cmd == "debugindex":'
283 elif cmd == "merge":
273 elif cmd == "merge":
284 if args:
274 if args:
285 other = hg.repository(ui, args[0])
275 other = hg.repository(ui, args[0])
276 print "retrieving changegroup"
277 cg = repo.getchangegroup(other)
278 repo.addchangegroup(cg)
279 else:
280 print "missing source repository"
281
282 elif cmd == "debugoldmerge":
283 if args:
284 other = hg.repository(ui, args[0])
286 repo.merge(other)
285 repo.merge(other)
287 else:
286 else:
288 print "missing source repository"
287 print "missing source repository"
General Comments 0
You need to be logged in to leave comments. Login now