Mercurial > hg
changeset 9997:c08583734fc5
Merge with stable
author | Sune Foldager <cryo@cyanite.org> |
---|---|
date | Thu, 03 Dec 2009 11:07:14 +0100 |
parents | 931d2c757627 (current diff) 2770d03ae49f (diff) |
children | 4a3c388f8c69 |
files | |
diffstat | 8 files changed, 44 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/transplant.py Thu Dec 03 06:35:39 2009 +0100 +++ b/hgext/transplant.py Thu Dec 03 11:07:14 2009 +0100 @@ -227,8 +227,6 @@ finally: files = patch.updatedir(self.ui, repo, files) except Exception, inst: - if filter: - os.unlink(patchfile) seriespath = os.path.join(self.path, 'series') if os.path.exists(seriespath): os.unlink(seriespath)
--- a/mercurial/util.py Thu Dec 03 06:35:39 2009 +0100 +++ b/mercurial/util.py Thu Dec 03 11:07:14 2009 +0100 @@ -1197,7 +1197,19 @@ if path.startswith(sc): path = path[len(sc):] if path.startswith('//'): - path = path[2:] + if scheme == 'file': + i = path.find('/', 2) + if i == -1: + return '' + # On Windows, absolute paths are rooted at the current drive + # root. On POSIX they are rooted at the file system root. + if os.name == 'nt': + droot = os.path.splitdrive(os.getcwd())[0] + '/' + path = os.path.join(droot, path[i+1:]) + else: + path = path[i:] + else: + path = path[2:] return path def uirepr(s):
--- a/tests/test-clone Thu Dec 03 06:35:39 2009 +0100 +++ b/tests/test-clone Thu Dec 03 11:07:14 2009 +0100 @@ -44,10 +44,10 @@ hg cat a echo -echo % "check that we drop the file:// from the path before" +echo % "check that we drop the file: from the path before" echo % "writing the .hgrc" cd ../.. -hg clone file://a e +hg clone file:a e grep 'file:' e/.hg/hgrc echo
--- a/tests/test-clone.out Thu Dec 03 06:35:39 2009 +0100 +++ b/tests/test-clone.out Thu Dec 03 11:07:14 2009 +0100 @@ -29,7 +29,7 @@ 2 files updated, 0 files merged, 0 files removed, 0 files unresolved a -% check that we drop the file:// from the path before +% check that we drop the file: from the path before % writing the .hgrc updating to branch default 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
--- a/tests/test-pull Thu Dec 03 06:35:39 2009 +0100 +++ b/tests/test-pull Thu Dec 03 11:07:14 2009 +0100 @@ -24,3 +24,8 @@ hg init empty cd empty hg pull -u ../test + +echo % test file: uri handling +hg pull -q file://../test-doesnt-exist +hg pull -q file:../test +hg pull -q file://foobar`pwd`/../test
--- a/tests/test-pull.out Thu Dec 03 06:35:39 2009 +0100 +++ b/tests/test-pull.out Thu Dec 03 11:07:14 2009 +0100 @@ -30,3 +30,5 @@ adding file changes added 1 changesets with 1 changes to 1 files 1 files updated, 0 files merged, 0 files removed, 0 files unresolved +% test file: uri handling +abort: repository /test-doesnt-exist not found!
--- a/tests/test-transplant Thu Dec 03 06:35:39 2009 +0100 +++ b/tests/test-transplant Thu Dec 03 11:07:14 2009 +0100 @@ -136,6 +136,15 @@ hg log --template '{rev} {parents} {desc}\n' cd .. +echo '% test filter with failed patch' +cd filter +hg up 0 +echo foo > b1 +hg ci -d '0 0' -Am foo +hg transplant 1 --filter ./test-filter |\ + sed 's/filtering.*/filtering/g' +cd .. + echo '% test with a win32ext like setup (differing EOLs)' hg init twin1 cd twin1 @@ -156,4 +165,4 @@ hg ci -m addb hg transplant -s ../twin1 tip python -c "print repr(file('b', 'rb').read())" -cd .. \ No newline at end of file +cd ..
--- a/tests/test-transplant.out Thu Dec 03 06:35:39 2009 +0100 +++ b/tests/test-transplant.out Thu Dec 03 11:07:14 2009 +0100 @@ -159,6 +159,17 @@ 2 b2 1 b1 0 r2 +% test filter with failed patch +0 files updated, 0 files merged, 3 files removed, 0 files unresolved +adding b1 +adding test-filter +created new head +file b1 already exists +1 out of 1 hunks FAILED -- saving rejects to file b1.rej +abort: Fix up the merge and run hg transplant --continue +filtering +applying 348b36d0b6a5 +patch failed to apply % test with a win32ext like setup (differing EOLs) adding a adding b