bugGNU arch -- a revision control system - Bugs: bug #7223, add-id's detects of automatic...

 
 

bug #7223: add-id's detects of automatic changelog ids fails if the revision is not of the form 0.1

Submitter:  Elmar Hoffmann <elho>
Submitted:  Tue 13 Jan 2004 01:18:30 PM UTC
Votes: 75
 
Category:  tla Severity:  3 - Normal
Item Group:  bug Status:  None
Privacy:  Public Open/Closed:  Open
Release:  tla--devo--1.2--patch-57
Fixed Release: 
Merge Request?:  None
Your Archive Name: 
Your Archive Location: 
Assigned to:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 25 Jul 2006 03:30:26 PM UTC, comment #3: 

The workaround I have been using ever since reporting this bug is to do the following instead of 'tla add-id ChangeLog':

ID=$(grep '^# arch-tag: ' ChangeLog | sed 's/^# arch-tag: //') && echo $ID
tla add-id --id $ID ChangeLog

Which forces tla to use the original id from the tagline that does match arch_changelog_id_re. No need to change the tagging method. (The echo $ID is only there to see what's going on :))

Elmar Hoffmann <elho>
Tue 25 Jul 2006 01:34:14 PM UTC, comment #2: 

I've had a bit of trouble getting this to work as well, but finally figured out a way to get this to work.  I'm using tla-1.3.3-2 on Debian GNU/Linux (testing/unstable), in case that matters.

Here's the gist of what I did:

 $ mkdir changelog--auto--0.0
 $ cd changelog--auto--0.0
 $ tla archive-setup `basename $PWD`
 $ tla init-tree `basename $PWD`
 $ sed -i 's,^explicit,tagline,' \{arch\}/\=tagging-method
 $ tla changelog > ChangeLog
 $ tla make-log
 $ $EDITOR \+\+log*
 $ tla import

After that the content of ++log* gets added to the ChangeLog file.  I also added a number of other source files with `tla add-id` befor the import.  The crux is that you should NOT `tla add-id ChangeLog` because that changes the ID to use something that'll never match the arch_changelog_id_re #define quoted in the original bug report.

I'd also like to point out that the first example in the original bug report nicely illustrates this.  The ID starts with "x_Elmar_Hoffmann_<elho@elho.net>".  This will of course NEVER match that regexp in changelog.c, no matter what version number you use.

With regards to the followup by <tchernobog>, I'd hazard a guess that `tla inventory --ids` shows an ID that fails the regexp on the first part as well.

Invalid User ID <#50670>
Thu 16 Jun 2005 07:02:25 PM UTC, comment #1: 

I can confirm this: I usually use two version numbers after the dot (e.g. "0.01", "0.10", "1.40", etc.), and my ChangeLog isn't updated with a commit.
Any news of a fix?

Matteo Settenvini <tchernobog>
Tue 13 Jan 2004 01:18:30 PM UTC, original submission:  

Using a single digit revision the problem shows as follows, resulting in a ChangeLog that does not automatically update:
$ tla changelog >ChangeLog
$ grep arch-tag ChangeLog
# arch-tag: automatic-ChangeLog--elho@elho.net--foo/foo--main--0
$ tla add ChangeLog
$ tla inventory --ids
S  ChangeLog    x_Elmar_Hoffmann_<elho@elho.net>_Tue_Jan_13_11:53:12_2004_24707.0

Using a digit-dot-digit style revision it works fine:
$ tla changelog >ChangeLog
$ grep arch-tag ChangeLog
# arch-tag: automatic-ChangeLog--elho@elho.net--bar/bar--main--0.1
$ tla add ChangeLog
$ tla inventory --ids
S  ChangeLog    x_automatic-ChangeLog--elho@elho.net--bar/bar--main--0.1

tla obviously allows more general revisions to be created than it later checks for.
The described problem with add-id lies in the following regexp which is used in the latter one:
libarch/namespace.h:#define arch_vsn_re "[[:([0-9]+\\.[0-9]+):]]"
libarch/changelogs.c:#define arch_changelog_id_re "^([ix]_automatic-ChangeLog--)(" arch_archive_re ")/(" arch_base_re ")(--" arch_base_re ")?(--" arch_vsn_re ")$"

Elmar Hoffmann <elho>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 75 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

Only logged-in users can vote.

 

Follow 3 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2006-07-25 elho Carbon-Copy- Added elho
2006-02-28 dwm Carbon-Copy- Added dwm
2005-06-16 tchernobog Carbon-Copy- Added tchernobog

Back to the top

Powered by Savane 3.13-02a9.
Corresponding source code