unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Stephen J. Turnbull" <stephen@xemacs.org>
To: Juanma Barranquero <lekktu@gmail.com>
Cc: Emacs developers <emacs-devel@gnu.org>
Subject: Workflow to accumulate individual changes?
Date: Fri, 01 Jan 2010 21:33:41 +0900	[thread overview]
Message-ID: <87bphengwq.fsf@uwakimon.sk.tsukuba.ac.jp> (raw)
In-Reply-To: <f7ccd24b0912301334u6df4cf24k7625713ba8e4252@mail.gmail.com>

Juanma Barranquero writes:

 > Let's suppose I want to create a local post-23.2 branch where I do
 > want to commit small changes to install on the trunk post-release. I
 > don't want to be forced to create a task branch for every one of them,
 > because they are small changes, and a new branch implies having to
 > bootstrap[1] anew. So I'd like to accumulate the changes into a single
 > branch.

I don't understand what you're concerned about (yes, I've seen the
followup which includes the footnote).  If you follow the procedure
for creating a shared repository (described in BzrForEmacsDevs, among
other places), then all branches under the shared repository directory
share storage, and creating a branch is very cheap (ie, the cost of
copying the tree, which is small since you can use hardlinks).[1]  I
would think this would be fine for anything requiring more than one
commit.  In any case, I think it would be worth trying, you might find
it's perfectly satisfactory.

You can make this slightly cheaper by using "checkout --lightweight"
(but the main cost is still creating the tree).

