##// END OF EJS Templates
localrepo: use the path relative to "self.vfs" instead of "path" argument...
localrepo: use the path relative to "self.vfs" instead of "path" argument As a part of migration to vfs, this patch uses "self.root", which can be recognized as the path relative to "self.vfs", instead of "path" argument. This fix allows to make invocations of "util.makedirs()" and "os.path.exists()" while ensuring repository directory in "localrepository.__init__()" ones indirectly via vfs. But this fix also raises issue 2528: "hg clone" with empty destination. "path" argument is empty in many cases, so this issue can't be fixed in the view of "localrepository.__init__()". Before this patch, it is fixed by empty-ness check ("not name") of exception handler in "util.makedirs()". try: os.mkdir(name) except OSError, err: if err.errno == errno.EEXIST: return if err.errno != errno.ENOENT or not name: raise This requires "localrepository.__init__()" to invoke "util.makedirs()" with "path" instead of "self.root", because empty "path" is treated as "current directory" and "self.root" becomes valid path. But "hg clone" with empty destination can be detected also in "hg.clone()" before "localrepository.__init__()" invocation, so this patch re-fixes issue2528 by checking it in "hg.clone()".

File last commit:

r14485:610873cf default
r17159:36a30168 default
Show More
test-merge5.t
37 lines | 1012 B | text/troff | Tads3Lexer
Pradeepkumar Gayam
tests: unify test-merge5
r11978 $ hg init
$ echo This is file a1 > a
$ echo This is file b1 > b
$ hg add a b
Martin Geisler
test-merge5: removed unnecessary parts of test...
r12155 $ hg commit -m "commit #0"
Pradeepkumar Gayam
tests: unify test-merge5
r11978 $ echo This is file b22 > b
Martin Geisler
test-merge5: removed unnecessary parts of test...
r12155 $ hg commit -m "comment #1"
Pradeepkumar Gayam
tests: unify test-merge5
r11978 $ hg update 0
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ rm b
Martin Geisler
test-merge5: removed unnecessary parts of test...
r12155 $ hg commit -A -m "comment #2"
Pradeepkumar Gayam
tests: unify test-merge5
r11978 removing b
created new head
Brodie Rao
test-merge5: ensure updating to tip across branches is tested...
r12154 $ hg update 1
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg update
Brendan Cully
Make pull -u behave like pull && update...
r14485 abort: crosses branches (merge branches or update --check to force update)
Matt Mackall
tests: add exit codes to unified tests
r12316 [255]
Brodie Rao
test-merge5: ensure updating to tip across branches is tested...
r12154 $ hg update -c
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
Pradeepkumar Gayam
tests: unify test-merge5
r11978 $ mv a c
Martin Geisler
test-merge5: removed unnecessary parts of test...
r12155 In theory, we shouldn't need the "-y" below, but it prevents this test
from hanging when "hg update" erroneously prompts the user for "keep
or delete".
Should abort:
Pradeepkumar Gayam
tests: unify test-merge5
r11978 $ hg update -y 1
Brodie Rao
update: use higher level wording for "crosses branches" error...
r12681 abort: crosses branches (merge branches or use --clean to discard changes)
Matt Mackall
tests: add exit codes to unified tests
r12316 [255]
Pradeepkumar Gayam
tests: unify test-merge5
r11978 $ mv c a
Martin Geisler
test-merge5: removed unnecessary parts of test...
r12155
Should succeed:
Pradeepkumar Gayam
tests: unify test-merge5
r11978 $ hg update -y 1
1 files updated, 0 files merged, 0 files removed, 0 files unresolved