equal
deleted
inserted
replaced
13 from .i18n import _ |
13 from .i18n import _ |
14 from .node import short |
14 from .node import short |
15 from . import ( |
15 from . import ( |
16 bundle2, |
16 bundle2, |
17 changegroup, |
17 changegroup, |
|
18 error, |
18 exchange, |
19 exchange, |
19 util, |
20 util, |
20 ) |
21 ) |
21 |
22 |
22 def _bundle(repo, bases, heads, node, suffix, compress=True): |
23 def _bundle(repo, bases, heads, node, suffix, compress=True): |
154 |
155 |
155 curtr = repo.currenttransaction() |
156 curtr = repo.currenttransaction() |
156 if curtr is not None: |
157 if curtr is not None: |
157 del curtr # avoid carrying reference to transaction for nothing |
158 del curtr # avoid carrying reference to transaction for nothing |
158 msg = _('programming error: cannot strip from inside a transaction') |
159 msg = _('programming error: cannot strip from inside a transaction') |
159 raise util.Abort(msg, hint=_('contact your extension maintainer')) |
160 raise error.Abort(msg, hint=_('contact your extension maintainer')) |
160 |
161 |
161 tr = repo.transaction("strip") |
162 tr = repo.transaction("strip") |
162 offset = len(tr.entries) |
163 offset = len(tr.entries) |
163 |
164 |
164 try: |
165 try: |