fanf: (dotat)
[personal profile] fanf

We often need to patch the software that we run in order to fix bugs quickly rather than wait for an official release, or to add functionality that we need. In many cases we have to maintain a locally-developed patch for a significant length of time, across multiple upstream releases, either because it is not yet ready for incorporation into a stable upstream version, or because it is too specific to our setup so will not be suitable for passing upstream without significant extra work.

I have been experimenting with a git workflow in which I have a feature branch per patch. (Usually there is only one patch for each change we make.) To move them on to a new feature release, I tag the feature branch heads (to preserve history), rebase them onto the new release version, and octopus merge them to create a new deployment version. This is rather unsatisfactory, because there is a lot of tedious per-branch work, and I would prefer to have branches recording the development of our patches rather than a series of tags.

Here is a git workflow suggested by Ian Jackson which I am trying out instead. I don't yet have much experience with it; I am writing it down now as a form of documentation.

There are three branches:

  • upstream, which is where public releases live
  • working, which is where development happens
  • deployment, which is what we run

Which branch corresponds to upstream may change over time, for instance when we move from one stable version to the next one.

The working branch exists on the developer's workstation and is not normally published. There might be multiple working branches for work-in-progress. They get rebased a lot.

Starting from an upstream version, a working branch will have a number of mature patches. The developer works on top of these in commit-early-commit-often mode, without worrying about order of changes or cleanliness. Every so often we use git rebase --interactive to tidy up the patch set. Often we'll use the "squash" command to combine new commits with the mature patches that they amend. Sometimes it will be rebased onto a new upstream version.

When the working branch is ready, we use the commands below to update the deployment branch. The aim is to make it look like updates from the working branch are repeatedly merged into the deployment branch. This is so that we can push updated versions of the patch set to a server without having to use --force, and pulling updates into a checked out version is just a fast-forward. However this isn't a normal merge since the tree at the head of deployment always matches the most recent good version of working. (This is similar to what stg publish does.) Diagramatically,

     |
    1.1
     | \
     |  `A---B-- 1.1-patched
     |    \       |
     |     \      |
     |      `C-- 1.1-revised
     |            |
    2.0           |
     | \          |
     |  `-C--D-- 2.0-patched
     |            |
    3.1           |
     | \          |
     |  `-C--E-- 3.1-patched
     |            |
  upstream        |
              deployment

The horizontal-ish lines are different rebased versions of the patch set. Letters represent patches and numbers represent version tags. The tags on the deployment branch are for the install scripts so I probably won't need one on every update.

Ideally we would be able to do this with the following commands:

    $ git checkout deployment
    $ git merge -s theirs working

However there is an "ours" merge strategy but not a "theirs" merge strategy. Johannes Sixt described how to simulate git merge -s theirs in a post to the git mailing list in 2010. So the commands are:

    $ git checkout deployment
    $ git merge --no-commit -s ours working
    $ git read-tree -m -u working
    $ git commit -m "Update to $(git describe working)"

Mark Wooding suggested the following more plumbing-based version, which unlike the above does not involve switching to the deployment branch.

    $ d="$(git rev-parse deployment)"
    $ w="$(git rev-parse working)"
    $ m="Update deployment to $(git describe working)"
    $ c="$(echo "$m" | git commit-tree -p $d -p $w working^{tree})
    $ git update-ref -m "$m" deployment $c $d
    $ unset c d w

Now to go and turn this into a script...

Page 1 of 4 << [1] [2] [3] [4] >>

did it work?

Date: 2015-02-07 07:58 pm (UTC)
From: (Anonymous)
hi,
thanks for the writeup! how did it work out?

Social pictures

Date: 2016-08-20 03:39 pm (UTC)
From: (Anonymous)
New gay place
http://gayfiles.xblog.in/?page-dion
gay millionaires gay love story is rihanna gay gay hook ups gay pride clothing

Delivered grown-up galleries

Date: 2016-08-26 06:21 pm (UTC)
From: (Anonymous)
Lewd pctures
erotic night free erotic wallpaper sex movies erotic trailers erotic penpal
http://shemale.erolove.in/?phoebe
erotic adventures online erotic literature hollywood erotic erotic ghost stories erotic readings

Grown up galleries

Date: 2016-08-31 04:21 am (UTC)
From: (Anonymous)
Chit my recent devise
http://amateur.selfies.purplesphere.in/?page.theresa
sextoys erotic sims erotic art erotic resorts erotically

Social pictures

Date: 2016-09-12 11:34 pm (UTC)
From: (Anonymous)
Pron blog site
http://futanari.porndairy.in/?katharine
erotic dating services erotic underwear erotic texts erotic lounge the erotic traveller

Grown up purlieus

Date: 2016-09-14 08:54 am (UTC)
From: (Anonymous)
Hi fashionable project
http://prostitute.porn.porndairy.in/?post-karley
viper porn videos bart seduces lisa porn ebony porn star xtasy eastern porn free midxdle eastern ass porn

Adult purlieus

Date: 2016-09-14 09:35 am (UTC)
From: (Anonymous)
After my altered engagement
http://amateur.selfies.purplesphere.in/?diagram.dana
adult erotic fiction xxx.prono.com erotic events erotic womens erotic modelling

Renewed site

