Show More
@@ -334,13 +334,20 b' def init(ui, source=None):' | |||
|
334 | 334 | try: |
|
335 | 335 | os.remove(".hg/dirstate") |
|
336 | 336 | except: pass |
|
337 | ||
|
338 | repo = hg.repository(ui, ".") | |
|
339 | ||
|
337 | 340 | else: |
|
338 | 341 | repo = hg.repository(ui, ".", create=1) |
|
339 | 342 | other = hg.repository(ui, source) |
|
340 | 343 | cg = repo.getchangegroup(other) |
|
341 | 344 | repo.addchangegroup(cg) |
|
342 | 345 | else: |
|
343 | hg.repository(ui, ".", create=1) | |
|
346 | repo = hg.repository(ui, ".", create=1) | |
|
347 | ||
|
348 | f = repo.opener("hgrc", "w") | |
|
349 | f.write("[paths]\n") | |
|
350 | f.write("default = %s\n" % source) | |
|
344 | 351 | |
|
345 | 352 | def log(ui, repo, f): |
|
346 | 353 | """show the revision history of a single file""" |
@@ -409,7 +416,7 b' def patch(ui, repo, patch1, *patches, **' | |||
|
409 | 416 | raise "patch failed!" |
|
410 | 417 | repo.commit(files, text) |
|
411 | 418 | |
|
412 | def pull(ui, repo, source): | |
|
419 | def pull(ui, repo, source="default"): | |
|
413 | 420 | """pull changes from the specified source""" |
|
414 | 421 | paths = {} |
|
415 | 422 | for name, path in ui.configitems("paths"): |
General Comments 0
You need to be logged in to leave comments.
Login now