equal
deleted
inserted
replaced
622 copy = False |
622 copy = False |
623 if other.dev() != -1: |
623 if other.dev() != -1: |
624 abspath = os.path.abspath(source) |
624 abspath = os.path.abspath(source) |
625 if not opts['pull']: |
625 if not opts['pull']: |
626 copy = True |
626 copy = True |
627 |
627 |
628 if copy: |
628 if copy: |
629 try: |
629 try: |
630 # we use a lock here because if we race with commit, we |
630 # we use a lock here because if we race with commit, we |
631 # can end up with extra data in the cloned revlogs that's |
631 # can end up with extra data in the cloned revlogs that's |
632 # not pointed to by changesets, thus causing verify to |
632 # not pointed to by changesets, thus causing verify to |
650 |
650 |
651 else: |
651 else: |
652 repo = hg.repository(ui, dest, create=1) |
652 repo = hg.repository(ui, dest, create=1) |
653 repo.pull(other) |
653 repo.pull(other) |
654 |
654 |
655 f = repo.opener("hgrc", "w") |
655 f = repo.opener("hgrc", "w", text=True) |
656 f.write("[paths]\n") |
656 f.write("[paths]\n") |
657 f.write("default = %s\n" % abspath) |
657 f.write("default = %s\n" % abspath) |
658 |
658 |
659 if not opts['noupdate']: |
659 if not opts['noupdate']: |
660 update(ui, repo) |
660 update(ui, repo) |