Opened 4 years ago

Closed 4 years ago

#3635 closed defect (fixed)

ensure_dependencies.py doesn't work when neither a .git nor a .hg directory is present

Reported by: fhd Assignee:
Priority: P4 Milestone:
Module: Automation Keywords: goodfirstbug
Cc: trev, sebastian Blocked By:
Blocking: Platform: Unknown / Cross platform
Ready: yes Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

https://github.com/adblockplus/buildtools/pull/6

Description (last modified by fhd)

Environment

buildtools revision ff4ea4c5f0a1.

How to reproduce

  1. Create a shallow clone of the buildtools repository: hg archive -R buildtools buildtools-shallow.
  2. Run ensure_dependencies.py in the buildtools-shallow directory.

Observed behaviour

ensure_dependencies.py exits with the following error:

Traceback (most recent call last):
  File "./ensure_dependencies.py", line 371, in <module>
    resolve_deps(repo)
  File "./ensure_dependencies.py", line 310, in resolve_deps
    source, rev = merge_seqs(sources.get("*"), sources.get(vcs))
UnboundLocalError: local variable 'vcs' referenced before assignment

Expected behaviour

The dependencies should be checked out.

Change History (6)

comment:1 Changed 4 years ago by sebastian

  • Blocking 1299 added
  • Keywords goodfirstbug added
  • Priority changed from Unknown to P2
  • Ready set

comment:2 Changed 4 years ago by fhd

  • Description modified (diff)
  • Summary changed from ensure_dependencies should default to Mercurial when neither a .hg or .git directory is present to ensure_dependencies.py doesn't work when neither a .git nor a .hg directory is present
  • Type changed from change to defect

I thought this makes more sense as a defect. As far as I'm concerned, defaulting to Mercurial is sufficient to fix this. But we can also think about solutions that work if a repository only has Git dependencies specified (a use case we currently don't have, however).

Last edited 4 years ago by fhd (previous) (diff)

comment:3 Changed 4 years ago by sebastian

  • Blocking 1299 removed
  • Priority changed from P2 to P4

comment:4 Changed 4 years ago by sebastian

  • Review URL(s) modified (diff)
  • Status changed from new to reviewing

comment:5 Changed 4 years ago by abpbot

A commit referencing this issue has landed:
https://hg.adblockplus.org/buildtools/rev/5b11ede67929

comment:6 Changed 4 years ago by sebastian

  • Resolution set to fixed
  • Status changed from reviewing to closed
Note: See TracTickets for help on using tickets.