2852 return url + b'/.hg/patches' |
2852 return url + b'/.hg/patches' |
2853 |
2853 |
2854 # main repo (destination and sources) |
2854 # main repo (destination and sources) |
2855 if dest is None: |
2855 if dest is None: |
2856 dest = hg.defaultdest(source) |
2856 dest = hg.defaultdest(source) |
2857 __, source_path, __ = urlutil.get_clone_path(ui, source) |
2857 source_path = urlutil.get_clone_path_obj(ui, source) |
2858 sr = hg.peer(ui, opts, source_path) |
2858 sr = hg.peer(ui, opts, source_path) |
2859 |
2859 |
2860 # patches repo (source only) |
2860 # patches repo (source only) |
2861 if opts.get(b'patches'): |
2861 if opts.get(b'patches'): |
2862 __, patchespath, __ = urlutil.get_clone_path(ui, opts.get(b'patches')) |
2862 patches_path = urlutil.get_clone_path_obj(ui, opts.get(b'patches')) |
2863 else: |
2863 else: |
2864 patchespath = patchdir(sr) |
2864 # XXX path: we should turn this into a path object |
|
2865 patches_path = patchdir(sr) |
2865 try: |
2866 try: |
2866 hg.peer(ui, opts, patchespath) |
2867 hg.peer(ui, opts, patches_path) |
2867 except error.RepoError: |
2868 except error.RepoError: |
2868 raise error.Abort( |
2869 raise error.Abort( |
2869 _(b'versioned patch repository not found (see init --mq)') |
2870 _(b'versioned patch repository not found (see init --mq)') |
2870 ) |
2871 ) |
2871 qbase, destrev = None, None |
2872 qbase, destrev = None, None |