##// END OF EJS Templates
merge default heads in crew and main
Martin Geisler -
r13126:e76701bf merge default
parent child Browse files
Show More
@@ -333,6 +333,8 b' class hgsubrepo(abstractsubrepo):'
333
333
334 def addpathconfig(key, value):
334 def addpathconfig(key, value):
335 if value:
335 if value:
336 if not os.path.isabs(value):
337 value = os.path.relpath(os.path.abspath(value), root)
336 fp.write('%s = %s\n' % (key, value))
338 fp.write('%s = %s\n' % (key, value))
337 self._repo.ui.setconfig('paths', key, value)
339 self._repo.ui.setconfig('paths', key, value)
338
340
@@ -67,3 +67,58 b" subrepo debug for 'main' clone"
67 revision 863c1745b441bd97a8c4a096e87793073f4fb215
67 revision 863c1745b441bd97a8c4a096e87793073f4fb215
68
68
69 $ "$TESTDIR/killdaemons.py"
69 $ "$TESTDIR/killdaemons.py"
70
71
72 Create repo with nested relative subrepos
73
74 $ hg init r1
75 $ hg init r1/sub
76 $ echo sub = sub > r1/.hgsub
77 $ hg add --cwd r1 .hgsub
78 $ hg init r1/sub/subsub
79 $ echo subsub = subsub > r1/sub/.hgsub
80 $ hg add --cwd r1/sub .hgsub
81 $ echo c1 > r1/sub/subsub/f
82 $ hg add --cwd r1/sub/subsub f
83 $ hg ci --cwd r1 -m0
84 committing subrepository sub
85 committing subrepository sub/subsub
86
87 Ensure correct relative paths are used when pulling
88
89 $ hg init r2
90 $ cd r2/
91 $ hg pull -u ../r1
92 pulling from ../r1
93 requesting all changes
94 adding changesets
95 adding manifests
96 adding file changes
97 added 1 changesets with 2 changes to 2 files
98 pulling subrepo sub from ../r1/sub
99 requesting all changes
100 adding changesets
101 adding manifests
102 adding file changes
103 added 1 changesets with 2 changes to 2 files
104 pulling subrepo sub/subsub from ../r1/sub/subsub
105 requesting all changes
106 adding changesets
107 adding manifests
108 adding file changes
109 added 1 changesets with 1 changes to 1 files
110 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
111 $ cd ..
112
113 Verify subrepo default paths were set correctly
114
115 $ hg -R r2/sub paths
116 default = $TESTTMP/r1/sub
117 $ cat r2/sub/.hg/hgrc
118 [paths]
119 default = ../../r1/sub
120 $ hg -R r2/sub/subsub paths
121 default = $TESTTMP/r1/sub/subsub
122 $ cat r2/sub/subsub/.hg/hgrc
123 [paths]
124 default = ../../../r1/sub/subsub
General Comments 0
You need to be logged in to leave comments. Login now