If you have a series of one-commit changes, the cheapest way to do it
would be with rebase.  (N.B. I can't help you with "bzr rebase"
itself, I've never used it.)  The idea would be to put each commit in
the same branch.  You will almost certainly have exactly one conflict
per ChangeLog you touch, but after that your commits will take place
on top of the previous one, and should be fine (at least, I think bzr
is smart enough not to conflict again).

 > Once the trunk is open again, what would be the procedure to install
 > the changes?

If you follow any of the above, you would just follow the usual
procedure for installing as described in BzrForEmacsDevs.

 > Obviously not "bzr merge ../post-23.2", because that would create a
 > single [merge] commit.

Yup, see attached script[2].  I don't have a plugin, but I have a
script that you can use to simulate the workflow you propose (if
you're on Windows you'll need to .BATify or use Cygwin).  Tested and
works on Gentoo GNU/Linux.  Two workflows I tried unsuccessfully are
also documented there for posterity.


Footnotes: 
[1]  You may need to tune the branch command to use hardlinks instead
of copies.

[2]
# set up a trunk mirror as usual
# test code: uncomment next statement to test
TESTP=t
if test -n "$TESTP"; then
 newfile () { echo $1 > $1; bzr add $1; }
 addlog () { echo $1 > .tmp0; cat .tmp0 ChangeLog > .tmp1; mv .tmp1 ChangeLog; }
 cd /tmp
 mkdir shared-repo
 cd shared-repo
 bzr init-repo
 mkdir remote-trunk
 cd remote-trunk
 bzr init
 newfile ChangeLog
 newfile foo
 bzr commit -m "add foo"
 cd ..
 bzr checkout remote-trunk trunk
fi

# set up your post 23.2 branch
bzr branch trunk post-23.2
cd post-23.2

# hack ... commit ... hack ... commit ... until trunk open
# more test code
if test -n "$TESTP"; then
 newfile bar
 addlog 'add bar'
 bzr commit -m 'add bar'
 newfile baz
 addlog 'add baz'
 bzr commit -m 'add baz'
 # simulate concurrent work
 cd ../remote-trunk
 newfile quux
 addlog 'add quux'
 bzr commit -m 'add quux'
fi

# here's the install procedure itself
cd ../trunk
bzr update
# trunk is now up-to-date
cd ../post-23.2
# durn, in testing the update fails, branches have diverged
# bzr update
# durn, in testing the merge --pull succeeds but leaves you with the
# remote changes at the top
bzr merge --pull

# what I hoped for but doesn't actually work (it creates a true merge
# rather than a fast forward)
# cd ../trunk
# bzr pull ../post-23.2





  parent reply	other threads:[~2010-01-01 12:33 UTC|newest]

Thread overview: 97+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-30 21:34 Workflow to accumulate individual changes? Juanma Barranquero
2009-12-30 21:37 ` Juanma Barranquero
2009-12-30 21:46 ` Óscar Fuentes
2009-12-30 23:57   ` Juanma Barranquero
2009-12-31  0:21     ` Óscar Fuentes
2009-12-31  0:27       ` Juanma Barranquero
2009-12-31  1:04     ` Óscar Fuentes
2009-12-31  1:33       ` Juanma Barranquero
2009-12-31  1:48         ` Óscar Fuentes
2009-12-31  2:22           ` Juanma Barranquero
2009-12-31  4:21         ` Eli Zaretskii
2009-12-31  4:36           ` Juanma Barranquero
2009-12-31  5:12             ` Miles Bader
2009-12-31 10:15               ` Eli Zaretskii
2009-12-31 10:44             ` Eli Zaretskii
2009-12-31 12:37               ` Juanma Barranquero
2009-12-31 19:44                 ` Karl Fogel
2009-12-31 20:16                   ` Eli Zaretskii
2009-12-31 20:41                   ` Juanma Barranquero
2010-01-01  2:54                   ` Richard Stallman
2010-01-01 12:35                     ` Stephen J. Turnbull
2010-01-01 13:49                   ` Stephen J. Turnbull
2009-12-31  5:06           ` Óscar Fuentes
2009-12-31 10:26             ` Eli Zaretskii
2009-12-31 12:28               ` Juanma Barranquero
2009-12-31 18:27             ` Eli Zaretskii
2009-12-31 18:59               ` Óscar Fuentes
2009-12-31 20:39               ` Juanma Barranquero
2010-01-01 13:53     ` Stephen J. Turnbull
2010-01-01 14:38       ` Eli Zaretskii
2009-12-30 22:54 ` Giorgos Keramidas
2009-12-31  0:11   ` Juanma Barranquero
2009-12-31  9:21     ` Andreas Schwab
2009-12-31 10:11       ` Eli Zaretskii
2009-12-31 11:44         ` Andreas Schwab
2009-12-31 12:23           ` Eli Zaretskii
2009-12-31 12:38             ` Juanma Barranquero
2009-12-31 13:25               ` Eli Zaretskii
2009-12-31 13:37                 ` Juanma Barranquero
2009-12-31 14:13                   ` Eli Zaretskii
2009-12-31 13:43             ` Giorgos Keramidas
2009-12-31 13:53               ` Juanma Barranquero
2009-12-31 14:07                 ` Alfred M. Szmidt
2009-12-31 14:16                   ` Juanma Barranquero
2010-01-01 15:38                     ` Alfred M. Szmidt
2010-01-01 17:53                       ` David Kastrup
2010-01-01  2:55                   ` Richard Stallman
2010-01-01  4:03                     ` Óscar Fuentes
2010-01-01  8:41                       ` Eli Zaretskii
2010-01-01 10:04                         ` Óscar Fuentes
2010-01-02 15:44                           ` Richard Stallman
2010-01-01 12:19                         ` Andreas Schwab
2010-01-01 14:33                           ` Eli Zaretskii
2010-01-01 14:48                             ` Andreas Schwab
2010-01-01 19:18                               ` Karl Fogel
2010-01-01 19:56                                 ` Eli Zaretskii
2010-01-01 20:09                                   ` Chong Yidong
2010-01-01 21:34                                     ` Eli Zaretskii
2010-01-01 20:13                                   ` Karl Fogel
2010-01-01 21:35                                     ` Eli Zaretskii
2010-01-01 21:25                                   ` Óscar Fuentes
2010-01-01 21:34                                     ` Eli Zaretskii
2010-01-01 22:58                                       ` Andreas Schwab
2010-01-01 20:07                                 ` Teemu Likonen
2010-01-01 20:12                                   ` Karl Fogel
2010-01-01 21:08                                     ` Teemu Likonen
2010-01-02  5:00                                       ` Stephen J. Turnbull
2010-01-02  5:12                                         ` Karl Fogel
2010-01-02  5:24                                           ` Miles Bader
2010-01-02 11:43                                             ` Juanma Barranquero
2010-01-02 12:09                                               ` Miles Bader
2010-01-02 19:22                                                 ` Karl Fogel
2010-01-05  8:50                                                   ` Stephen J. Turnbull
2010-01-02  4:37                                 ` Stephen J. Turnbull
2010-01-01 14:59                         ` Stephen J. Turnbull
2010-01-01 15:30                           ` Eli Zaretskii
2010-01-01 15:38                     ` Alfred M. Szmidt
2009-12-31 14:08               ` David Kastrup
2009-12-31 19:47                 ` Karl Fogel
2009-12-31 20:14                   ` Chong Yidong
2009-12-31 20:36                     ` Óscar Fuentes
2009-12-31 20:44                     ` Juanma Barranquero
2009-12-31 14:12               ` Eli Zaretskii
2009-12-31 19:08               ` Stefan Monnier
2009-12-31 12:20       ` Juanma Barranquero
2010-01-01 12:33 ` Stephen J. Turnbull [this message]
2010-01-02  1:56   ` Juanma Barranquero
2010-01-02  2:28     ` Óscar Fuentes
2010-01-02  2:50       ` Juanma Barranquero
2010-01-02  9:11       ` Eli Zaretskii
2010-01-02 13:20         ` Juanma Barranquero
2010-01-02 13:17       ` Juanma Barranquero
2010-01-02  3:46     ` Stephen J. Turnbull
2010-01-02  9:10       ` Eli Zaretskii
2010-01-02 15:30         ` Stephen J. Turnbull
2010-01-02 17:05           ` Eli Zaretskii
2010-01-02 13:39       ` Juanma Barranquero

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87bphengwq.fsf@uwakimon.sk.tsukuba.ac.jp \
    --to=stephen@xemacs.org \
    --cc=emacs-devel@gnu.org \
    --cc=lekktu@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).