bugGNU arch -- a revision control system - Bugs: bug #5414, --skip-present may fail in some...

 
 

bug #5414: --skip-present may fail in some situations

Submitted by:  Mr. Nobody <gnubert>
Submitted on:  Thu 18 Sep 2003 11:46:44 PM UTC  
 
Category: tlaSeverity: 3 - Normal
Item Group: bugStatus: Fixed
Privacy: PublicOpen/Closed: Closed
Release: tla--devo--1.1--patch-170
Fixed Release: 
Merge Request?: yes -- diffs included
Your Archive Name: 
Your Archive Location: 
Assigned to: None

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Tue 25 Nov 2003 09:32:50 PM UTC, comment #5:

garrh, patch-203.

Robert Collins <robertc>
Tue 25 Nov 2003 09:32:17 PM UTC, comment #4:

merged into lord@emf.net--2003b/tla--devo--1.1--patch-204

Robert Collins <robertc>
Sat 08 Nov 2003 11:41:13 AM UTC, comment #3:

rbtcollins@hotmail.com--barch/tla--integration--1.1--patch-4 has this patch in it. Thanks for diagnosing this, and I'll heckle Tom to get it included.

Robert Collins <robertc>
Thu 02 Oct 2003 12:07:33 AM UTC, comment #2:

I updated to tla--devo--1.1--patch-188, but the problem still exists:

Patch 182 introduces sorting of "has" and "needs" lists, but this has an
effect only on changesets from the other branch (that this branch
already `has' or still `needs'). Changesets from this branch that are
already present in the other branch and should be skipped, are not
handled at this step, but later, in filter_present_logs() -- that's
where my diff would apply.

Mr. Nobody <gnubert>
Tue 30 Sep 2003 10:44:05 PM UTC, comment #1:

Tom thinks he fixed this already, as he hit it in a different use-case to skip-present... can you please test and confirm by closing the bug.

Robert Collins <robertc>
Thu 18 Sep 2003 11:46:44 PM UTC, original submission:

Hi,

when there is a patch to be skipped, and there also are
missing patches with a lower number of digits in the patch
level, --skip-present will not work as expected.

> patch-168 (simple changeset)
> Wed Sep 17 15:47:53 PDT 2003 Tom Lord <lord@emf.net>
> --skip-present support (rbcollins)


I just wanted to try it out, and found, that it didn't seem
to work for my special case: patches-6..12 missing, but
patch-11 containing logs already in the local tree. So
patch-11 should be skipped.

In whats-missing.c/filter_present_logs, I could see that
`unfiltered' and `to_skip' had the values:

unfiltered to_skip

patch-6 patch-11
patch-7
patch-8
patch-9
patch-10
patch-11
patch-12

Rel_join then joins the lists, including only items from
`unfiltered' that are smaller than corresponding items in
`to_skip'. But rel_join is using str_cmp, so that "patch-6" is
already greater than "patch-11", so that `to_skip' gets
incremented, and the rest of `unfiltered' just printed.

If `unfiltered' and `to_skip' were sorted before joining,
the lists would look

unfiltered to_skip

patch-10 patch-11
patch-11
patch-12
patch-6
patch-7
patch-8
patch-9

and the result of rel_join would be as expected:

------------------------------------------------------------>8----------
--- orig/libarch/whats-missing.c
+++ mod/libarch/whats-missing.c
@@ -123,7 +123,14 @@
lim_free (0, revision);
}
rel_free_table (has);
+
+ rel_sort_table_by_field (0, to_skip, 0);
+ rel_sort_table_by_field (0, unfiltered, 0);
+
answer = rel_join (1, rel_join_output (1,0, -1), 0, 0, unfiltered, to_skip);
+
+ arch_sort_table_by_patch_level_field (0, answer, 0);
+
rel_free_table (unfiltered);
rel_free_table (to_skip);
return answer;
----------8<------------------------------------------------------------

--
Michael

Mr. Nobody <gnubert>

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 3 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Tue 25 Nov 2003 09:32:17 PM UTCrobertcStatusNone=>(Error - Not Found)
  Open/ClosedOpen=>(Error - Not Found)
  Releasetla--devo--1.1--patch-170 =>

Back to the top


Powered by Savane 3.1-cleanup1