comparison tests/test-default-push.t @ 27555:ca8ada499529 stable

push: restore old behavior of default-push (issue5000) This effectively backs out dceaef70e410 and 10917b062adf. We can't handle "default-push" just like "default:pushurl" because it is a stand-alone named path. Instead, I have two ideas to work around the issue: a. two defaults: getpath(dest, default=('default-push', 'default')) b. virtual path: getpath(dest, default=':default') (a) is conservative approach and will have less trouble, but callers have to specify they need "default-push" or "default". (b) generates hidden ":default" path from "default" and "default-push", and callers request ":default". This will require some tricks and won't work if there are conflicting sub-options valid for both "pull" and "push". I'll take (a) for default branch. This patch should NOT BE MERGED to default except for tests because it would break handling of "pushurl" sub-option.
author Yuya Nishihara <yuya@tcha.org>
date Sat, 26 Dec 2015 15:18:16 +0900
parents 71d5238f92e9
children 44f717c87903
comparison
equal deleted inserted replaced
27532:1be02894dd6f 27555:ca8ada499529
44 adding changesets 44 adding changesets
45 adding manifests 45 adding manifests
46 adding file changes 46 adding file changes
47 added 1 changesets with 1 changes to 1 files 47 added 1 changesets with 1 changes to 1 files
48 48
49 But push should push to 'default' if explicitly specified (issue5000):
50
51 $ hg --cwd b push default
52 pushing to $TESTTMP/a (glob)
53 searching for changes
54 no changes found
55 [1]
56
49 Push should push to 'default-push' when 'default' is not set 57 Push should push to 'default-push' when 'default' is not set
50 58
51 $ hg -q clone a push-default-only 59 $ hg -q clone a push-default-only
52 $ cd push-default-only 60 $ cd push-default-only
53 $ rm .hg/hgrc 61 $ rm .hg/hgrc