##// END OF EJS Templates
merge with stable
Matt Mackall -
r19306:59cdd3a7 merge default
parent child Browse files
Show More
@@ -140,6 +140,7 b' repo, you can add a ``--force`` option.'
140
140
141 try:
141 try:
142 import cPickle as pickle
142 import cPickle as pickle
143 pickle.dump # import now
143 except ImportError:
144 except ImportError:
144 import pickle
145 import pickle
145 import os
146 import os
@@ -1334,12 +1334,19 b' def commit(ui, repo, *pats, **opts):'
1334 raise util.Abort(_('cannot commit an interrupted graft operation'),
1334 raise util.Abort(_('cannot commit an interrupted graft operation'),
1335 hint=_('use "hg graft -c" to continue graft'))
1335 hint=_('use "hg graft -c" to continue graft'))
1336
1336
1337 branch = repo[None].branch()
1338 bheads = repo.branchheads(branch)
1339
1337 extra = {}
1340 extra = {}
1338 if opts.get('close_branch'):
1341 if opts.get('close_branch'):
1339 extra['close'] = 1
1342 extra['close'] = 1
1340
1343
1341 branch = repo[None].branch()
1344 if not bheads:
1342 bheads = repo.branchheads(branch)
1345 raise util.Abort(_('can only close branch heads'))
1346 elif opts.get('amend'):
1347 if repo.parents()[0].p1().branch() != branch and \
1348 repo.parents()[0].p2().branch() != branch:
1349 raise util.Abort(_('can only close branch heads'))
1343
1350
1344 if opts.get('amend'):
1351 if opts.get('amend'):
1345 if ui.configbool('ui', 'commitsubrepos'):
1352 if ui.configbool('ui', 'commitsubrepos'):
@@ -3,14 +3,6 b' extensions. Extensions may add new comma'
3 existing commands, change the default behavior of commands, or
3 existing commands, change the default behavior of commands, or
4 implement hooks.
4 implement hooks.
5
5
6 Extensions are not loaded by default for a variety of reasons:
7 they can increase startup overhead; they may be meant for advanced
8 usage only; they may provide potentially dangerous abilities (such
9 as letting you destroy or modify history); they might not be ready
10 for prime time; or they may alter some usual behaviors of stock
11 Mercurial. It is thus up to the user to activate extensions as
12 needed.
13
14 To enable the "foo" extension, either shipped with Mercurial or in the
6 To enable the "foo" extension, either shipped with Mercurial or in the
15 Python search path, create an entry for it in your configuration file,
7 Python search path, create an entry for it in your configuration file,
16 like this::
8 like this::
@@ -23,6 +15,16 b' You may also specify the full path to an'
23 [extensions]
15 [extensions]
24 myfeature = ~/.hgext/myfeature.py
16 myfeature = ~/.hgext/myfeature.py
25
17
18 See :hg:`help config` for more information on configuration files.
19
20 Extensions are not loaded by default for a variety of reasons:
21 they can increase startup overhead; they may be meant for advanced
22 usage only; they may provide potentially dangerous abilities (such
23 as letting you destroy or modify history); they might not be ready
24 for prime time; or they may alter some usual behaviors of stock
25 Mercurial. It is thus up to the user to activate extensions as
26 needed.
27
26 To explicitly disable an extension enabled in a configuration file of
28 To explicitly disable an extension enabled in a configuration file of
27 broader scope, prepend its path with !::
29 broader scope, prepend its path with !::
28
30
@@ -52,7 +52,7 b' repository to disable publishing in its '
52 [phases]
52 [phases]
53 publish = False
53 publish = False
54
54
55 See :hg:`help config` for more information on config files.
55 See :hg:`help config` for more information on configuration files.
56
56
57 .. note::
57 .. note::
58 Servers running older versions of Mercurial are treated as
58 Servers running older versions of Mercurial are treated as
@@ -267,14 +267,16 b' verify update will accept invalid legacy'
267 $ hg up -C b
267 $ hg up -C b
268 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
268 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
269 $ hg commit -d '9 0' --close-branch -m 'close this part branch too'
269 $ hg commit -d '9 0' --close-branch -m 'close this part branch too'
270 $ hg commit -d '9 0' --close-branch -m 're-closing this branch'
271 abort: can only close branch heads
272 [255]
270
273
271 $ hg commit -d '9 0' --close-branch -m 're-closing this branch'
272 $ hg log -r tip --debug
274 $ hg log -r tip --debug
273 changeset: 13:c2601d54b1427e99506bee25a566ef3a5963af0b
275 changeset: 12:e3d49c0575d8fc2cb1cd6859c747c14f5f6d499f
274 branch: b
276 branch: b
275 tag: tip
277 tag: tip
276 phase: draft
278 phase: draft
277 parent: 12:e3d49c0575d8fc2cb1cd6859c747c14f5f6d499f
279 parent: 8:eebb944467c9fb9651ed232aeaf31b3c0a7fc6c1
278 parent: -1:0000000000000000000000000000000000000000
280 parent: -1:0000000000000000000000000000000000000000
279 manifest: 8:6f9ed32d2b310e391a4f107d5f0f071df785bfee
281 manifest: 8:6f9ed32d2b310e391a4f107d5f0f071df785bfee
280 user: test
282 user: test
@@ -282,13 +284,9 b' verify update will accept invalid legacy'
282 extra: branch=b
284 extra: branch=b
283 extra: close=1
285 extra: close=1
284 description:
286 description:
285 re-closing this branch
287 close this part branch too
286
288
287
289
288 $ hg rollback
289 repository tip rolled back to revision 12 (undo commit)
290 working directory now based on revision 12
291
292 --- b branch should be inactive
290 --- b branch should be inactive
293
291
294 $ hg branches
292 $ hg branches
@@ -743,3 +743,27 b' Amend a merge changeset (with manifest-l'
743 -aa
743 -aa
744 -aa
744 -aa
745
745
746 Issue 3445: amending with --close-branch a commit that created a new head should fail
747 This shouldn't be possible:
748
749 $ hg up -q default
750 $ hg branch closewithamend
751 marked working directory as branch closewithamend
752 (branches are permanent and global, did you want a bookmark?)
753 $ hg ci -Am..
754 adding cc.orig
755 adding obs.py
756 adding obs.pyc
757 $ hg ci --amend --close-branch -m 'closing'
758 abort: can only close branch heads
759 [255]
760
761 This silliness fails:
762
763 $ hg branch silliness
764 marked working directory as branch silliness
765 (branches are permanent and global, did you want a bookmark?)
766 $ echo b >> b
767 $ hg ci --close-branch -m'open and close'
768 abort: can only close branch heads
769 [255]
General Comments 0
You need to be logged in to leave comments. Login now