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

rewrite add/changed/modified functions #35

Open
lukaszb opened this issue Jan 24, 2011 · 2 comments
Open

rewrite add/changed/modified functions #35

lukaszb opened this issue Jan 24, 2011 · 2 comments

Comments

@lukaszb
Copy link
Member

lukaszb commented Jan 24, 2011

In terms of current a/c/m attributes and usage of files() after some thinking i believe that usage of
localrepo.status() would be much better.

For example
hg st --change REV gives You modified, added, removed, deleted files for that REV, thus making merge changes same as in diff.

And it's much faster than current try except solution.


Reference: https://bitbucket.org/marcinkuzminski/vcs/issues/35/

@marcinkuzminski
Copy link
Member

We don't have 'hg st' equivalent implemented within vcs ;-)

Our added/modified etc are: a) for changeset it's difference between the parent b) for inmemorychangeset it's difference between tip

We could of course implement this but this issue is related with 'workdir' functionality (and branch).

Moreover, I'm almost sure you'd like to implement 'hg st' using internal mercurial api, right? Not to fire off system calls (just making sure)?

Marcin Kuzminski / marcinkuzminski

written 2 months ago

I already did that. So now it's just a matter of rewrite some of the codes.

modified, added, removed, deleted = self.repository.repo.status(self._ctx,self._ctx.parents()[0])[:4]

When passing None to second argument, You'll get compare with current state of repository

Marcin Kuzminski / marcinkuzminski

written 2 months ago

As well as this function was turned on for showing changed files for merges, i'm still not happy with the speed of add/changed/modified functions it seems they the slowest point when browsing changesets

Marcin Kuzminski / marcinkuzminski

written 27 days ago

As the speed was vastly improved with several recent patches, one more problem of memory usage remains, using manifest() with repositories that uses a lot of files, causes huge memory usage. The problem with current implementation is that for each CS called within repository instance we call manifest() each time.

Example: if first commit of repository contains 20K files, iteration over 1000 first changesets generates (20 000+cs delta) * 1000 objects. There is a manifest delta method that shows only changes between revisions, but we have to find some smarter way of implementing this.

@lukaszb
Copy link
Member Author

lukaszb commented Jan 10, 2012

Can we close it or is there anything left to be done?

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

No branches or pull requests

2 participants