##// END OF EJS Templates
Ensure that absolutized paths from hgrc do not contain ../ segments.
Jesse Glick -
r5943:ffaf2419 default
parent child Browse files
Show More
@@ -0,0 +1,11 b''
1 #!/bin/sh
2 base=`pwd`
3 hg init a
4 hg clone a b
5 cd a
6 echo '[paths]' >> .hg/hgrc
7 echo 'dupe = ../b' >> .hg/hgrc
8 hg in dupe | sed "s!$base!<base>!g"
9 cd ..
10 hg -R a in dupe | sed "s!$base!<base>!g"
11 true
@@ -0,0 +1,5 b''
1 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
2 comparing with <base>/b
3 no changes found
4 comparing with <base>/b
5 no changes found
@@ -204,7 +204,8 b' class ui(object):'
204 pathsitems = items
204 pathsitems = items
205 for n, path in pathsitems:
205 for n, path in pathsitems:
206 if path and "://" not in path and not os.path.isabs(path):
206 if path and "://" not in path and not os.path.isabs(path):
207 cdata.set("paths", n, os.path.join(root, path))
207 cdata.set("paths", n,
208 os.path.normpath(os.path.join(root, path)))
208
209
209 # update verbosity/interactive/report_untrusted settings
210 # update verbosity/interactive/report_untrusted settings
210 if section is None or section == 'ui':
211 if section is None or section == 'ui':
@@ -293,7 +293,7 b' adding file changes'
293 added 1 changesets with 3 changes to 3 files
293 added 1 changesets with 3 changes to 3 files
294 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
294 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
295 % incoming
295 % incoming
296 comparing with test-keyword/Test-a/../Test
296 comparing with test-keyword/Test
297 searching for changes
297 searching for changes
298 changeset: 1:0729690beff6
298 changeset: 1:0729690beff6
299 tag: tip
299 tag: tip
General Comments 0
You need to be logged in to leave comments. Login now