Date: 2016-09-15 06:02 pm (UTC)
From: (Anonymous)
Hi reborn blog
http://arab.porn.pornpost.in/?entry.antonia
porn star transvestite youngest little teenies porn free violation porn videos free porn korean sluts stacey and vanessa porn pros

Mod Job

Date: 2016-09-16 09:27 am (UTC)
From: (Anonymous)
Blog about sissy life
history of feminism book talent management agency meet a mistress
http://sissies.purplesphere.in/?page.melody
open front bras sexy mens underwear hair salons in plano fantasy captions big baby diaper cotton long nightgown female gender inequality sissi crete restaurants

Communal pictures

Date: 2016-09-18 07:31 pm (UTC)
From: (Anonymous)
Study my recent contract
http://arab.aunties.porndairy.in/?post.tiffany
ng conduct kasim themes christmas

Callow Job

Date: 2016-09-21 08:50 am (UTC)
From: (Anonymous)
Started unusual cobweb stand out
http://jessica.casual.blogporn.in/?page.alanis
uk milf date tall dating site single dads uk types of dating violence adult singles dating

Pictures from social networks

Date: 2016-09-22 01:38 am (UTC)
From: (Anonymous)
Recent available porn place
http://asses.sexblog.pw/?phoebe
erotic literature online download erotic games erotic tv shows pinoy erotic movies most erotic film

Loose galleries

Date: 2016-09-24 07:10 am (UTC)
From: (Anonymous)
My gay pics
http://yaoi.erolove.in/?page.greyson
bottom gay tom selleck gay for gay marriage gay sax aiden grimshaw gay

Mature galleries

Date: 2016-09-25 06:44 pm (UTC)
From: (Anonymous)
My new work is top!
ios camera android download shazam android channels apps free apps for android mobiles download hey sexy lady
http://sexgames.android.tobuy.in/?profile.emilia
online download porn download to sexy videos como fazer login no google play store how can i create an app free office apps

Recent spot

Date: 2016-09-28 05:53 pm (UTC)
From: (Anonymous)
After my altered engagement
http://muslim.clit.pornpost.in/?entry-kayleigh
rorno stripping plus heroes trendy

Grown up purlieus

Date: 2016-10-04 08:01 pm (UTC)
From: (Anonymous)
Chit my recent engagement
http://latex.xblog.in/?page.deja
erotic fitness erotics erotic hypnosis free erotic baby free video pornography

Latest site

Date: 2016-10-06 07:46 pm (UTC)
From: (Anonymous)
Novel devise
http://whipme.yopoint.in/?epoch.deasia
erotic tarot erotic email free adult films erotic photography blog free adult videos

Pictures from collective networks

Date: 2016-10-07 01:59 am (UTC)
From: (Anonymous)
Sexy pctures
erotic mask sex dolls erotic texts erotic pregnancy erotic entertainment
http://latin.erolove.in/?annabelle
the erotic adultvideo craiglist erotic erotic photographic art erotic desktop wallpaper

Loose galleries

Date: 2016-10-07 12:00 pm (UTC)
From: (Anonymous)
Latin ladyboys
http://shemales.blogporn.in/?post-monique
sex videos shemals shaemle video younger tranys shemel sex movis free shemaile sex

Full-grown galleries

Date: 2016-10-08 02:44 am (UTC)
From: (Anonymous)
New project
http://big.boobies.twiclub.in/?post-regina
free wackin porn julia ann porn star gay teen porn ypms hardcore xxx lesbian porn free granny mother dauther porn

Pictures from community networks

Date: 2016-10-09 04:25 am (UTC)
From: (Anonymous)
Hi new website
http://europe.meet.erolove.top/?profile.jenifer
plus size females no signup dating site jehovah witness nz pictures of herpes virus free muslim

Unshackle galleries

Date: 2016-10-11 02:31 am (UTC)
From: (Anonymous)
My revitalized number
http://arab.aunties.porndairy.in/?entry.kelly
towards baltic xxxxx lisa stanford

Pictures from collective networks

Date: 2016-10-11 02:42 pm (UTC)
From: (Anonymous)
Pron blog locality
victorian erotic books erotic drama movies erotic parties erotic horror movie erotic paranormal romance
http://animeshemale.net.erolove.in/?riya
erotic thai massage the erotic networks victorian erotic novels erotic mobile erotic digital art

Mature site

Date: 2016-10-12 09:47 pm (UTC)
From: (Anonymous)
Daily porn blog updates
http://hotties.pictures.erolove.in/?post-tina
tsunamis in japan emo girl footjob indian springs staet park powderpuff girls names girl sexy flv

My supplementary website

Date: 2016-10-15 06:51 pm (UTC)
From: (Anonymous)
Started up to date cobweb throw
http://cat.photos.replyme.pw/?entry.estefani
free teen esbian porn archive most girls porn sveta porn porn download forum top floor porn
Page 1 of 4 << [1] [2] [3] [4] >>

April 2017

S M T W T F S
      1
2345 678
9101112131415
16171819202122
23242526272829
30      

Most Popular Tags

Page Summary

Style Credit

Expand Cut Tags

No cut tags
Page generated Jun. 28th, 2017 07:02 pm
Powered by Dreamwidth Studios