Skip to content

Commit

Permalink
In the status command report unknown packages with '?'.
Browse files Browse the repository at this point in the history
Only do this when no package-regexp has been given.
  • Loading branch information
mauritsvanrees committed Dec 14, 2011
1 parent 9138c22 commit cba728f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
4 changes: 4 additions & 0 deletions docs/HISTORY.txt
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ Changelog
1.20 - Unreleased 1.20 - Unreleased
----------------- -----------------


* In the status command report unknown packages with '?' when no
package-regexp has been given.
[maurits]

* Added --force option to purge command. Especially helpful in * Added --force option to purge command. Especially helpful in
purging non-subversion packages, which otherwise we refuse to purging non-subversion packages, which otherwise we refuse to
remove. Fixes issue #71. remove. Fixes issue #71.
Expand Down
14 changes: 13 additions & 1 deletion src/mr/developer/develop.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -611,6 +611,7 @@ def __init__(self, develop):
'~' not in auto-checkout list '~' not in auto-checkout list
'!' in auto-checkout list, but not checked out '!' in auto-checkout list, but not checked out
'C' the repository URL doesn't match 'C' the repository URL doesn't match
'?' unknown package (only reported when package-regexp is not specified)
The second column shows the working copy status: The second column shows the working copy status:
' ' no changes ' ' no changes
'M' local modifications or untracked files 'M' local modifications or untracked files
Expand Down Expand Up @@ -642,18 +643,22 @@ def __init__(self, develop):


def __call__(self, args): def __call__(self, args):
auto_checkout = self.develop.auto_checkout auto_checkout = self.develop.auto_checkout
sources_dir = self.develop.sources_dir
develeggs = self.develop.develeggs develeggs = self.develop.develeggs
packages = self.get_packages(getattr(args, 'package-regexp'), package_regexp = getattr(args, 'package-regexp')
packages = self.get_packages(package_regexp,
auto_checkout=args.auto_checkout, auto_checkout=args.auto_checkout,
checked_out=args.checked_out, checked_out=args.checked_out,
develop=args.develop) develop=args.develop)
workingcopies = WorkingCopies(self.develop.sources) workingcopies = WorkingCopies(self.develop.sources)
paths = []
for name in sorted(packages): for name in sorted(packages):
source = self.develop.sources[name] source = self.develop.sources[name]
if not source.exists(): if not source.exists():
if name in auto_checkout: if name in auto_checkout:
print "!", " ", name print "!", " ", name
continue continue
paths.append(source['path'])
if not workingcopies.matches(source): if not workingcopies.matches(source):
print "C", print "C",
else: else:
Expand Down Expand Up @@ -698,6 +703,12 @@ def __call__(self, args):
print " ", line print " ", line
print print


# Only report on unknown entries when we have no package regexp.
if not package_regexp:
for entry in os.listdir(sources_dir):
if not os.path.join(sources_dir, entry) in paths:
print '?', ' ', entry



class CmdUpdate(Command): class CmdUpdate(Command):
def __init__(self, develop): def __init__(self, develop):
Expand Down Expand Up @@ -785,6 +796,7 @@ def __call__(self, **kwargs):
root_logger.setLevel(logging.INFO) root_logger.setLevel(logging.INFO)
extension = Extension(buildout) extension = Extension(buildout)
self.sources = extension.get_sources() self.sources = extension.get_sources()
self.sources_dir = extension.get_sources_dir()
self.auto_checkout = extension.get_auto_checkout() self.auto_checkout = extension.get_auto_checkout()
self.always_checkout = extension.get_always_checkout() self.always_checkout = extension.get_always_checkout()
self.always_accept_server_certificate = extension.get_always_accept_server_certificate() self.always_accept_server_certificate = extension.get_always_accept_server_certificate()
Expand Down

0 comments on commit cba728f

Please sign in to comment.