centralized workflow and tracking upstream questions

Tom Vaughan tom at software6.net
Sat Apr 5 07:04:18 BST 2008


On Fri, Apr 4, 2008 at 7:06 PM, Neil Martinsen-Burrell <nmb at wartburg.edu> wrote:
> [snip]  I've found two
> workarounds.  The first is to create the trunk by branching the vendor
> location in the first place, e.g.

Following the first suggestion, does this look right? I'm a little
confused about why the trunk would have a log message that took place
in the vendor branch, but I'm sure that's a bzr thing I don't
understand yet. I can tell already I really like how bzr handles
imports and merges...

Thanks.

-Tom

$ ls
template-0.1  template-0.2  test.sh

$ cat test.sh
find template-0.*

cat template-0.1/README
cat template-0.1/index.html
cat template-0.2/index.html

mkdir website
bzr init-repo website

mkdir -p website/branches/vendor
bzr init website/branches/vendor
bzr co website/branches/vendor

bzr import template-0.1 vendor
bzr ci -m "imported 1" vendor

bzr branch website/branches/vendor website/trunk
bzr co website/trunk

cd trunk
perl -pi -e 's/HELLO/GOOD BYE/;' index.html
bzr ci -m "updates"
cd ..

bzr import template-0.2 vendor
bzr ci -m "imported 2" vendor

cd trunk
bzr merge ../vendor
bzr ci -m "merged"
cd ..

bzr log trunk

ls trunk
cat trunk/index.html

$ sh -x test.sh
+ find template-0.1 template-0.2
template-0.1
template-0.1/index.html
template-0.1/README
template-0.2
template-0.2/index.html
+ cat template-0.1/README
template-0.1
+ cat template-0.1/index.html
<p>HELLO WORLD!</p>
+ cat template-0.2/index.html
<p>HELLO WORLD!</p>
+ mkdir website
+ bzr init-repo website
+ mkdir -p website/branches/vendor
+ bzr init website/branches/vendor
+ bzr co website/branches/vendor
+ bzr import template-0.1 vendor
+ bzr ci -m imported 1 vendor
Committing to: /home/tvaughan/test/website/branches/vendor/
added README
added index.html
Committed revision 1.
+ bzr branch website/branches/vendor website/trunk
Branched 1 revision(s).
+ bzr co website/trunk
+ cd trunk
+ perl -pi -e s/HELLO/GOOD BYE/; index.html
+ bzr ci -m updates
Committing to: /home/tvaughan/test/website/trunk/
modified index.html
Committed revision 2.
+ cd ..
+ bzr import template-0.2 vendor
+ bzr ci -m imported 2 vendor
Committing to: /home/tvaughan/test/website/branches/vendor/
deleted README
Committed revision 2.
+ cd trunk
+ bzr merge ../vendor
-D  README
All changes applied successfully.
+ bzr ci -m merged
Committing to: /home/tvaughan/test/website/trunk/
deleted README
Committed revision 3.
+ cd ..
+ bzr log trunk
------------------------------------------------------------
revno: 3
committer: Tom Vaughan <tom at software6.net>
branch nick: trunk
timestamp: Fri 2008-04-04 22:54:09 -0700
message:
  merged
    ------------------------------------------------------------
    revno: 1.1.1
    committer: Tom Vaughan <tom at software6.net>
    branch nick: vendor
    timestamp: Fri 2008-04-04 22:54:09 -0700
    message:
      imported 2
------------------------------------------------------------
revno: 2
committer: Tom Vaughan <tom at software6.net>
branch nick: trunk
timestamp: Fri 2008-04-04 22:54:08 -0700
message:
  updates
------------------------------------------------------------
revno: 1
committer: Tom Vaughan <tom at software6.net>
branch nick: vendor
timestamp: Fri 2008-04-04 22:54:07 -0700
message:
  imported 1
+ ls trunk
index.html
+ cat trunk/index.html
<p>GOOD BYE WORLD!</p>



More information about the bazaar mailing list