[PATCH] Support path aliases in qclone -p path

John Mulligan phlogistonjohn at asynchrono.us
Sun Jan 25 13:08:05 CST 2009


# HG changeset patch
# User John Mulligan <phlogistonjohn at asynchrono.us>
# Date 1232909355 18000
# Node ID 0255f19521aaca1f4a22566390eeb21ebf19b0b2
# Parent  bd523abb57d638463ab9d5a76b17ac9680c58df5
mq: allow qlone's -p option to use path alias

Add support for running 'hg qclone -p foo bar' where foo is a path
alias defined in the [paths] section of an hgrc file.

diff --git a/hgext/mq.py b/hgext/mq.py
--- a/hgext/mq.py
+++ b/hgext/mq.py
@@ -1737,7 +1737,10 @@
     if dest is None:
         dest = hg.defaultdest(source)
     sr = hg.repository(ui, ui.expandpath(source))
-    patchespath = opts['patches'] or patchdir(sr)
+    if opts['patches']:
+        patchespath = ui.expandpath(opts['patches'])
+    else:
+        patchespath = patchdir(sr)
     try:
         pr = hg.repository(ui, patchespath)
     except error.RepoError:


More information about the Mercurial-devel mailing list