Ajout d'une nouvelle caractéristique dans la branche stable

Cette page vous montre comment on intègre une caractéristique ("feature") dans la branche stable.

Rappel

La "feature" a été développée dans le branche f-compile. (f- comme "feature").

Procédure

La branche f-compile va être :

insérée dans la branche default.

puis copiée dans la branche prep-release (prepare-release)

où on :

ajoutera une documentation,

corrigera des bugs,

…

La branche prep-release sera ensuite copiée dans la branche stable où elle sera étiquetée avec le numéro adéquat.

La branche prep-release sera enfin copiée dans la be=ranche default qui cotiendra, ainsi, toutes les modifications de l'application.

H:\essais\build_xml_clone_pour_f-compile>hg summary

parent: 17:1d93d3a95151 tip
Création d'une cible init et d'une cible compile dans build.xml - ref
branch: f-compile
commit: (clean)
update: (current)
mq: (empty queue)

H:\essais\build_xml_clone_pour_f-compile>hg branch f-compile

H:\essais\build_xml_clone_pour_f-compile>hg update default

resolving manifests
branchmerge: False, force: False, partial: False
ancestor: 1d93d3a95151, local: 1d93d3a95151+, remote: 6bb137890448
build.xml: remote is newer -> g
getting build.xml
updating: build.xml 1/1 files (100.00%)
1 files updated, 0 files merged, 0 files removed, 0 files unresolved

H:\essais\build_xml_clone_pour_f-compile>hg branch

default

H:\essais\build_xml_clone_pour_f-compile>hg summary

parent: 11:6bb137890448
Fusion de stable dans default LISEZMOI.txt precise le workflow
branch: default
commit: (clean)
update: (current)
mq: (empty queue)

H:\essais\build_xml_clone_pour_f-compile>hg merge f-compile

searching for copies back to rev 12
resolving manifests
branchmerge: True, force: False, partial: False
ancestor: 6bb137890448, local: 6bb137890448+, remote: 1d93d3a95151
build.xml: remote is newer -> g
getting build.xml
updating: build.xml 1/1 files (100.00%)
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit)

H:\essais\build_xml_clone_pour_f-compile>hg commit -u bruno -m "Fusion de f-compile dans branche default - closes #7"

build.xml
calling hook commit.lfiles: hgext.largefiles.reposetup.checkrequireslfiles
committed changeset 18:de83e362b0fbfeee5d4ddf4285f092877d78a4e6

Normalement on devrait :

fusionner default avec prep-release

puis ajouter des documentations

H:\essais\build_xml_clone_pour_f-compile>hg branches

default 18:de83e362b0fbfeee5d4ddf4285f092877d78a4e6
prep-release 6:ebd97889959b40935574e4b5cf35b940da287bf5
f-compile 17:1d93d3a95151f77a22ad45332c760ba7c8118daa (inactive)
stable 10:abb01d174d873eb4c7a9ff834dc02e758dc5fab8 (inactive)
maintenance 8:96e3fe73e45c5841679a7f178687f6f3baccfce9 (inactive)

Fusion de default dans prep-release

H:\essais\build_xml_clone_pour_f-compile>hg update prep-release

resolving manifests
branchmerge: False, force: False, partial: False
ancestor: de83e362b0fb, local: de83e362b0fb+, remote: ebd97889959b
.hgtags: other deleted -> r
LISEZMOI.txt: remote is newer -> g
build.xml: remote is newer -> g
removing .hgtags
updating: .hgtags 1/3 files (33.33%)
getting LISEZMOI.txt
getting build.xml
updating: build.xml 3/3 files (100.00%)
2 files updated, 0 files merged, 1 files removed, 0 files unresolved

Modification du fichier LISEZMOI.txt cat LISEZMOI.txt

-- Demo branches --"
-- Création des Branches dans le dépôt --
-- Evolution --
Version V1.0 - Ajout de la caractéristique (feature) : compilation dans le fichier build.xml

hg status

M LISEZMOI.txt

hg commit -u bruno -m "Documentation de l'application : on modifie LISEZMOI.txt pour indiquer la version et la feature correspondante"

calling hook commit.lfiles: hgext.largefiles.reposetup.checkrequireslfiles
committed changeset 20:015fa94e1b287ba1969ca44a7a0878ffc506be56

Enregistrement dans la branche stable

H:\essais\build_xml_clone_pour_f-compile>hg update stable
resolving manifests
branchmerge: False, force: False, partial: False
ancestor: 015fa94e1b28, local: 015fa94e1b28+, remote: abb01d174d87
LISEZMOI.txt: remote is newer -> g
build.xml: remote is newer -> g
getting LISEZMOI.txt
getting build.xml
updating: build.xml 2/2 files (100.00%)
2 files updated, 0 files merged, 0 files removed, 0 files unresolved

</code> H:\essais\build_xml_clone_pour_f-compile>hg merge prep-release

searching for copies back to rev 6
resolving manifests
branchmerge: True, force: False, partial: False
ancestor: abb01d174d87, local: abb01d174d87+, remote: 015fa94e1b28
LISEZMOI.txt: remote is newer -> g
build.xml: remote is newer -> g
getting LISEZMOI.txt
getting build.xml
updating: build.xml 2/2 files (100.00%)
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit)

H:\essais\build_xml_clone_pour_f-compile>hg commit -u bruno -m "Fusion de la branche prep-release dans la branche stable"

