--local commits are accessing the network

Bug #299313 reported by Mary Gardiner
4
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
High
Marius Kruger

Bug Description

Bazaar version: 1.9-1~bazaar1~intrepid1

Behaviour:
When I run a "bzr ci --local" commit on a checkout where the master branch is at a bzr+ssh:// URL, bzr communicates with the remote server somehow.

Expected behaviour:
--local should be truly local even if I happen to have network connectivity. There should be no access to the remote server.

Replication:

I create a master branch on example.com:

mkdir -p /tmp/test-branch
bzr init /tmp/test-branch

I check this branch out onto local.example.com:
bzr co bzr+ssh://example.com/tmp/test-branch
cd test-branch

I make changes locally:
echo "foo" > foo
bzr add foo

I attempt a local commit
bzr ci --local -m "Local commit"

Symptoms: this commit takes a long time (similar to full commits). Wireshark reports an SSH communication with example.com. (I have double and triple checked that this connection cannot be anything else, but it occurs at *exactly* the time of the 'local' commit.) In addition, I get this in the example.com (master/remote) logs:
Tue 2008-11-18 14:17:27 +1100
0.020 bzr arguments: [u'serve', u'--inet', u'--directory=/', u'--allow-writes']
0.020 looking for plugins in /home/mary/.bazaar/plugins
0.020 looking for plugins in /usr/lib/python2.5/site-packages/bzrlib/plugins
0.084 encoding stdout as osutils.get_user_encoding() 'UTF-8'
1.811 return code 0

And this in the local logs:
Tue 2008-11-18 14:17:25 +1100
0.024 bzr arguments: [u'ci', u'--local', u'-m', u'Local commit']
0.024 looking for plugins in /home/mary/.bazaar/plugins
0.024 looking for plugins in /usr/lib/python2.5/site-packages/bzrlib/plugins
0.098 encoding stdout as sys.stdout encoding 'UTF-8'
0.148 opening working tree '/tmp/test-branch'
0.291 ssh implementation is OpenSSH
4.481 preparing to commit
[14831] 2008-11-18 14:17:29.715 INFO: Committing to: /tmp/test-branch/
4.493 Selecting files for commit with filter []
[14831] 2008-11-18 14:17:29.719 INFO: added bar
[14831] 2008-11-18 14:17:29.785 INFO: Committed revision 2.
4.565 return code 0

Judging from the state of the branches afterwards it was not a full commit:
on example.com:
bzr revno
0

on local.example.com:
bzr revno
1

This is a regression from the 1.8 releases.

Revision history for this message
Mary Gardiner (puzzlement) wrote :

Here's what happens if I actually disconnect from the network:

bzr ci --local -m "Local commit"
ssh: Could not resolve hostname [example.com]: Name or service not known
Committing to: /tmp/test-branch/
added fooish
Committed revision 3.

bzr.log:
Tue 2008-11-18 14:19:30 +1100
0.024 bzr arguments: [u'ci', u'--local', u'-m', u'Local commit']
0.025 looking for plugins in /home/mary/.bazaar/plugins
0.025 looking for plugins in /usr/lib/python2.5/site-packages/bzrlib/plugins
0.094 encoding stdout as sys.stdout encoding 'UTF-8'
0.144 opening working tree '/tmp/test-branch'
0.292 ssh implementation is OpenSSH
0.328 Could not connect to bound branch, falling back to local nick.
 Connection closed: please check connectivity and permissions (and try -Dhpss if further diagnosis is required)
0.329 preparing to commit
[14900] 2008-11-18 14:19:30.884 INFO: Committing to: /tmp/test-branch/
0.341 Selecting files for commit with filter []
[14900] 2008-11-18 14:19:30.888 INFO: added fooish
[14900] 2008-11-18 14:19:30.954 INFO: Committed revision 3.
0.413 return code 0

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Do you have any plugins loaded ?

Revision history for this message
Mary Gardiner (puzzlement) wrote : Re: [Bug 299313] Re: --local commits are accessing the network

Here is the output of "bzr plugins" on the local machine:

bzrtools 1.9.1
    Various useful commands for working with bzr.

launchpad
    Launchpad.net integration plugin for Bazaar.

And on the remote machine:

launchpad
    Launchpad.net integration plugin for Bazaar.

Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 299313] [NEW] --local commits are accessing the network

I'll bet its the new nickname behaviour.

-Rob

Revision history for this message
Marius Kruger (amanica) wrote :

2008/11/18 Robert Collins <email address hidden>

> I'll bet its the new nickname behaviour.
>
me too,
As far as I remember, it tries to obtain the nick of the master branch
and if that fails then it uses the local implicit nickname.

So do you guys think it should not even try to get the master-branch-nick
when --local is specified?

Revision history for this message
Robert Collins (lifeless) wrote :

On Tue, 2008-11-18 at 09:51 +0000, Marius Kruger wrote:
>
>
> So do you guys think it should not even try to get the
> master-branch-nick
> when --local is specified?

Yup, --local means 'behave like an unbound branch'

-Rob
--
GPG key available at: <http://www.robertcollins.net/keys.txt>.

John A Meinel (jameinel)
Changed in bzr:
importance: Undecided → High
status: New → Triaged
Revision history for this message
Marius Kruger (amanica) wrote :
Changed in bzr:
assignee: nobody → amanica
status: Triaged → In Progress
Revision history for this message
Marius Kruger (amanica) wrote :

released in bzr 1.10

Changed in bzr:
status: In Progress → Fix Released
Vincent Ladeuil (vila)
Changed in bzr:
milestone: none → 1.10
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.