##// END OF EJS Templates
Merge with stable
Sune Foldager -
r9997:c0858373 merge default
parent child Browse files
Show More
@@ -227,8 +227,6 b' class transplanter(object):'
227 finally:
227 finally:
228 files = patch.updatedir(self.ui, repo, files)
228 files = patch.updatedir(self.ui, repo, files)
229 except Exception, inst:
229 except Exception, inst:
230 if filter:
231 os.unlink(patchfile)
232 seriespath = os.path.join(self.path, 'series')
230 seriespath = os.path.join(self.path, 'series')
233 if os.path.exists(seriespath):
231 if os.path.exists(seriespath):
234 os.unlink(seriespath)
232 os.unlink(seriespath)
@@ -1197,7 +1197,19 b' def drop_scheme(scheme, path):'
1197 if path.startswith(sc):
1197 if path.startswith(sc):
1198 path = path[len(sc):]
1198 path = path[len(sc):]
1199 if path.startswith('//'):
1199 if path.startswith('//'):
1200 path = path[2:]
1200 if scheme == 'file':
1201 i = path.find('/', 2)
1202 if i == -1:
1203 return ''
1204 # On Windows, absolute paths are rooted at the current drive
1205 # root. On POSIX they are rooted at the file system root.
1206 if os.name == 'nt':
1207 droot = os.path.splitdrive(os.getcwd())[0] + '/'
1208 path = os.path.join(droot, path[i+1:])
1209 else:
1210 path = path[i:]
1211 else:
1212 path = path[2:]
1201 return path
1213 return path
1202
1214
1203 def uirepr(s):
1215 def uirepr(s):
@@ -44,10 +44,10 b' cd a'
44 hg cat a
44 hg cat a
45
45
46 echo
46 echo
47 echo % "check that we drop the file:// from the path before"
47 echo % "check that we drop the file: from the path before"
48 echo % "writing the .hgrc"
48 echo % "writing the .hgrc"
49 cd ../..
49 cd ../..
50 hg clone file://a e
50 hg clone file:a e
51 grep 'file:' e/.hg/hgrc
51 grep 'file:' e/.hg/hgrc
52
52
53 echo
53 echo
@@ -29,7 +29,7 b' updating to branch default'
29 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
29 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
30 a
30 a
31
31
32 % check that we drop the file:// from the path before
32 % check that we drop the file: from the path before
33 % writing the .hgrc
33 % writing the .hgrc
34 updating to branch default
34 updating to branch default
35 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
35 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
@@ -24,3 +24,8 b' cd ..'
24 hg init empty
24 hg init empty
25 cd empty
25 cd empty
26 hg pull -u ../test
26 hg pull -u ../test
27
28 echo % test file: uri handling
29 hg pull -q file://../test-doesnt-exist
30 hg pull -q file:../test
31 hg pull -q file://foobar`pwd`/../test
@@ -30,3 +30,5 b' adding manifests'
30 adding file changes
30 adding file changes
31 added 1 changesets with 1 changes to 1 files
31 added 1 changesets with 1 changes to 1 files
32 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
32 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
33 % test file: uri handling
34 abort: repository /test-doesnt-exist not found!
@@ -136,6 +136,15 b' hg transplant -s ../t -b tip -a --filter'
136 hg log --template '{rev} {parents} {desc}\n'
136 hg log --template '{rev} {parents} {desc}\n'
137 cd ..
137 cd ..
138
138
139 echo '% test filter with failed patch'
140 cd filter
141 hg up 0
142 echo foo > b1
143 hg ci -d '0 0' -Am foo
144 hg transplant 1 --filter ./test-filter |\
145 sed 's/filtering.*/filtering/g'
146 cd ..
147
139 echo '% test with a win32ext like setup (differing EOLs)'
148 echo '% test with a win32ext like setup (differing EOLs)'
140 hg init twin1
149 hg init twin1
141 cd twin1
150 cd twin1
@@ -156,4 +165,4 b' python -c "file(\'b\', \'wb\').write(\'b\\r\\nb'
156 hg ci -m addb
165 hg ci -m addb
157 hg transplant -s ../twin1 tip
166 hg transplant -s ../twin1 tip
158 python -c "print repr(file('b', 'rb').read())"
167 python -c "print repr(file('b', 'rb').read())"
159 cd .. No newline at end of file
168 cd ..
@@ -159,6 +159,17 b' 3 b3'
159 2 b2
159 2 b2
160 1 b1
160 1 b1
161 0 r2
161 0 r2
162 % test filter with failed patch
163 0 files updated, 0 files merged, 3 files removed, 0 files unresolved
164 adding b1
165 adding test-filter
166 created new head
167 file b1 already exists
168 1 out of 1 hunks FAILED -- saving rejects to file b1.rej
169 abort: Fix up the merge and run hg transplant --continue
170 filtering
171 applying 348b36d0b6a5
172 patch failed to apply
162 % test with a win32ext like setup (differing EOLs)
173 % test with a win32ext like setup (differing EOLs)
163 adding a
174 adding a
164 adding b
175 adding b
General Comments 0
You need to be logged in to leave comments. Login now