empty working directory for bzr repo not repopulated by codetree

Bug #1690414 reported by Daniel Manrique
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
codetree
Confirmed
Medium
Unassigned

Bug Description

We found this issue when debugging a Mojo spec run for which a bzr repo pulled by a collect phase was mysteriously empty (the dir is empty but it *is* a bzr repo since it contains .bzr).

To reproduce use this collect file:

dpkg-offline lp:dpkg-offline

$ codetree collect
$ cd dpkg-offline
$ rm -rf COPYING dpkg_offline dummyfile old_dpkg_offline/ README scripts/ TUTORIAL.rst Vagrantfile
# confirm the directory is empty save for .bzr
$ cd ..
$ codetree collect

The dpkg-offline working files are not repopulated. Should they be?

$ apt-cache policy python-codetree
python-codetree:
  Installed: 0.1.5-5
  Candidate: 0.1.5-5
  Version table:
 *** 0.1.5-5 500
        500 http://ppa.launchpad.net/mojo-maintainers/ppa/ubuntu xenial/main amd64 Packages
        500 http://ppa.launchpad.net/mojo-maintainers/ppa/ubuntu xenial/main i386 Packages
        100 /var/lib/dpkg/status

Revision history for this message
Tom Haddon (mthaddon) wrote :

If a directory is empty (apart from .bzr) it should be repopulated.

Changed in codetree:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Daniel Manrique (roadmr) wrote :

You can just bzr revert after doing an update or pull:

  Giving a list of files will revert only those files. Otherwise, all files
  will be reverted. If the revision is not specified with '--revision', the
  working tree basis revision is used. A revert operation affects only the
  working tree, not any revision history like the branch and repository or
  the working tree basis revision.

I think a git equivalent would be "git checkout ." while standing on the branch.

Note this will obliterate any local changes to the branch but I think it's OK as codetree never guarantees it won't do so :)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.