Show More
@@ -122,10 +122,12 b' hooks::' | |||||
122 | Commands that get automatically executed by various actions such as |
|
122 | Commands that get automatically executed by various actions such as | |
123 | starting or finishing a commit. |
|
123 | starting or finishing a commit. | |
124 | changegroup;; |
|
124 | changegroup;; | |
125 | Run after a changegroup has been added via push or pull. |
|
125 | Run after a changegroup has been added via push or pull. Passed | |
|
126 | the ID of the first new changeset in $NODE. | |||
126 | commit;; |
|
127 | commit;; | |
127 |
Run after a changeset has been created |
|
128 | Run after a changeset has been created or for each changeset | |
128 | created changeset. |
|
129 | pulled. Passed the ID of the newly created changeset in | |
|
130 | environment variable $NODE. | |||
129 | precommit;; |
|
131 | precommit;; | |
130 | Run before starting a commit. Exit status 0 allows the commit to |
|
132 | Run before starting a commit. Exit status 0 allows the commit to | |
131 | proceed. Non-zero status will cause the commit to fail. |
|
133 | proceed. Non-zero status will cause the commit to fail. |
@@ -987,7 +987,8 b' class localrepository:' | |||||
987 | self.ui.status("adding changesets\n") |
|
987 | self.ui.status("adding changesets\n") | |
988 | co = self.changelog.tip() |
|
988 | co = self.changelog.tip() | |
989 | cn = self.changelog.addgroup(getgroup(), csmap, tr, 1) # unique |
|
989 | cn = self.changelog.addgroup(getgroup(), csmap, tr, 1) # unique | |
990 |
c |
|
990 | cnr, cor = map(self.changelog.rev, (cn, co)) | |
|
991 | changesets = cnr - cor | |||
991 |
|
992 | |||
992 | # pull off the manifest group |
|
993 | # pull off the manifest group | |
993 | self.ui.status("adding manifests\n") |
|
994 | self.ui.status("adding manifests\n") | |
@@ -1017,9 +1018,13 b' class localrepository:' | |||||
1017 |
|
1018 | |||
1018 | tr.close() |
|
1019 | tr.close() | |
1019 |
|
1020 | |||
1020 | if not self.hook("changegroup"): |
|
1021 | if not self.hook("changegroup", node=hex(self.changelog.node(cor+1))): | |
|
1022 | self.ui.warn("abort: changegroup hook returned failure!\n") | |||
1021 | return 1 |
|
1023 | return 1 | |
1022 |
|
1024 | |||
|
1025 | for i in range(cor + 1, cnr + 1): | |||
|
1026 | self.hook("commit", node=hex(self.changelog.node(i))) | |||
|
1027 | ||||
1023 | return |
|
1028 | return | |
1024 |
|
1029 | |||
1025 | def update(self, node, allow=False, force=False, choose=None, |
|
1030 | def update(self, node, allow=False, force=False, choose=None, |
General Comments 0
You need to be logged in to leave comments.
Login now