comparison tests/test-revset-outgoing.t @ 22837:2be7d5ebd4d0

config: use the same hgrc for a cloned repo as for an uninitted repo This just copies the same local sample hgrc, except it sets the default path to the repo it was cloned from. This is cut-and-paste from the local sample hgrc, but I think it's acceptable, since the two pieces of code are right next to each other and they're small. There is danger of them going out of synch, but it would complicate the code too much to get rid of this C&P. I also add ui as an import to hg.py, but with demandimport, this should not be a noticeable performance hit.
author Jordi Gutiérrez Hermoso <jordigh@octave.org>
date Mon, 06 Oct 2014 16:35:02 -0400
parents 82b2ba904e3e
children f41dd17ae6b7
comparison
equal deleted inserted replaced
22836:5a831e4e6d7a 22837:2be7d5ebd4d0
34 34
35 $ hg clone -q a#stable b 35 $ hg clone -q a#stable b
36 36
37 $ cd b 37 $ cd b
38 $ cat .hg/hgrc 38 $ cat .hg/hgrc
39 # You may want to set your username here if it is not set 39 # example repository config (see "hg help config" for more info)
40 # globally, or this repository requires a different 40 [paths]
41 # username from your usual configuration. If you want to 41 default = $TESTTMP/a#stable
42 # set something for all of your repositories on this 42
43 # computer, try running the command 43 # path aliases to other clones of this repo in URLs or filesystem paths
44 # 'hg config --edit --global' 44 # (see "hg help config.paths" for more info)
45 # [ui] 45 #
46 # default-push = ssh://jdoe@example.net/hg/jdoes-fork
47 # my-fork = ssh://jdoe@example.net/hg/jdoes-fork
48 # my-clone = /home/jdoe/jdoes-clone
49
50 [ui]
51 # name and email (local to this repository, optional), e.g.
46 # username = Jane Doe <jdoe@example.com> 52 # username = Jane Doe <jdoe@example.com>
47 [paths]
48 default = $TESTTMP/a#stable (glob)
49 53
50 $ echo red >> a 54 $ echo red >> a
51 $ hg ci -qm3 55 $ hg ci -qm3
52 56
53 $ hg up -q default 57 $ hg up -q default
82 3:f0461977a3db: '4' 86 3:f0461977a3db: '4'
83 87
84 $ echo "green = ../a#default" >> .hg/hgrc 88 $ echo "green = ../a#default" >> .hg/hgrc
85 89
86 $ cat .hg/hgrc 90 $ cat .hg/hgrc
87 # You may want to set your username here if it is not set 91 # example repository config (see "hg help config" for more info)
88 # globally, or this repository requires a different 92 [paths]
89 # username from your usual configuration. If you want to 93 default = $TESTTMP/a#stable
90 # set something for all of your repositories on this 94
91 # computer, try running the command 95 # path aliases to other clones of this repo in URLs or filesystem paths
92 # 'hg config --edit --global' 96 # (see "hg help config.paths" for more info)
93 # [ui] 97 #
98 # default-push = ssh://jdoe@example.net/hg/jdoes-fork
99 # my-fork = ssh://jdoe@example.net/hg/jdoes-fork
100 # my-clone = /home/jdoe/jdoes-clone
101
102 [ui]
103 # name and email (local to this repository, optional), e.g.
94 # username = Jane Doe <jdoe@example.com> 104 # username = Jane Doe <jdoe@example.com>
95 [paths]
96 default = $TESTTMP/a#stable (glob)
97 green = ../a#default 105 green = ../a#default
98 106
99 $ hg tout green 107 $ hg tout green
100 comparing with $TESTTMP/a (glob) 108 comparing with green
101 searching for changes 109 abort: repository green not found!
102 3:f0461977a3db: '4' 110 [255]
103 111
104 $ hg tlog -r 'outgoing("green")' 112 $ hg tlog -r 'outgoing("green")'
105 3:f0461977a3db: '4' 113 abort: repository green not found!
114 [255]
106 115
107 $ cd .. 116 $ cd ..