How do I commit a bugfix to a previous tag in Mercurial? -


let's i've got 2 mercurial branches: (1) default , (2) stable. push bugfixes stable , new functionality default. every , when enough functionality has been added default, default gets merged stable. stable gets tagged decent tag. sake of simplicity, let's use tags 1.0, 1.1, 1.2, 1.3 etc.

now, let's release stable tag 1.3. go on development, , later on release 1.4 , 1.5. comes attention major bug exists in 1.3 (and 1,4 + 1.5), , need fix one. how best go 1.3, fix bug, , make sure bug gets applied 1.4 , 1.5?

as i'm talking tags, , not branches, possible @ all? top of head, i'd somehow need roll stable's 1.3 tag, fix bug , push bug 1.3 (and forward-port bugfix 1.4 , 1.5). however, rolling tag same rolling revision. possible roll previous tag/revision , apply changes "point in time"?

how best solve this?

however, rolling tag same rolling revision. possible roll previous tag/revision , apply changes "point in time"?

there nothing stops you. can checkout revision , start new head there on simple doing commit. when pushing changes mercurial stop when push branch multiple heads (unless --force options used). not want push multiple heads anyway because bugfix commits supposed merged main stable , default heads.

from top of head, i'd somehow need roll stable's 1.3 tag, fix bug , push bug 1.3 (and forward-port bugfix 1.4 , 1.5)

yes, that's basic idea. let's create bugfix merge cascade!

supposed have history this:

@  changeset:   7:83f16f6d167d (tip) |  summary:     new feature bar | | o  changeset:   6:c20d6c330271 (stable) | |  summary:     added tag v1.1.0 changeset fd09feac2b59 | | | o  changeset:   5:fd09feac2b59 (stable) (v1.1.0) |/|  summary:     merge default stable | | o |  changeset:   4:38ace577cfb7 | |  summary:     new feature foo | | | o  changeset:   3:0581117b05f7 (stable) | |  summary:     added tag v1.0.0 changeset 5305c84aeebb | | | o  changeset:   2:5305c84aeebb (stable) (v1.0.0) |/   summary:     new branch stable | o  changeset:   1:a8bf2fb0f30a |  summary:     new features | o  changeset:   0:c70ef214ec57    summary:     initial 

that have 2 release on stable branch: v1.0.0 , v1.1.0. have urgent bug fix , need fix both revisions , of course in default branch. here's do:

$ hg v1.0.0 ... fix bug ... $ hg commit -m 'fix bug in v1.0' $ hg tag v1.0.1 $ hg v1.1.0 $ hg merge tip ... merge  raise conflicts in `.hgtags` ... ... make sure resolved version contains content of both sides ... $ hg commit -m 'merge bugfix v1.1' $ hg tag v1.1.1 ... 

do until releases have bugfix merged in. finally, merge bug fix original head of stable branch , default branch.

$ hg c20d6c330271 $ hg merge tip $ hg commit -m 'merge bugfix main head of stable' $ hg default $ hg merge stable $ hg commit -m 'merge bugfix stable default' 

now history looks this:

@    changeset:   13:358084bd1a91 (tip) |\   summary:     merge bugfix stable default | | | o    changeset:   12:a12c5c10d9db (stable) | |\   summary:     merge bugfix stable | | | | | o  changeset:   11:e78d7ea72624 (stable) | | |  summary:     added tag v1.1.1 changeset abd62a5ba092 | | | | | o    changeset:   10:abd62a5ba092 (stable) (v1.1.1) | | |\   summary:     merge bugfix v1.1 | | | | | | | o  changeset:   9:8f272cc5a565 (stable) | | | |  summary:     added tag v1.0.1 changeset 21f31836b80c | | | | | | | o  changeset:   8:21f31836b80c (stable) | | | |  summary:     fix bug in v1.0 | | | | o | | |  changeset:   7:83f16f6d167d | | | |  summary:     new feature bar | | | | | o | |  changeset:   6:c20d6c330271 (stable) | |/ /   summary:     added tag v1.1.0 changeset fd09feac2b59 | | | | o |  changeset:   5:fd09feac2b59 (stable) (v1.1.0) |/| |  summary:     merge default stable | | | o | |  changeset:   4:38ace577cfb7 | | |  summary:     new feature foo | | | | o |  changeset:   3:0581117b05f7 (stable) | |/   summary:     added tag v1.0.0 changeset 5305c84aeebb | | | o  changeset:   2:5305c84aeebb (stable) (v1.0.0) |/   summary:     new branch stable | o  changeset:   1:a8bf2fb0f30a |  summary:     new features | o  changeset:   0:c70ef214ec57    summary:     initial 

note bugfix has been committed ony once, merged revisions , branches needed.


Comments

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -