Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pinto pull <list_of_modules produces erroneous "pinto log" entry #86

Closed
akarelas opened this issue Jun 29, 2013 · 2 comments
Closed

pinto pull <list_of_modules produces erroneous "pinto log" entry #86

akarelas opened this issue Jun 29, 2013 · 2 comments

Comments

@akarelas
Copy link

I have this list of modules in a text file:

Starman
Rose::DB::Object
Dancer2
Package::Stash::XS

I do a pinto pull <list_of_modules, and all 4 modules appear in a single pinto log entry. So far so good.

When I append the following two lines to my list_of_modules file, however:

JSON::XS
JSON

...and then pinto pull <list_of_modules again, I get the following new erroneous log entry (erroneous because it repeats the modules which were pulled in step 1):

$ pinto log
revision 7d94a42a-196d-4bab-8a6a-115597637e9f
Date: Jun 29, 2013 7:39:02 AM
User: forums

    Pull MIYAGAWA/Starman-0.3014.tar.gz, JSIRACUSA/Rose-DB-Object-0.806.tar.gz, SUKRIA/Dancer2-0.04.tar.gz, DOY/Package-Stash-XS-0.26.tar.gz, MLEHMANN/JSON-XS-2.34.tar.gz, MAKAMAKA/JSON-2.59.tar.gz

revision d55561dd-6bc0-4e60-b60b-d5e102b74262
Date: Jun 29, 2013 5:38:56 AM
User: forums

    Pull MIYAGAWA/Starman-0.3014.tar.gz, JSIRACUSA/Rose-DB-Object-0.806.tar.gz, SUKRIA/Dancer2-0.04.tar.gz, DOY/Package-Stash-XS-0.26.tar.gz


@thaljef
Copy link
Owner

thaljef commented Feb 1, 2014

There has been some slight improvement here. Pinto now dedupes and sorts the list of targets in the commit message. But it doesn't yet filter out the ones that were actually pulled. That is doable though.

thaljef pushed a commit that referenced this issue Mar 23, 2014
This is an attempt to fix GH #86.  The goal was to
just remove targets from the log message that have already
been pulled.  But this turns out to be more complicated
because you might pull a target just to register its
prereqs, even though the target itself is already
registered.

So now, the message is reduced to the fewest possible
targets, removing those that were not affected by the
operation unless one of it's prereqs was affected.

However, it's not perfect.  Sometimes you really want
that target in the list, or you may be confused about
why it isn't there.  To avoid confusion, I've added
a warning about pulling targets that are already on
the stack.
thaljef pushed a commit that referenced this issue Mar 24, 2014
      [BUG FIXES]

      - Fixed behavior of the --force flag on the new "update" command.
      It now applies to all packages that might be updated, not just the
      targets list on the command line.

      [ENHANCEMENTS]

      - When generating the title for the log message, only the targets
      at the top of the dependency graph are listed, and only if they
      (or one of their prerequisites) were actually affected by the
      operation.  In effect, redundant and prereq targets are therefore
      excluded from the message. This attempts to fix GH #86. Thanks @akarelas.
@thaljef
Copy link
Owner

thaljef commented Apr 22, 2014

I think I've fixed this as much as I can. There's no way for Pinto to always know exactly which targets should appear in the commit message. So it tries to make a best guess based on which targets actually caused the stack to change.

@thaljef thaljef closed this as completed Apr 22, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants