Bat to automate new branch flow in Mainteinance.
-
Copy bat files wherever you want
-
Run TortoiseHg ad go to File -> Settings, then select Tools form the left side of the opened window
-
From the "List of all tools" add a new task for start-work with these options(replace also squares brackets):
tool name = start-work command = start [path-to-the-start-work-file-on-your-drive] {ROOT} {REV}
and another new one task for end-work with these options:
tool name = end-work command = start [path-to-the-end-work-file-on-your-drive] {ROOT} {REV}
-
Select both commands and click "Add to list" button
-
Then press OK and restart Tortoise
-
Enjoy
Bat to execute at the begin of a new work. These are the operations that are running:
- Ask to the user for the new branch name
- Pull
- Update to default
- Create new branch
- Commit - could be empty - called "open branch" necessary to create the new branch
- END. Now you are ready to work on your branch and manually make every commit you need. When you are at the last commit, launch Bat#2 to end your work
Bat to execute at the end of our work flow, and it will merge our working branch into Maintenance These are the operations that are running:
- Check position != default & Maintenance
- Pull
- Update to last commit of current branch and eventually merge
- Commit
- Update Maintenance
- Merge branch with Local (Maintenance)
- Commit
- Update to default
- END. Now you only need to manually Push (for security reason the Bat does not push anything).
-
Posso iniziare una nuova lavorazione inserendo come nome del branch quello di un branch già esistente, creato in precedenza?
No. Per quanto Tortoise non restituisca errori in prima battuta nella creazione di branch con lo stesso nome, darà errori in fase di push, avendo il branch due teste. La procedura corretta è fare un update manuale al branch di riferimento ed eseguire commit manuali.
-
Se nel Merge del Branch con Maintenance nascono dei conflitti, cosa succede?
In automatico si apre di default Beyond Compare 4, se usi un'altro tool scrivici. n.b: in futuro sarà possibile scegliere il proprio tool di conflitto.
-
E' normale che non vengano fatti i Push in automatico?
Si, assolutamente! Il bat agisce al 100% in locale, ogni push è volutamente lasciato all'utente per ragioni di sicurezza.