files including svn keywords shown as modified after checkout

Asked by Franz Roters

I want to use Bazaar as frontend to an SVN repository. One of the reasons is that we use svn keywords in our project and do not want to change that at the moment. So I set up the rules file of Bazaar to expand the svn ID keyword. While this works like a charm, all files containing the keyword are shown as modified after the checkout. The only difference being the expanded keywords. This makes the checkout basically unuasble as e.g. all my source files appear modified and I cannot easily see which ones I really changed! If this would be working correctly Bazaar looks like the perfect SVN frontend but like this is unfortunately unusable in my case.

The same / similar problem seem s to have apperad earlier:
https://answers.launchpad.net/bzr-svn/+question/101615
and
https://bugs.launchpad.net/bzr-svn/+bug/81463

From the second entry I actually got the impression that it should be fixed but obviously it is not.

Any hint on what's going wrong would be really apprecheated.

Question information

Language:
English Edit question
Status:
Solved
For:
Bazaar Subversion Plugin Edit question
Assignee:
No assignee Edit question
Solved by:
Franz Roters
Solved:
Last query:
Last reply:

This question was reopened

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

On Tue, May 15, 2012 at 06:50:48AM -0000, Franz Roters wrote:
> New question #197270 on Bazaar Subversion Plugin:
> https://answers.launchpad.net/bzr-svn/+question/197270

> I want to use Bazaar as frontend to an SVN repository. One of the reasons is that we use svn keywords in our project and do not want to change that at the moment. So I set up the rules file of Bazaar to expand the svn ID keyword. While this works like a charm, all files containing the keyword are shown as modified after the checkout. The only difference being the expanded keywords. This makes the checkout basically unuasble as e.g. all my source files appear modified and I cannot easily see which ones I really changed! If this would be working correctly Bazaar looks like the perfect SVN frontend but like this is unfortunately unusable in my case.

> The same / similar problem seem s to have apperad earlier:
> https://answers.launchpad.net/bzr-svn/+question/101615
> and
> https://bugs.launchpad.net/bzr-svn/+bug/81463

> >From the second entry I actually got the impression that it should be fixed but obviously it is not.

> Any hint on what's going wrong would be really apprecheated.
Are you using a bzr checkout or a svn working copy? If you're using a
bzr checkout, do you have "svn-keywords = YourKeyWords" set in the
configuration?

Cheers,

Jelmer

Revision history for this message
Franz Roters (f-roters) said :
#2

Dear Jelmer,

I use a checkout : bzr checkout svn+ssh://source target

And I put e.g.

[name *.txt]
svn-keywords = Id

in the rules file.

Then as stated before all *.txt files containing the ID keyword are shown as modified right after checkout.

You are referring to "the configuration" is that different from the rules file?

Thanks for your help so far!

Franz

Revision history for this message
Franz Roters (f-roters) said :
#3

Dear Jelmer,

I still do not get what you mean by your configuration.

I tried adding

svn-keywords = Id

in both bazaar.conf and thhe branch config file but both did not help.
Do I have to create a special section or anything?
I cannot find any documentation about this.
The only thing I find says to put it in the rules what I did an which works except showing all files with expanded keywords as modified.

I would really like to use Bazaar as my subversion frontend but I need to get this working first.

Thanks for your help

Franz

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

Am 22/05/12 09:26, schrieb Franz Roters:
> I still do not get what you mean by your configuration.
>
> I tried adding
>
> svn-keywords = Id
>
> in both bazaar.conf and thhe branch config file but both did not help.
> Do I have to create a special section or anything?
> I cannot find any documentation about this.
> The only thing I find says to put it in the rules what I did an which works except showing all files with expanded keywords as modified.
>
> I would really like to use Bazaar as my subversion frontend but I need
> to get this working first.
It should be in your global rules file (~/.bazaar/rules) in one of the
per-file sections. E.g.:

[name *]
svn-keywords = Id

Cheers,

Jelmer

Revision history for this message
Franz Roters (f-roters) said :
#5

Dear Jelmer,

sorry to ask again, but I believe this is exactly what I am doing.

I am on Windows 7 using Bazaar explorer.
I edited Settings/Rules to read:

[name *.txt]
svn-keywords = Id

In windows rules is in USERHOME\AppData\Roaming\Bazaar2.0

Revision history for this message
Franz Roters (f-roters) said :
#6

Dear Jelmer,

sorry to ask again, but I believe this is exactly what I am doing.

I am on Windows 7 using Bazaar explorer.
I edited Settings/Rules to read:

[name *.txt]
svn-keywords = Id

In windows rules is in USERHOME\AppData\Roaming\Bazaar2.0
which I guess is correct.

Now I choose Bazaar/Start/Branch...
It askes me to inizialize which I do.

Then after the branching command finishes 26 *.txt files are shown as modified.
The only modification being the expanded keyword.

What am I doing wrong?

By the way, while the subversion repository has 1500 revisions Bazaar tells me

Working trees differs from revision 1501.

Why is there one more revision in Bazaar then in subversion and what revision will be created when submitting something back into subversion?

Sorry again

Franz

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

Am 22/05/12 12:15, schrieb Franz Roters:
> By the way, while the subversion repository has 1500 revisions Bazaar
> tells me
>
> Working trees differs from revision 1501.
>
> Why is there one more revision in Bazaar then in subversion and what
> revision will be created when submitting something back into subversion?
See the FAQ:

The Bazaar revnos differ from the Subversion revnos
---------------------------------------------------
That's right. Bazaar revision numbers are per-branch, whereas Subversion
revnos are per-repository. If you would like to use Subversion revision
numbers, use the "svn:" revision specifier. For example:

::

   $ bzr ls -rsvn:34 svn://example.com/bar

bzr log will also show the Subversion revision number.

Cheers,

Jelmer

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

Am 22/05/12 12:15, schrieb Franz Roters:
> Question #197270 on Bazaar Subversion Plugin changed:
> https://answers.launchpad.net/bzr-svn/+question/197270
>
> Status: Answered => Solved
>
> Franz Roters confirmed that the question is solved:
> Dear Jelmer,
>
> sorry to ask again, but I believe this is exactly what I am doing.
>
> I am on Windows 7 using Bazaar explorer.
> I edited Settings/Rules to read:
>
> [name *.txt]
> svn-keywords = Id
>
> In windows rules is in USERHOME\AppData\Roaming\Bazaar2.0
Have you tried just "*" rather than "*.txt" ? Case sensitivity might be
involved here.

Another possibility is that there is a bug here. This particular bit of
the code probably hasn't been used extensively on Windows before.

Cheers,

Jelmer

Revision history for this message
Franz Roters (f-roters) said :
#9

> Have you tried just "*" rather than "*.txt" ? Case sensitivity might be
> involved here.

> Another possibility is that there is a bug here. This particular bit of
> the code probably hasn't been used extensively on Windows before.

There is no problem with the wild card expansion. It does exactly what it should do.

The Problem is that all files were the svn-keyword is expanded are shown as modified!
And this is emidiatley after the branch is created no real changes done!

As stated in my first contribution this kind of behaviour was observed before and is supposed to be fixed.
Maybe the fix does not work for Windoes??

Franz

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

Am 22/05/12 13:20, schrieb Franz Roters:
> Question #197270 on Bazaar Subversion Plugin changed:
> https://answers.launchpad.net/bzr-svn/+question/197270
>
> Status: Answered => Open
>
> Franz Roters is still having a problem:
>> Have you tried just "*" rather than "*.txt" ? Case sensitivity might be
>> involved here.
>> Another possibility is that there is a bug here. This particular bit of
>> the code probably hasn't been used extensively on Windows before.
>
> There is no problem with the wild card expansion. It does exactly what it should do.
>
> The Problem is that all files were the svn-keyword is expanded are shown as modified!
> And this is emidiatley after the branch is created no real changes done!
>
> As stated in my first contribution this kind of behaviour was observed before and is supposed to be fixed.
> Maybe the fix does not work for Windoes??
>
What does "bzr diff" show as the changes for these files?

Cheers,

jelmer

Revision history for this message
Franz Roters (f-roters) said :
#11

Dear Jelmer,

I guess I have to appologize.
The diff showed just the file names, so rating the files as modified seemed not due to the keyword expansion.

Much more strange, however, was the fact that I got different files indicated as being modified whenever I tried a new branch. Also the oevrlay Icons did not coincide with the file status, some showing ok while being indicated as modified and vice versa. However, it always concerbed only a subset of those files having keyword expansion activated.

Then a colleague of mine checked Bazaar on his Mac and everything worked as expected.

At this point I believed it was something about Win7 64bit.

Finally today I tried another time to get some more details to tell you and believe it or not

it finally works.

I have no idea what was going wrong before but today I tried twice and both tries worked out ok.

Thanks again for your patience and sorry for bothering you.
Windows behaves strange somtimes!

Franz