##// END OF EJS Templates
blackbox: only show new heads on incoming...
Durham Goode -
r18677:539210ed default
parent child Browse files
Show More
@@ -2400,11 +2400,11 b' class localrepository(object):'
2400 self.hook("incoming", node=hex(n), source=srctype,
2400 self.hook("incoming", node=hex(n), source=srctype,
2401 url=url)
2401 url=url)
2402
2402
2403 heads = self.heads()
2403 newheads = [h for h in self.heads() if h not in oldheads]
2404 self.ui.log("incoming",
2404 self.ui.log("incoming",
2405 _("%s incoming changes - new heads: %s\n"),
2405 _("%s incoming changes - new heads: %s\n"),
2406 len(added),
2406 len(added),
2407 ', '.join([hex(c[:6]) for c in heads]))
2407 ', '.join([hex(c[:6]) for c in newheads]))
2408 self._afterlock(runhooks)
2408 self._afterlock(runhooks)
2409
2409
2410 finally:
2410 finally:
@@ -28,6 +28,38 b' command, exit codes, and duration'
28 1970/01/01 00:00:00 bob> add a
28 1970/01/01 00:00:00 bob> add a
29 1970/01/01 00:00:00 bob> add exited 0 after * seconds (glob)
29 1970/01/01 00:00:00 bob> add exited 0 after * seconds (glob)
30
30
31 incoming change tracking
32
33 create two heads to verify that we only see one change in the log later
34 $ hg commit -ma
35 $ hg up null
36 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
37 $ echo b > b
38 $ hg commit -Amb
39 adding b
40 created new head
41
42 clone, commit, pull
43 $ hg clone . ../blackboxtest2
44 updating to branch default
45 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
46 $ echo c > c
47 $ hg commit -Amc
48 adding c
49 $ cd ../blackboxtest2
50 $ hg pull
51 pulling from $TESTTMP/blackboxtest
52 searching for changes
53 adding changesets
54 adding manifests
55 adding file changes
56 added 1 changesets with 1 changes to 1 files
57 (run 'hg update' to get a working copy)
58 $ hg blackbox -l 3
59 1970/01/01 00:00:00 bob> pull
60 1970/01/01 00:00:00 bob> 1 incoming changes - new heads: d02f48003e62 (glob)
61 1970/01/01 00:00:00 bob> pull exited None after * seconds (glob)
62
31 extension and python hooks - use the eol extension for a pythonhook
63 extension and python hooks - use the eol extension for a pythonhook
32
64
33 $ echo '[extensions]' >> .hg/hgrc
65 $ echo '[extensions]' >> .hg/hgrc
@@ -36,32 +68,12 b' extension and python hooks - use the eol'
36 $ echo 'update = echo hooked' >> .hg/hgrc
68 $ echo 'update = echo hooked' >> .hg/hgrc
37 $ hg update
69 $ hg update
38 hooked
70 hooked
39 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
71 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
40 $ hg blackbox -l 4
72 $ hg blackbox -l 4
41 1970/01/01 00:00:00 bob> update
73 1970/01/01 00:00:00 bob> update
42 1970/01/01 00:00:00 bob> pythonhook-preupdate: hgext.eol.preupdate finished in * seconds (glob)
74 1970/01/01 00:00:00 bob> pythonhook-preupdate: hgext.eol.preupdate finished in * seconds (glob)
43 1970/01/01 00:00:00 bob> exthook-update: echo hooked finished in * seconds (glob)
75 1970/01/01 00:00:00 bob> exthook-update: echo hooked finished in * seconds (glob)
44 1970/01/01 00:00:00 bob> update exited False after * seconds (glob)
76 1970/01/01 00:00:00 bob> update exited False after * seconds (glob)
45
77
46 incoming change tracking
47
48 $ hg clone . ../blackboxtest2
49 updating to branch default
50 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
51 $ hg commit -ma
52 $ cd ../blackboxtest2
53 $ hg pull
54 pulling from $TESTTMP/blackboxtest
55 requesting all changes
56 adding changesets
57 adding manifests
58 adding file changes
59 added 1 changesets with 1 changes to 1 files
60 (run 'hg update' to get a working copy)
61 $ hg blackbox -l 3
62 1970/01/01 00:00:00 bob> pull
63 1970/01/01 00:00:00 bob> 1 incoming changes - new heads: cb9a9f314b8b (glob)
64 1970/01/01 00:00:00 bob> pull exited None after * seconds (glob)
65
66 cleanup
78 cleanup
67 $ cd ..
79 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now