Skip to content

cherry_picker.py opens wrong page #55

Closed

Description

@serhiy-storchaka

When I run cherry_picker.py it opens pages like https://github.com/python/cpython/compare/3.5...iy-storchaka:c85a266-3.5?expand=1 that compares changes between branches 3.5 and c85a266-3.5 in the python/cpython repository. Since branch c85a266-3.5 in the python/cpython repository doesn't exist there isn't anything to compare. However branch c85a266-3.5 is created in my fork of the python/cpython repository.

Activity

  1. ncoghlan commented on Mar 19, 2017

    @ncoghlan
    Contributor

    @serhiy-storchaka I just merged a change that adds both a --dry-run option (to see the exact git commands and PR URLs the cherry picker is calculating) and a --push option to tell it which remote to use for submitting the PR branches. (I need the latter since my PR branches should go to the pr remote, rather than origin)

    Running with --dry-run should give a bit more info on where things may be going wrong.

  2. serhiy-storchaka commented on Mar 19, 2017

    @serhiy-storchaka
    MemberAuthor

    Thanks, I'll try it when merge next PR that needs to be backported.

  3. serhiy-storchaka commented on Mar 19, 2017

    @serhiy-storchaka
    MemberAuthor
    serhiy@raxxla:~/py/cpython$ ./python ../core-workflow/cherry_picker/cherry_picker.py --dry-run a5af6e1 3.6 3.5
    Dry run requested, listing expected command sequence
    fetching upstream ...
      dry-run: git fetch upstream
    Now backporting 'a5af6e1' into '3.6'
      dry-run: git checkout -b backport-a5af6e1-3.6 upstream/3.6
      dry-run: git cherry-pick -x a5af6e1
      dry-run: git push origin backport-a5af6e1-3.6
      dry-run: Create new PR: https://github.com/python/cpython/compare/3.6...serhiy-storchaka:backport-a5af6e1-3.6?expand=1
      dry-run: git checkout master
      dry-run: git branch -D backport-a5af6e1-3.6
    Now backporting 'a5af6e1' into '3.5'
      dry-run: git checkout -b backport-a5af6e1-3.5 upstream/3.5
      dry-run: git cherry-pick -x a5af6e1
      dry-run: git push origin backport-a5af6e1-3.5
      dry-run: Create new PR: https://github.com/python/cpython/compare/3.5...serhiy-storchaka:backport-a5af6e1-3.5?expand=1
      dry-run: git checkout master
      dry-run: git branch -D backport-a5af6e1-3.5
    serhiy@raxxla:~/py/cpython$ ./python ../core-workflow/cherry_picker/cherry_picker.py a5af6e1 3.6 3.5
    fetching upstream ...
    Now backporting 'a5af6e1' into '3.6'
    Розпакування файлів: 100% (836/836), виконано.
    Попередня позиція HEAD була a5af6e1... bpo-25455: Fixed crashes in repr of recursive buffered file-like objects. (#514)
    Перейшов до нової гілки 'backport-a5af6e1-3.6'
    Підрахунок об’єктів: 16, виконано.
    Delta compression using up to 4 threads.
    Стиснення об’єктів: 100% (16/16), виконано.
    Запис об’єктів: 100% (16/16), 6.52 KiB | 0 bytes/s, виконано.
    Total 16 (delta 14), reused 0 (delta 0)
    remote: Resolving deltas: 100% (14/14), completed with 13 local objects.
    To git@github.com:serhiy-storchaka/cpython.git
     * [new branch]      backport-a5af6e1-3.6 -> backport-a5af6e1-3.6
    Перейшов до гілки 'master'
    branch backport-a5af6e1-3.6 has been deleted.
    Now backporting 'a5af6e1' into '3.5'
    Розпакування файлів: 100% (2020/2020), виконано.
    Перейшов до нової гілки 'backport-a5af6e1-3.5'
    error: не можливо застосувати a5af6e1... bpo-25455: Fixed crashes in repr of recursive buffered file-like objects. (#514)
    підказка: після вирішення конфлікту позначте коректні шляхи
    підказка: за допомогою 'git add <paths>' або 'git rm <paths>'
    підказка: і підтвердіть зміни за допомогою 'git commit'
    Failed to cherry-pick a5af6e1 into 3.5 :(
    error: спочатку потрібно вирішити конфлікти у Вашому поточному індексі
    error: Неможливо вилучити гілку 'backport-a5af6e1-3.5', у якій ви зараз знаходитеся.
    branch backport-a5af6e1-3.5 NOT deleted.
    

    Correct page was opened for the backport to 3.6. No page was opened for 3.5.

  4. Mariatta commented on Mar 19, 2017

    @Mariatta
    Member

    Oh... There was a failure with cherry-picking the change into 3.5, perhaps there was a merge conflict? Because it failed, it doesn't push and so no page gets opened.

    підказка: після вирішення конфлікту позначте коректні шляхи
    підказка: за допомогою 'git add <paths>' або 'git rm <paths>'
    підказка: і підтвердіть зміни за допомогою 'git commit'
    Failed to cherry-pick a5af6e1 into 3.5 :(
    
  5. ncoghlan commented on Mar 20, 2017

    @ncoghlan
    Contributor

    So #51 and/or #45 might have helped here:

    Either way, I think we're into the known problem territory of figuring out what we should do when the cherry pick fails.

  6. serhiy-storchaka commented on Mar 20, 2017

    @serhiy-storchaka
    MemberAuthor

    Yes, that failure looks unrelated to the original issue. For 3.6 the correct page was opened. I made yet three backporting and they opened correct pages. But all usages of cherry_picker.py before my report opened wrong pages. Maybe this issue was fixed in recent commits, at the time when the --dry-run option was added.

  7. ncoghlan commented on Mar 20, 2017

    @ncoghlan
    Contributor

    I think I know what the fix would have been: the change to handle username extraction for SSH remotes.

    Previously that part of the code assumed HTTPS URLs: https://github.com/python/core-workflow/pull/53/files#diff-38c9b0e8a4187a5b64e731dbad32eafeR75

    I'd just forgotten about that adjustment by the time I wrote the commit message.

  8. serhiy-storchaka commented on Mar 20, 2017

    @serhiy-storchaka
    MemberAuthor

    Thank you Nick.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions