##// END OF EJS Templates
merge with stable
Henrik Stuart -
r12615:64db820c merge default
parent child Browse files
Show More
@@ -0,0 +1,92 b''
1 $ cat >> $HGRCPATH <<EOF
2 > [extensions]
3 > graphlog=
4 >
5 > [alias]
6 > tlog = log --template "{rev}:{node|short}: '{desc}' {branches}\n"
7 > tglog = tlog -G
8 > tout = out --template "{rev}:{node|short}: '{desc}' {branches}\n"
9 > EOF
10
11 $ hg init a
12 $ cd a
13
14 $ echo a > a
15 $ hg ci -Aqm0
16
17 $ echo foo >> a
18 $ hg ci -Aqm1
19
20 $ hg up -q 0
21
22 $ hg branch stable
23 marked working directory as branch stable
24 $ echo bar >> a
25 $ hg ci -qm2
26
27 $ hg tglog
28 @ 2:7bee6c3bea3a: '2' stable
29 |
30 | o 1:3560197d8331: '1'
31 |/
32 o 0:f7b1eb17ad24: '0'
33
34
35 $ cd ..
36
37 $ hg clone -q a#stable b
38
39 $ cd b
40 $ cat .hg/hgrc
41 [paths]
42 default = */a#stable (glob)
43
44 $ echo red >> a
45 $ hg ci -qm3
46
47 $ hg up -q default
48
49 $ echo blue >> a
50 $ hg ci -qm4
51
52 $ hg tglog
53 @ 3:f0461977a3db: '4'
54 |
55 | o 2:1d4099801a4e: '3' stable
56 | |
57 | o 1:7bee6c3bea3a: '2' stable
58 |/
59 o 0:f7b1eb17ad24: '0'
60
61
62 $ hg tout
63 comparing with */a (glob)
64 searching for changes
65 2:1d4099801a4e: '3' stable
66
67 $ hg tlog -r 'outgoing()'
68 2:1d4099801a4e: '3' stable
69
70 $ hg tout ../a#default
71 comparing with ../a
72 searching for changes
73 3:f0461977a3db: '4'
74
75 $ hg tlog -r 'outgoing("../a#default")'
76 3:f0461977a3db: '4'
77
78 $ echo "green = ../a#default" >> .hg/hgrc
79
80 $ cat .hg/hgrc
81 [paths]
82 default = */a#stable (glob)
83 green = ../a#default
84
85 $ hg tout green
86 comparing with */a (glob)
87 searching for changes
88 3:f0461977a3db: '4'
89
90 $ hg tlog -r 'outgoing("green")'
91 3:f0461977a3db: '4'
92
@@ -456,12 +456,15 b' def outgoing(repo, subset, x):'
456 dest = l and getstring(l[0], _("outgoing wants a repository path")) or ''
456 dest = l and getstring(l[0], _("outgoing wants a repository path")) or ''
457 dest = repo.ui.expandpath(dest or 'default-push', dest or 'default')
457 dest = repo.ui.expandpath(dest or 'default-push', dest or 'default')
458 dest, branches = hg.parseurl(dest)
458 dest, branches = hg.parseurl(dest)
459 revs, checkout = hg.addbranchrevs(repo, repo, branches, [])
460 if revs:
461 revs = [repo.lookup(rev) for rev in revs]
459 other = hg.repository(hg.remoteui(repo, {}), dest)
462 other = hg.repository(hg.remoteui(repo, {}), dest)
460 repo.ui.pushbuffer()
463 repo.ui.pushbuffer()
461 o = discovery.findoutgoing(repo, other)
464 o = discovery.findoutgoing(repo, other)
462 repo.ui.popbuffer()
465 repo.ui.popbuffer()
463 cl = repo.changelog
466 cl = repo.changelog
464 o = set([cl.rev(r) for r in repo.changelog.nodesbetween(o, None)[0]])
467 o = set([cl.rev(r) for r in repo.changelog.nodesbetween(o, revs)[0]])
465 return [r for r in subset if r in o]
468 return [r for r in subset if r in o]
466
469
467 def tagged(repo, subset, x):
470 def tagged(repo, subset, x):
General Comments 0
You need to be logged in to leave comments. Login now