Comments (6)
I'm for it. In git that should be quite simple (i. e. for extreme fast implementation we can call git command).
from vcs.
One more thing, after implementing slicing, i notice that current (numerical) slicing works in odd way,
In [7]: import vcs; r = vcs.get_repo('/home/hg/vcs');list(r['3803844fdbd3':'dc5d2c0661b6']);list(r[7:9])
Out[7]:
[<MercurialChangeset at 7:3803844fdbd3b711175fc3da9bdacfcd6d29a6fb>,
<MercurialChangeset at 8:dc5d2c0661b61928834a785d3e64a3f80d3aad9c>]
Out[7]:
[<MercurialChangeset at 246:cc3ef1b53735ad82c97686d97ef3e65ae7586aef>,
<MercurialChangeset at 245:690f784528ee3a5612ec50b475182ffa2e551783>]
Revisions are reversed I would expect when i reach for 7:9 i would get them, You think this should be fixed ?
from vcs.
Well...
This is because iter at BaseRepository reverses changesets. It was design decision we did a long ago - it allows construction as this:
for cs in repo:
print cs
To show changesets in ~"historical" order. I believe we can change that - but all external codes that depends on this structure should be reviewed. Nevertheless, I suppose we should change that so slices would gives us changeset instances in same order as slices of Repository.revisions.
from vcs.
We need to stabilize API for Repository.iter, Repository.getslice and Repository.get_changesets ASAP.
I'm also not happy with parameters allowed at get_changests. There should be at least couple of more parameters (start/end date, first/last changeset, branch name, limit, remove offset probably as it is not as straightforward as should be).
Maybe we should rename this issue, schedule it for 0.2 and change from "proposal" to "enhancement" ?
from vcs.
Ok, i'd think i stabilize the api by latests commits. both git and hg act the same when iterating, slicing, and using getitem
from vcs.
Duplicate of #44
from vcs.
Related Issues (20)
- Standup command HOT 1
- git clone tests fails
- Python2.5: ZipFile.open was not there yet HOT 1
- _get_id_for_path function returns wrong node ids
- support cloning from ssh
- Create LazyChangeset
- Mercurial workdir get_changeset is broken
- running vcs log command fails
- vcs.diffs.get_gitdiff is not working HOT 4
- Fix this ugly description at pypi
- Git _parsed_refs should handle local/remote branch names correctly
- License issue in /vcs/backends/git/config.py HOT 17
- Support cmdline backends HOT 2
- Version 0.5.0 is unreleased to pypi HOT 1
- Python3 version HOT 7
- support perforce HOT 15
- travis fails on mercurial version HOT 8
- setup.py: unittest2 should be in tests_require, not install_requires
- Operation on closed file HOT 2
- This repo alive? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vcs.