You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/source/changes.rst
+66-65
Original file line number
Diff line number
Diff line change
@@ -9,13 +9,14 @@ Changelog
9
9
used previously usually fails to release its resources (i.e. file handles), which can lead to problems when working
10
10
with large repositories.
11
11
* CRITICAL: fixed incorrect `Commit` object serialization when authored or commit date had timezones which were not
12
-
divisable by 3600 seconds. This would happen if the timezone was something like `+0530` for instance.
12
+
divisiblej by 3600 seconds. This would happen if the timezone was something like `+0530` for instance.
13
13
* A list of all additional fixes can be found `on github <https://github.com/gitpython-developers/GitPython/issues?q=milestone%3A%22v1.0.2+-+Fixes%22+is%3Aclosed>`_
14
+
* CRITICAL: `Tree.cache` was removed without replacement. It is technically impossible to change individual trees and expect their serialization results to be consistent with what *git* expects. Instead, use the `IndexFile` facilities to adjust the content of the staging area, and write it out to the respective tree objects using `IndexFile.write_tree()` instead.
14
15
15
16
1.0.1 - Fixes
16
17
=============
17
18
18
-
* A list of all issues can be found `on github <https://github.com/gitpython-developers/GitPython/issues?q=milestone%3A%22v1.0.1+-+Fixes%22+is%3Aclosed>`_
19
+
* A list of all issues can be found `on github <https://github.com/gitpython-developers/GitPython/issues?q=milestone%3A%22v1.0.1+-+Fixes%22+is%3Aclosed>`_
19
20
20
21
1.0.0 - Notes
21
22
=============
@@ -29,18 +30,18 @@ It follows the `semantic version scheme <http://semver.org>`_, and thus will not
29
30
* `IndexFile.add()` will now write the index without any extension data by default. However, you may override this behaviour with the new `write_extension_data` keyword argument.
30
31
31
32
- Renamed `ignore_tree_extension_data` keyword argument in `IndexFile.write(...)` to `ignore_extension_data`
32
-
* If the git command executed during `Remote.push(...)|fetch(...)` returns with an non-zero exit code and GitPython didn't
33
+
* If the git command executed during `Remote.push(...)|fetch(...)` returns with an non-zero exit code and GitPython didn't
33
34
obtain any head-information, the corresponding `GitCommandError` will be raised. This may break previous code which expected
34
-
these operations to never raise. However, that behavious is undesirable as it would effectively hide the fact that there
35
+
these operations to never raise. However, that behavious is undesirable as it would effectively hide the fact that there
35
36
was an error. See `this issue <https://github.com/gitpython-developers/GitPython/issues/271>`_ for more information.
36
37
37
38
* If the git executable can't be found in the PATH or at the path provided by `GIT_PYTHON_GIT_EXECUTABLE`, this is made
38
39
obvious by throwing `GitCommandNotFound`, both on unix and on windows.
39
40
40
41
- Those who support **GUI on windows** will now have to set `git.Git.USE_SHELL = True` to get the previous behaviour.
41
-
42
-
* A list of all issues can be found `on github <https://github.com/gitpython-developers/GitPython/issues?q=milestone%3A%22v0.3.7+-+Fixes%22+is%3Aclosed>`_
43
-
42
+
43
+
* A list of all issues can be found `on github <https://github.com/gitpython-developers/GitPython/issues?q=milestone%3A%22v0.3.7+-+Fixes%22+is%3Aclosed>`_
44
+
44
45
45
46
0.3.6 - Features
46
47
================
@@ -54,7 +55,7 @@ It follows the `semantic version scheme <http://semver.org>`_, and thus will not
54
55
* As `rev_parse` will now throw `BadName` as well as `BadObject`, client code will have to catch both exception types.
55
56
* Repo.working_tree_dir now returns None if it is bare. Previously it raised AssertionError.
56
57
* IndexFile.add() previously raised AssertionError when paths where used with bare repository, now it raises InvalidGitRepositoryError
57
-
58
+
58
59
* Added `Repo.merge_base()` implementation. See the `respective issue on github <https://github.com/gitpython-developers/GitPython/issues/169>`_
59
60
* `[include]` sections in git configuration files are now respected
60
61
* Added `GitConfigParser.rename_section()`
@@ -89,7 +90,7 @@ It follows the `semantic version scheme <http://semver.org>`_, and thus will not
89
90
=======
90
91
* `Fix for #207 <https://github.com/gitpython-developers/GitPython/issues/207>`_
91
92
92
-
0.3.2
93
+
0.3.2
93
94
=====
94
95
95
96
* Release of most recent version as non-RC build, just to allow pip to install the latest version right away.
@@ -100,13 +101,13 @@ It follows the `semantic version scheme <http://semver.org>`_, and thus will not
100
101
* **git** command wrapper
101
102
102
103
* Added ``version_info`` property which returns a tuple of integers representing the installed git version.
103
-
104
+
104
105
* Added GIT_PYTHON_GIT_EXECUTABLE environment variable, which can be used to set the desired git executable to be used. despite of what would be found in the path.
105
-
106
+
106
107
* **Blob** Type
107
108
108
109
* Added mode constants to ease the manual creation of blobs
109
-
110
+
110
111
* **IterableList**
111
112
112
113
* Added __contains__ and __delitem__ methods
@@ -118,8 +119,8 @@ It follows the `semantic version scheme <http://semver.org>`_, and thus will not
118
119
* Parsing of tags was improved. Previously some parts of the name could not be parsed properly.
119
120
* The rev-parse pure python implementation now handles branches correctly if they look like hexadecimal sha's.
120
121
* GIT_PYTHON_TRACE is now set on class level of the Git type, previously it was a module level global variable.
121
-
* GIT_PYTHON_GIT_EXECUTABLE is a class level variable as well.
122
-
122
+
* GIT_PYTHON_GIT_EXECUTABLE is a class level variable as well.
123
+
123
124
124
125
0.3.1 Beta 2
125
126
============
@@ -128,7 +129,7 @@ It follows the `semantic version scheme <http://semver.org>`_, and thus will not
128
129
* New types: ``RefLog`` and ``RefLogEntry``
129
130
* Reflog is maintained automatically when creating references and deleting them
130
131
* Non-intrusive changes to ``SymbolicReference``, these don't require your code to change. They allow to append messages to the reflog.
131
-
132
+
132
133
* ``abspath`` property added, similar to ``abspath`` of Object instances
133
134
* ``log()`` method added
134
135
* ``log_append(...)`` method added
@@ -137,19 +138,19 @@ It follows the `semantic version scheme <http://semver.org>`_, and thus will not
* ``create(...)`` method now supports the reflog, but will not raise ``GitCommandError`` anymore as it is a pure python implementation now. Instead, it raises ``OSError``.
142
-
143
+
143
144
* **Intrusive Changes** to ``Repo`` type
144
-
145
+
145
146
* ``create_head(...)`` method does not support kwargs anymore, instead it supports a logmsg parameter
146
-
147
+
147
148
* Repo.rev_parse now supports the [ref]@{n} syntax, where *n* is the number of steps to look into the reference's past
148
149
149
150
* **BugFixes**
150
151
151
152
* Removed incorrect ORIG_HEAD handling
152
-
153
+
153
154
* **Flattened directory** structure to make development more convenient.
154
155
155
156
* .. note:: This alters the way projects using git-python as a submodule have to adjust their sys.path to be able to import git-python successfully.
@@ -178,7 +179,7 @@ Renamed Modules
178
179
* git.utils -> git.util
179
180
* git.errors -> git.exc
180
181
* git.objects.utils -> git.objects.util
181
-
182
+
182
183
General
183
184
-------
184
185
* Object instances, and everything derived from it, now use binary sha's internally. The 'sha' member was removed, in favor of the 'binsha' member. An 'hexsha' property is available for convenient conversions. They may only be initialized using their binary shas, reference names or revision specs are not allowed anymore.
@@ -189,7 +190,7 @@ General
189
190
* IndexFile.get_entries_key was renamed to entry_key
190
191
* IndexFile.write_tree: removed missing_ok keyword, its always True now. Instead of raising GitCommandError it raises UnmergedEntriesError. This is required as the pure-python implementation doesn't support the missing_ok keyword yet.
191
192
* diff.Diff.null_hex_sha renamed to NULL_HEX_SHA, to be conforming with the naming in the Object base class
192
-
193
+
193
194
194
195
0.2 Beta 2
195
196
===========
@@ -200,56 +201,56 @@ General
200
201
=====
201
202
General
202
203
-------
203
-
* file mode in Tree, Blob and Diff objects now is an int compatible to definintiions
204
-
in the stat module, allowing you to query whether individual user, group and other
204
+
* file mode in Tree, Blob and Diff objects now is an int compatible to definintiions
205
+
in the stat module, allowing you to query whether individual user, group and other
205
206
read, write and execute bits are set.
206
207
* Adjusted class hierarchy to generally allow comparison and hash for Objects and Refs
207
-
* Improved Tag object which now is a Ref that may contain a tag object with additional
208
+
* Improved Tag object which now is a Ref that may contain a tag object with additional
208
209
Information
209
-
* id_abbrev method has been removed as it could not assure the returned short SHA's
210
+
* id_abbrev method has been removed as it could not assure the returned short SHA's
210
211
where unique
211
212
* removed basename method from Objects with path's as it replicated features of os.path
212
-
* from_string and list_from_string methods are now private and were renamed to
213
-
_from_string and _list_from_string respectively. As part of the private API, they
213
+
* from_string and list_from_string methods are now private and were renamed to
214
+
_from_string and _list_from_string respectively. As part of the private API, they
214
215
may change without prior notice.
215
216
* Renamed all find_all methods to list_items - this method is part of the Iterable interface
216
217
that also provides a more efficients and more responsive iter_items method
217
218
* All dates, like authored_date and committer_date, are stored as seconds since epoc
218
-
to consume less memory - they can be converted using time.gmtime in a more suitable
219
+
to consume less memory - they can be converted using time.gmtime in a more suitable
219
220
presentation format if needed.
220
-
* Named method parameters changed on a wide scale to unify their use. Now git specific
221
+
* Named method parameters changed on a wide scale to unify their use. Now git specific
221
222
terms are used everywhere, such as "Reference" ( ref ) and "Revision" ( rev ).
222
223
Prevously multiple terms where used making it harder to know which type was allowed
223
224
or not.
224
225
* Unified diff interface to allow easy diffing between trees, trees and index, trees
225
226
and working tree, index and working tree, trees and index. This closely follows
226
227
the git-diff capabilities.
227
-
* Git.execute does not take the with_raw_output option anymore. It was not used
228
+
* Git.execute does not take the with_raw_output option anymore. It was not used
228
229
by anyone within the project and False by default.
229
-
230
+
230
231
231
232
Item Iteration
232
233
--------------
233
-
* Previously one would return and process multiple items as list only which can
234
-
hurt performance and memory consumption and reduce response times.
235
-
iter_items method provide an iterator that will return items on demand as parsed
234
+
* Previously one would return and process multiple items as list only which can
235
+
hurt performance and memory consumption and reduce response times.
236
+
iter_items method provide an iterator that will return items on demand as parsed
236
237
from a stream. This way any amount of objects can be handled.
237
238
* list_items method returns IterableList allowing to access list members by name
238
-
239
+
239
240
objects Package
240
241
----------------
241
-
* blob, tree, tag and commit module have been moved to new objects package. This should
242
-
not affect you though unless you explicitly imported individual objects. If you just
242
+
* blob, tree, tag and commit module have been moved to new objects package. This should
243
+
not affect you though unless you explicitly imported individual objects. If you just
243
244
used the git package, names did not change.
244
-
245
+
245
246
Blob
246
247
----
247
248
* former 'name' member renamed to path as it suits the actual data better
248
249
249
250
GitCommand
250
251
-----------
251
-
* git.subcommand call scheme now prunes out None from the argument list, allowing
252
-
to be called more confortably as None can never be a valid to the git command
252
+
* git.subcommand call scheme now prunes out None from the argument list, allowing
253
+
to be called more confortably as None can never be a valid to the git command
253
254
if converted to a string.
254
255
* Renamed 'git_dir' attribute to 'working_dir' which is exactly how it is used
255
256
@@ -263,43 +264,43 @@ Config
263
264
* The git configuration can now be read and manipulated directly from within python
264
265
using the GitConfigParser
265
266
* Repo.config_reader() returns a read-only parser
266
-
* Repo.config_writer() returns a read-write parser
267
-
267
+
* Repo.config_writer() returns a read-write parser
268
+
268
269
Diff
269
270
----
270
271
* Members a a_commit and b_commit renamed to a_blob and b_blob - they are populated
271
272
with Blob objects if possible
272
273
* Members a_path and b_path removed as this information is kept in the blobs
273
-
* Diffs are now returned as DiffIndex allowing to more quickly find the kind of
274
+
* Diffs are now returned as DiffIndex allowing to more quickly find the kind of
274
275
diffs you are interested in
275
-
276
+
276
277
Diffing
277
278
-------
278
-
* Commit and Tree objects now support diffing natively with a common interface to
279
+
* Commit and Tree objects now support diffing natively with a common interface to
279
280
compare agains other Commits or Trees, against the working tree or against the index.
280
281
281
282
Index
282
283
-----
283
284
* A new Index class allows to read and write index files directly, and to perform
284
285
simple two and three way merges based on an arbitrary index.
285
-
286
+
286
287
Referernces
287
288
------------
288
289
* References are object that point to a Commit
289
290
* SymbolicReference are a pointer to a Reference Object, which itself points to a specific
290
291
Commit
291
-
* They will dynmically retrieve their object at the time of query to assure the information
292
-
is actual. Recently objects would be cached, hence ref object not be safely kept
292
+
* They will dynmically retrieve their object at the time of query to assure the information
293
+
is actual. Recently objects would be cached, hence ref object not be safely kept
293
294
persistent.
294
-
295
+
295
296
Repo
296
297
----
297
298
* Moved blame method from Blob to repo as it appeared to belong there much more.
298
-
* active_branch method now returns a Head object instead of a string with the name
299
+
* active_branch method now returns a Head object instead of a string with the name
299
300
of the active branch.
300
301
* tree method now requires a Ref instance as input and defaults to the active_branche
301
302
instead of master
302
-
* is_dirty now takes additional arguments allowing fine-grained control about what is
303
+
* is_dirty now takes additional arguments allowing fine-grained control about what is
303
304
considered dirty
304
305
* Removed the following methods:
305
306
@@ -311,15 +312,15 @@ Repo
311
312
- 'create' method which equals the 'init' method's functionality
312
313
- 'diff' - it returned a mere string which still had to be parsed
313
314
- 'commit_diff' - moved to Commit, Tree and Diff types respectively
314
-
315
+
315
316
* Renamed the following methods:
316
317
317
318
- commits to iter_commits to improve the performance, adjusted signature
318
319
- init_bare to init, implying less about the options to be used
319
320
- fork_bare to clone, as it was to represent general clone functionality, but implied
320
321
a bare clone to be more versatile
321
322
- archive_tar_gz and archive_tar and replaced by archive method with different signature
322
-
323
+
323
324
* 'commits' method has no max-count of returned commits anymore, it now behaves like git-rev-list
324
325
* The following methods and properties were added
325
326
@@ -330,16 +331,16 @@ Repo
330
331
- 'config_reader' method
331
332
- 'config_writer' method
332
333
- 'bare' property, previously it was a simple attribute that could be written
333
-
334
+
334
335
* Renamed the following attributes
335
336
336
337
- 'path' is now 'git_dir'
337
338
- 'wd' is now 'working_dir'
338
-
339
+
339
340
* Added attribute
340
341
341
342
- 'working_tree_dir' which may be None in case of bare repositories
342
-
343
+
343
344
Remote
344
345
------
345
346
* Added Remote object allowing easy access to remotes
@@ -349,15 +350,15 @@ Remote
349
350
Test Framework
350
351
--------------
351
352
* Added support for common TestCase base class that provides additional functionality
352
-
to receive repositories tests can also write to. This way, more aspects can be
353
+
to receive repositories tests can also write to. This way, more aspects can be
353
354
tested under real-world ( un-mocked ) conditions.
354
355
355
356
Tree
356
357
----
357
358
* former 'name' member renamed to path as it suits the actual data better
358
359
* added traverse method allowing to recursively traverse tree items
359
360
* deleted blob method
360
-
* added blobs and trees properties allowing to query the respective items in the
361
+
* added blobs and trees properties allowing to query the respective items in the
361
362
tree
362
363
* now mimics behaviour of a read-only list instead of a dict to maintain order.
363
364
* content_from_string method is now private and not part of the public API anymore
@@ -496,14 +497,14 @@ Git
496
497
497
498
* Added support for ``stderr``, ``stdin``, and ``with_status``.
498
499
499
-
* ``git_dir`` is now optional in the constructor for ``git.Git``. Git now
500
+
* ``git_dir`` is now optional in the constructor for ``git.Git``. Git now
500
501
falls back to ``os.getcwd()`` when git_dir is not specified.
501
502
502
-
* add a ``with_exceptions`` keyword argument to git commands.
503
+
* add a ``with_exceptions`` keyword argument to git commands.
503
504
``GitCommandError`` is raised when the exit status is non-zero.
504
505
505
-
* add support for a ``GIT_PYTHON_TRACE`` environment variable.
506
-
``GIT_PYTHON_TRACE`` allows us to debug GitPython's usage of git through
506
+
* add support for a ``GIT_PYTHON_TRACE`` environment variable.
507
+
``GIT_PYTHON_TRACE`` allows us to debug GitPython's usage of git through
507
508
the use of an environment variable.
508
509
509
510
Tree
@@ -519,8 +520,8 @@ Repo
519
520
520
521
Tree
521
522
----
522
-
* Corrected problem with ``Tree.__div__`` not working with zero length files.
523
-
Removed ``__len__`` override and replaced with size instead. Also made size
523
+
* Corrected problem with ``Tree.__div__`` not working with zero length files.
524
+
Removed ``__len__`` override and replaced with size instead. Also made size
0 commit comments