##// END OF EJS Templates
phases: marked content of a changegroup as published
Pierre-Yves David -
r15484:a44446ff default
parent child Browse files
Show More
@@ -0,0 +1,58 b''
1 $ cat >> $HGRCPATH <<EOF
2 > [extensions]
3 > graphlog=
4 > EOF
5 $ alias hgph='hg log --template "{rev} {phase} {desc}\n"'
6
7 $ mkcommit() {
8 > echo "$1" > "$1"
9 > hg add "$1"
10 > hg ci -m "$1"
11 > }
12
13 $ hg init alpha
14 $ cd alpha
15 $ mkcommit a-A
16 $ mkcommit a-B
17 $ mkcommit a-C
18 $ mkcommit a-D
19 $ hgph
20 3 1 a-D
21 2 1 a-C
22 1 1 a-B
23 0 1 a-A
24
25 $ hg init ../beta
26 $ hg push -r 1 ../beta
27 pushing to ../beta
28 searching for changes
29 adding changesets
30 adding manifests
31 adding file changes
32 added 2 changesets with 2 changes to 2 files
33 $ cd ../beta
34 $ hgph
35 1 0 a-B
36 0 0 a-A
37 $ hg up -q
38 $ mkcommit b-A
39 $ hgph
40 2 1 b-A
41 1 0 a-B
42 0 0 a-A
43 $ hg pull ../alpha
44 pulling from ../alpha
45 searching for changes
46 adding changesets
47 adding manifests
48 adding file changes
49 added 2 changesets with 2 changes to 2 files (+1 heads)
50 (run 'hg heads' to see heads, 'hg merge' to merge)
51 $ hgph
52 4 0 a-D
53 3 0 a-C
54 2 1 b-A
55 1 0 a-B
56 0 0 a-A
57
58
@@ -1978,6 +1978,9 b' class localrepository(repo.repository):'
1978 node=hex(cl.node(clstart)), source=srctype,
1978 node=hex(cl.node(clstart)), source=srctype,
1979 url=url, pending=p)
1979 url=url, pending=p)
1980
1980
1981 added = [cl.node(r) for r in xrange(clstart, clend)]
1982 if srctype != 'strip':
1983 phases.advanceboundary(self, 0, added)
1981 # make changelog see real files again
1984 # make changelog see real files again
1982 cl.finalize(trp)
1985 cl.finalize(trp)
1983
1986
@@ -1994,9 +1997,8 b' class localrepository(repo.repository):'
1994 self.hook("changegroup", node=hex(cl.node(clstart)),
1997 self.hook("changegroup", node=hex(cl.node(clstart)),
1995 source=srctype, url=url)
1998 source=srctype, url=url)
1996
1999
1997 for i in xrange(clstart, clend):
2000 for n in added:
1998 self.hook("incoming", node=hex(cl.node(i)),
2001 self.hook("incoming", node=hex(n), source=srctype, url=url)
1999 source=srctype, url=url)
2000
2002
2001 # never return 0 here:
2003 # never return 0 here:
2002 if dh < 0:
2004 if dh < 0:
General Comments 0
You need to be logged in to leave comments. Login now