bugGNU arch -- a revision control system - Bugs: bug #5112, Rework replay command-line...

 
 

bug #5112: Rework replay command-line processing

Submitted by:  Miles Bader <miles>
Submitted on:  Sun 07 Sep 2003 02:02:43 AM UTC  
 
Category: tlaSeverity: 3 - Normal
Item Group: small feature ideaStatus: Fixed
Privacy: PublicOpen/Closed: Closed
Release: lord@emf.net--2003b/tla--devo--1.1--patch-153
Fixed Release: tla-1.1pre6, lord@emf.net--2003b/tla--devo--1.1--patch-174
Merge Request?: yes -- merge from my archive
Your Archive Name: miles@gnu.org--gnu-2003
Your Archive Location: http://arch.linuxguru.net/~miles/miles@gnu.org--gnu-2003
Assigned to: None

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Mon 08 Sep 2003 03:25:59 AM UTC, comment #2:

> Formerly,
>
> tla replay REVISION
>
> would replay all revisions from the one just past the most recent
> revision my tree already has, up to REVISION.


Did it really do that?!? The docstring doesn't mention it, and the
code didn't seem to do anything like that:

In the old code, the default (without extra options) was always
arch_replay_op_missing, and that just did:

version = arch_parse_package_name (arch_ret_non_archive, 0, src_spec);
revisions = arch_whats_missing (tree_root, arch, version);
... replay revisions ...

In arch_whats_missing, I see this:

has = arch_log_ls (tree_root, arch->name, version, 0);
needs = arch_archive_revisions (arch, version, 0);
answer = rel_join (2, rel_join_output (2,0, -1), 0, 0, has, needs);

Does `arch_archive_revisions' do something magic along those lines?
I got a bit lost trying to trace how things happen below that, but as
far as I can see it just ignores any patch-level specified.

The one feature I did remove was that if you specified `--exact VERSION'
it would replay just the last patch-level in VERSION; this was
undocumented, and didn't seem particularly useful (maybe the intent was
to use it in conjunction with --reverse?)

> How do I do this after these changes?


You can't. I think the cleanest way to do this sort of thing would be
an `--until REVISION' option.

Then you could do `tla replay --until REVISION' which seems very
intuitive.

> The `update' command invokes the `replay' command.
>
> Does that still work correctly?


As far as I can tell. update just uses `tla replay --new VERSION' and
my change shouldn't effect that usage; update explicitly makes sure that
VERSION doesn't contain a patch-level:

version = arch_parse_package_name (arch_ret_package_version, 0, rvsnspec);
...
arch_call_cmd (arch_cmd_replay, argv[0], "--new", "-A", archive, "--dir", dest, version, 0);

-Miles

Miles Bader <miles>
Sun 07 Sep 2003 02:16:32 AM UTC, comment #1:

Formerly,

tla replay REVISION

would replay all revisions from the one just past the
most recent revision my tree already has, up to REVISION.
How do I do this after these changes?

The `update' command invokes the `replay' command.
Does that still work correctly?

-t

Tom Lord <tomlord>
Project Member
Sun 07 Sep 2003 02:02:43 AM UTC, original submission:

(1) Remove the --exact option. Now if you specify a revision, it will apply (or reverse) exactly that revision, and if you specify a version it will apply missing/new patches in that version.

I think this new usage is far more natural; --exact always seemed superfluous (`I specified a revision, why can't it know to just apply that revision?!?'), sort of like --files did.

(2) Allow multiple version/revision arguments. I've often wanted to replay multiple changesets at once, and it's a minor convenience to be able to give them all on the command line. It's probably less useful for version arguments, but I implemented that too for consistency's sake.

(3) Do more rigorous argument checking, and hopefully improve the error messages a bit.

(4) Eliminate all the duplicate code between the `missing' and `new' cases.

Miles Bader <miles>

 

(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 23 Sep 2003 08:42:37 PM UTCtomlordStatusNone=>(Error - Not Found)
  Open/ClosedOpen=>(Error - Not Found)
  Fixed Releasemiles@gnu.org--gnu-2003/tla--devo--1.1--patch-29=>

Back to the top


Powered by Savane 3.1-cleanup1