Mercurial > public > mercurial-scm > hg-stable
diff mercurial/cmdutil.py @ 24259:5ac8ce04baa2
cmdutil.tryimportone: allow importing relative patches into the working dir
This makes hg import --prefix dir/ (without bypass) work.
author | Siddharth Agarwal <sid0@fb.com> |
---|---|
date | Mon, 09 Mar 2015 18:22:24 -0700 |
parents | 02d7b5cd373b |
children | 76225ab5a5da |
line wrap: on
line diff
--- a/mercurial/cmdutil.py Fri Mar 06 22:56:19 2015 -0800 +++ b/mercurial/cmdutil.py Mon Mar 09 18:22:24 2015 -0700 @@ -615,6 +615,7 @@ update = not opts.get('bypass') strip = opts["strip"] + prefix = opts["prefix"] sim = float(opts.get('similarity') or 0) if not tmpname: return (None, None, False) @@ -674,8 +675,8 @@ partial = opts.get('partial', False) files = set() try: - patch.patch(ui, repo, tmpname, strip=strip, files=files, - eolmode=None, similarity=sim / 100.0) + patch.patch(ui, repo, tmpname, strip=strip, prefix=prefix, + files=files, eolmode=None, similarity=sim / 100.0) except patch.PatchError, e: if not partial: raise util.Abort(str(e))