Closed
Bug 450741
Opened 16 years ago
Closed 16 years ago
need a way to allow a single head per branch on an hg repo
Categories
(Developer Services :: Mercurial: hg.mozilla.org, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: bhearsum, Assigned: bhearsum)
References
Details
(Whiteboard: [hg-automation])
Attachments
(1 file, 2 obsolete files)
1.00 KB,
patch
|
djc
:
review+
djc
:
review+
|
Details | Diff | Splinter Review |
Since we're going with permanent named branches in our existing repositories this hook needs to be updated. I've tested this patch locally and it seems to work as intended...note that we only test active branches. Inactive branches seem to list two heads with 'hg heads -r $branch' when we have more than one active branch...
Attachment #333924 -
Flags: review?(benjamin)
Assignee | ||
Updated•16 years ago
|
Whiteboard: [hg-automation]
Comment 1•16 years ago
|
||
Comment on attachment 333924 [details] [diff] [review] allow single head per branch I think there's got to be a better way to do this as a python hook instead of a shell hook, but I'm going to ask djc for review in either case.
Attachment #333924 -
Flags: review?(benjamin) → review?(dirkjan)
Comment 2•16 years ago
|
||
For the shell version, you should probably use hg branches -aq (-q is a global option only listed with hg help -v branches) rather than the awk construction (I think hg branch names can contain spaces), but I agree with bsmedberg that using a Python hook might be better.
Assignee | ||
Comment 3•16 years ago
|
||
It seems that branchheads() only returns one head for inactive branches. As I found out, 'hg heads -r $branch' and 'hg heads $branch' do different things. I bet I probably shouldn't have used '-r' in the shell version. In any case, how does this look?
Attachment #333924 -
Attachment is obsolete: true
Attachment #333933 -
Flags: review?(dirkjan)
Attachment #333924 -
Flags: review?(dirkjan)
Comment 4•16 years ago
|
||
Yes, after some testing, that seems fine. You may want to break after setting err = True, since the rest of the loop is useless anyway. Similarly, you could simplify to just one error message (set err = '' at the start, then err = branchname when it has multiple heads), which might be better. Otherwise, seems nice!
Comment 5•16 years ago
|
||
Or should I say r+djc? ;)
Assignee | ||
Comment 6•16 years ago
|
||
Attachment #333959 -
Flags: review?
Assignee | ||
Updated•16 years ago
|
Attachment #333933 -
Attachment is obsolete: true
Attachment #333933 -
Flags: review?(dirkjan)
Assignee | ||
Comment 7•16 years ago
|
||
Comment on attachment 333959 [details] [diff] [review] [checked in] address djc's comments, change example hgrc Dunno who should review this. Benjamin? djc?
Updated•16 years ago
|
Attachment #333959 -
Flags: review? → review?(dirkjan)
Updated•16 years ago
|
Attachment #333959 -
Flags: review+
Assignee | ||
Updated•16 years ago
|
Summary: change hg_require_single_head to allow a single head per branch → need a way to allow a single head per branch on an hg repo
Assignee | ||
Comment 8•16 years ago
|
||
Comment on attachment 333959 [details] [diff] [review] [checked in] address djc's comments, change example hgrc changeset: 9:d1ffa7f6da59
Attachment #333959 -
Attachment description: address djc's comments, change example hgrc → [checked in] address djc's comments, change example hgrc
Assignee | ||
Updated•16 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 9•16 years ago
|
||
I'm planning to do a named branch for 3.1a2. I filed bug 452431 to get this deployed on m-c, comm-central, and the l10n repositories.
Updated•16 years ago
|
Attachment #333959 -
Flags: review?(dirkjan) → review+
Updated•11 years ago
|
Product: mozilla.org → Release Engineering
Updated•10 years ago
|
Product: Release Engineering → Developer Services
You need to log in
before you can comment on or make changes to this bug.
Description
•