LISEZMOI.txt
build.xml
calling hook commit.lfiles: hgext.largefiles.reposetup.checkrequireslfiles
committed changeset 21:d1b07206d6d7fe4f8c44f8b70023b822ad46a181

hg tag V1.0

Copie de prep-release dans default

Erreur de manipulation On a d'abord fait un hg default.

Puis un : hg merge stable (sans hg commit)

C'était une erreur : le tag V1.0 n'a pas à se trouver dans la branche default.

On voulait fusionner prep-release dans la branche default.

Pour annuler le hg merge, il suffit de demander :

H:\essais\build_xml_clone_pour_f-compile>hg update -C -r .

resolving manifests
branchmerge: False, force: True, partial: False
ancestor: de83e362b0fb+, local: de83e362b0fb+, remote: de83e362b0fb
.hgtags: remote is newer -> g
LISEZMOI.txt: remote is newer -> g
getting .hgtags
getting LISEZMOI.txt
updating: LISEZMOI.txt 2/2 files (100.00%)
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
H:\essais\build_xml_clone_pour_f-compile>hg branch
default
H:\essais\build_xml_clone_pour_f-compile>**hg merge prep-release**<code>
searching for copies back to rev 6
resolving manifests
branchmerge: True, force: False, partial: False
ancestor: de83e362b0fb, local: de83e362b0fb+, remote: 015fa94e1b28
LISEZMOI.txt: remote is newer -> g
getting LISEZMOI.txt
updating: LISEZMOI.txt 1/1 files (100.00%)
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit)

H:\essais\build_xml_clone_pour_f-compile>hg commit -u bruno -m "Fusion de la branche prep-release dans la branche default qui contiendra la version stable sans l'etiquette de version"

LISEZMOI.txt
calling hook commit.lfiles: hgext.largefiles.reposetup.checkrequireslfiles
committed changeset 23:89d35752f6d46f3ccc78368810021fb33ebb0e58

Copie de la branche stable dans default

H:\essais\build_xml_clone_pour_f-compile>hg branch

default

H:\essais\build_xml_clone_pour_f-compile>hg merge stable

searching for copies back to rev 21
resolving manifests
branchmerge: True, force: False, partial: False
ancestor: 015fa94e1b28, local: 89d35752f6d4+, remote: 90fcdcaaf5ed
.hgtags: remote is newer -> g
getting .hgtags
updating: .hgtags 1/1 files (100.00%)
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit)

H:\essais\build_xml_clone_pour_f-compile>hg commit -u bruno -m "Fusion de la branche stable dans la branche default qui contiendra la version stable avec l'etiquette de version"

.hgtags
calling hook commit.lfiles: hgext.largefiles.reposetup.checkrequireslfiles
committed changeset 24:c336a7d188b0f98f2525be449f56737fa096fee8

Envoi des modifications sur le serveur de révisions

H:\essais\build_xml_clone_pour_f-compile>hg push
pushing to http://192.168.108.111:8080/scm/hg/build_xml
using http://192.168.108.111:8080/scm/hg/build_xml
sending capabilities command
[HgKeyring] Keyring URL: http://192.168.108.111:8080/scm/hg/build_xml
Username not specified in .hg/hgrc. Keyring will not be used.
http authorization required
realm: SONIA :: SCM Manager
user: bruno
password:
[HgKeyring] Manually entered password. Url: http://192.168.108.111:8080/scm/hg/build_xml,
user: bruno, passwd: *******
query 1; heads
sending batch command
searching for changes
all remote heads known locally
sending branchmap command
sending branchmap command
preparing listkeys for "bookmarks"
sending listkeys command
6 changesets found
list of changesets:
fde0e68cd5347afdce3e3ae9b3606d0a65324739
015fa94e1b287ba1969ca44a7a0878ffc506be56
d1b07206d6d7fe4f8c44f8b70023b822ad46a181
90fcdcaaf5ed8d731a50576c897b363b2544e9ff
89d35752f6d46f3ccc78368810021fb33ebb0e58
c336a7d188b0f98f2525be449f56737fa096fee8
bundling: 1/6 changesets (16.67%)
bundling: 2/6 changesets (33.33%)
bundling: 3/6 changesets (50.00%)
bundling: 4/6 changesets (66.67%)
bundling: 5/6 changesets (83.33%)
bundling: 6/6 changesets (100.00%)
bundling: 1/6 manifests (16.67%)
bundling: 2/6 manifests (33.33%)
bundling: 3/6 manifests (50.00%)
bundling: 4/6 manifests (66.67%)
bundling: 5/6 manifests (83.33%)
bundling: 6/6 manifests (100.00%)
bundling: .hgtags 1/2 files (50.00%)
bundling: LISEZMOI.txt 2/2 files (100.00%)
sending unbundle command
sending 1533 bytes
sending: 1/2 kb (50.00%)
sending: 1/2 kb (50.00%)
remote: adding changesets
remote: adding manifests
remote: adding file changes
remote: added 6 changesets with 2 changes to 2 files (-1 heads)
preparing listkeys for "phases"
sending listkeys command
preparing pushkey for "phases:c336a7d188b0f98f2525be449f56737fa096fee8"
sending pushkey command
sending 0 bytes
try to push obsolete markers to remote
checking for updated bookmarks
preparing listkeys for "bookmarks"
sending listkeys command
H:\essais\build_xml_clone_pour_f-compile>

En résumé

Dépôt sur le poste client

Dépôt sur le serveur de révisions