diff --git a/mercurial/ui.py b/mercurial/ui.py
--- a/mercurial/ui.py
+++ b/mercurial/ui.py
@@ -204,7 +204,8 @@ class ui(object):
pathsitems = items
for n, path in pathsitems:
if path and "://" not in path and not os.path.isabs(path):
- cdata.set("paths", n, os.path.join(root, path))
+ cdata.set("paths", n,
+ os.path.normpath(os.path.join(root, path)))
# update verbosity/interactive/report_untrusted settings
if section is None or section == 'ui':
diff --git a/tests/test-keyword.out b/tests/test-keyword.out
--- a/tests/test-keyword.out
+++ b/tests/test-keyword.out
@@ -293,7 +293,7 @@ adding file changes
added 1 changesets with 3 changes to 3 files
3 files updated, 0 files merged, 0 files removed, 0 files unresolved
% incoming
-comparing with test-keyword/Test-a/../Test
+comparing with test-keyword/Test
searching for changes
changeset: 1:0729690beff6
tag: tip
diff --git a/tests/test-paths b/tests/test-paths
new file mode 100755
--- /dev/null
+++ b/tests/test-paths
@@ -0,0 +1,11 @@
+#!/bin/sh
+base=`pwd`
+hg init a
+hg clone a b
+cd a
+echo '[paths]' >> .hg/hgrc
+echo 'dupe = ../b' >> .hg/hgrc
+hg in dupe | sed "s!$base!!g"
+cd ..
+hg -R a in dupe | sed "s!$base!!g"
+true
diff --git a/tests/test-paths.out b/tests/test-paths.out
new file mode 100644
--- /dev/null
+++ b/tests/test-paths.out
@@ -0,0 +1,5 @@
+0 files updated, 0 files merged, 0 files removed, 0 files unresolved
+comparing with /b
+no changes found
+comparing with /b
+no changes found