bzr diff reports modified files in fresh lightweight checkout of svn repo

Asked by Dan MacMillan

If I create a Bazaar lightweight checkout from my Subversion repository, bzr seems to think all of my Java files are different. The following output is typical (I have elided my company name and a few other details, but I am using this workflow exactly):

bzr init-repo bogus
cd bogus
bzr co https://mycompanyserver/bogus/svn/blah/trunk trunk --lightweight
cd trunk
bzr diff
=== modified file 'bogus/src/main/java/com/mycompany/myproduct/Config.java'
=== modified file 'bogus/src/main/java/com/mycompany/myproduct/Dataset.java'
... many, many more files listed ...

Only the Java files seem to be affected. I think the only thing unique about the Java files is that they are the only files that have their svn:keywords property defined. That seems significant but I don't understand why, if the files are different, bzr diff doesn't show me the difference; instead it just tells me that the file is modified.

Bazaar version:

D:\Develop\bzr\bogus>bzr --version
Bazaar (bzr) 2.0.4
  Python interpreter: C:\Program Files\Bazaar\python25.dll 2.5.4
  Python standard library: C:\Program Files\Bazaar\lib\library.zip
  Platform: Windows-XP-5.1.2600-SP3
  bzrlib: C:\Program Files\Bazaar\lib\library.zip\bzrlib
  Bazaar configuration: C:\Documents and Settings\danm\Application Data\bazaar\2.0
  Bazaar log file: C:\Documents and Settings\danm\My Documents\.bzr.log

Copyright 2005, 2006, 2007, 2008, 2009 Canonical Ltd.
http://bazaar-vcs.org/

bzr comes with ABSOLUTELY NO WARRANTY. bzr is free software, and
you may use, modify and redistribute it under the terms of the GNU
General Public License version 2 or later.

Subversion server (built from port on FreeBSD):

hobbit% svn --version
svn, version 1.5.0 (r31699)
   compiled Jul 2 2008, 15:49:40

Copyright (C) 2000-2008 CollabNet.
Subversion is open source software, see http://subversion.tigris.org/
This product includes software developed by CollabNet (http://www.Collab.Net/).

The following repository access (RA) modules are available:

* ra_neon : Module for accessing a repository via WebDAV protocol using Neon.
  - handles 'http' scheme
  - handles 'https' scheme
* ra_svn : Module for accessing a repository using the svn network protocol.
  - handles 'svn' scheme
* ra_local : Module for accessing a repository on local disk.
  - handles 'file' scheme

hobbit% uname -a
FreeBSD hobbit.emerald-associates.com 7.0-RELEASE-p1 FreeBSD 7.0-RELEASE-p1 #0: Sat May 10 10:44:56 MDT 2008 <email address hidden>:/usr/obj/usr/src/sys/HOBBIT i386

Question information

Language:
English Edit question
Status:
Answered
For:
Bazaar Subversion Plugin Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Jelmer Vernooij (jelmer) said :
#1

You need to setup your .bzr/rules file to use svn-keywords for those java files. bzr-svn doesn't use the existing svn:keywords properties yet.

Revision history for this message
Dan MacMillan (8-launchpad-nekulturny-org) said :
#2

I created a new folder named 'test' in my testbed Subversion repository for testing, with a single file, Test.java, whose contents are:

// $Id$

Then I committed it. The following workflow seems to show that it isn't working as expected (at least by me).

D:\Develop\wc\bogus>svn proplist Test.java
Properties on 'Test.java':
  svn:mime-type
  svn:keywords
  svn:eol-style

D:\Develop\wc\bogus>svn propget svn:mime-type Test.java
text/x-java-source

D:\Develop\wc\bogus>svn propget svn:keywords Test.java
Id

D:\Develop\wc\bogus>svn propget svn:eol-style Test.java
native

D:\Develop\wc\bogus>svn cat Test.java
// $Id: Test.java 8594 2010-03-20 16:23:22Z danm $

D:\Develop\wc\bogus>cd \Develop\bzr

D:\Develop\bzr>type "%USERPROFILE%\Application Data\bazaar\2.0\rules"
[name *.java]
svn-keywords = Id

D:\Develop\bzr>bzr init-repo bogus
Shared repository with trees (format: 2a)
Location:
  shared repository: bogus

D:\Develop\bzr>cd bogus

D:\Develop\bzr\bogus>bzr co https://mycompanyserver/bogus/svn/test/trunk --lightweight

D:\Develop\bzr\bogus>cd trunk

D:\Develop\bzr\bogus\trunk>bzr diff
=== modified file 'Test.java'

D:\Develop\bzr\bogus\trunk>svn diff

D:\Develop\bzr\bogus\trunk>type Test.java
// $Id: Test.java 8594 2010-03-20 16:23:22Z danm $

D:\Develop\bzr\bogus\trunk>echo // $Id$>Test.java

D:\Develop\bzr\bogus\trunk>type Test.java
// $Id$

D:\Develop\bzr\bogus\trunk>svn diff

D:\Develop\bzr\bogus\trunk>bzr diff

D:\Develop\bzr\bogus\trunk>type Test.java
// $Id: Test.java 8594 2010-03-20 16:23:22Z danm $

So if I collapse the keyword myself, it doesn't complain about the difference. But that is sub-optimal. I think I must be doing something wrong, but I don't know what it is.

Revision history for this message
Dan MacMillan (8-launchpad-nekulturny-org) said :
#3

Whoops ... the last type Test.java is a leave-behind from a copy paste ... obviously that didn't happen. But the rest of it is right.

Revision history for this message
Jelmer Vernooij (jelmer) said :
#4

See my comments earlier. You need to setup your .bzr/rules file to use svn-keywords for those java files. bzr-svn doesn't use the existing svn:keywords properties yet.

Revision history for this message
Dan MacMillan (8-launchpad-nekulturny-org) said :
#5

I did that already. It was in my previous reply (buried in the middle though); here it is again:

D:\Develop\bzr>type "%USERPROFILE%\Application Data\bazaar\2.0\rules"
[name *.java]
svn-keywords = Id

Is that wrong?

Revision history for this message
Jelmer Vernooij (jelmer) said :
#6

On Sat, 2010-03-20 at 19:48 +0000, Dan MacMillan wrote:
> Question #101615 on Bazaar Subversion Plugin changed:
> https://answers.launchpad.net/bzr-svn/+question/101615
>
> Status: Answered => Open
>
> Dan MacMillan is still having a problem:
> I did that already. It was in my previous reply (buried in the middle
> though); here it is again:
>
> D:\Develop\bzr>type "%USERPROFILE%\Application Data\bazaar\2.0\rules"
> [name *.java]
> svn-keywords = Id
>
> Is that wrong?
No, that should be right. Can you please file a bug?

Cheers,

Jelmer

Can you help with this problem?

Provide an answer of your own, or ask Dan MacMillan for more information if necessary.

To post a message you must log in.