@@ -172,7 +172,7 @@ def _get_commit(self):
172
172
#END handle type
173
173
return obj
174
174
175
- def set_commit (self , commit , msg = None ):
175
+ def set_commit (self , commit , logmsg = None ):
176
176
"""As set_object, but restricts the type of object to be a Commit
177
177
:raise ValueError: If commit is not a Commit object or doesn't point to
178
178
a commit
@@ -196,18 +196,18 @@ def set_commit(self, commit, msg = None):
196
196
#END handle raise
197
197
198
198
# we leave strings to the rev-parse method below
199
- self .set_object (commit , msg )
199
+ self .set_object (commit , logmsg )
200
200
201
201
return self
202
202
203
203
204
- def set_object (self , object , msg = None ):
204
+ def set_object (self , object , logmsg = None ):
205
205
"""Set the object we point to, possibly dereference our symbolic reference first.
206
206
If the reference does not exist, it will be created
207
207
208
208
:param object: a refspec, a SymbolicReference or an Object instance. SymbolicReferences
209
209
will be dereferenced beforehand to obtain the object they point to
210
- :param msg : If not None, the message will be used in the reflog entry to be
210
+ :param logmsg : If not None, the message will be used in the reflog entry to be
211
211
written. Otherwise the reflog is not altered
212
212
:note: plain SymbolicReferences may not actually point to objects by convention
213
213
:return: self"""
@@ -223,10 +223,10 @@ def set_object(self, object, msg = None):
223
223
# END handle non-existing ones
224
224
225
225
if is_detached :
226
- return self .set_reference (object , msg )
226
+ return self .set_reference (object , logmsg )
227
227
228
228
# set the commit on our reference
229
- return self ._get_reference ().set_object (object , msg )
229
+ return self ._get_reference ().set_object (object , logmsg )
230
230
231
231
commit = property (_get_commit , set_commit , doc = "Query or set commits directly" )
232
232
object = property (_get_object , set_object , doc = "Return the object our ref currently refers to" )
@@ -240,7 +240,7 @@ def _get_reference(self):
240
240
raise TypeError ("%s is a detached symbolic reference as it points to %r" % (self , sha ))
241
241
return self .from_path (self .repo , target_ref_path )
242
242
243
- def set_reference (self , ref , msg = None ):
243
+ def set_reference (self , ref , logmsg = None ):
244
244
"""Set ourselves to the given ref. It will stay a symbol if the ref is a Reference.
245
245
Otherwise an Object, given as Object instance or refspec, is assumed and if valid,
246
246
will be set which effectively detaches the refererence if it was a purely
@@ -249,7 +249,7 @@ def set_reference(self, ref, msg = None):
249
249
:param ref: SymbolicReference instance, Object instance or refspec string
250
250
Only if the ref is a SymbolicRef instance, we will point to it. Everthiny
251
251
else is dereferenced to obtain the actual object.
252
- :param msg : If set to a string, the message will be used in the reflog.
252
+ :param logmsg : If set to a string, the message will be used in the reflog.
253
253
Otherwise, a reflog entry is not written for the changed reference.
254
254
The previous commit of the entry will be the commit we point to now.
255
255
@@ -282,7 +282,7 @@ def set_reference(self, ref, msg = None):
282
282
#END verify type
283
283
284
284
oldbinsha = None
285
- if msg is not None :
285
+ if logmsg is not None :
286
286
try :
287
287
oldbinsha = self .commit .binsha
288
288
except ValueError :
@@ -299,8 +299,8 @@ def set_reference(self, ref, msg = None):
299
299
lfd .commit ()
300
300
301
301
# Adjust the reflog
302
- if msg is not None :
303
- self .log_append (oldbinsha , msg )
302
+ if logmsg is not None :
303
+ self .log_append (oldbinsha , logmsg )
304
304
#END handle reflog
305
305
306
306
return self
@@ -426,7 +426,7 @@ def delete(cls, repo, path):
426
426
427
427
428
428
@classmethod
429
- def _create (cls , repo , path , resolve , reference , force , msg = None ):
429
+ def _create (cls , repo , path , resolve , reference , force , logmsg = None ):
430
430
"""internal method used to create a new symbolic reference.
431
431
If resolve is False, the reference will be taken as is, creating
432
432
a proper symbolic reference. Otherwise it will be resolved to the
@@ -452,11 +452,11 @@ def _create(cls, repo, path, resolve, reference, force, msg=None):
452
452
# END no force handling
453
453
454
454
ref = cls (repo , full_ref_path )
455
- ref .set_reference (target , msg )
455
+ ref .set_reference (target , logmsg )
456
456
return ref
457
457
458
458
@classmethod
459
- def create (cls , repo , path , reference = 'HEAD' , force = False , msg = None ):
459
+ def create (cls , repo , path , reference = 'HEAD' , force = False , logmsg = None ):
460
460
"""Create a new symbolic reference, hence a reference pointing to another reference.
461
461
462
462
:param repo:
@@ -473,7 +473,7 @@ def create(cls, repo, path, reference='HEAD', force=False, msg=None):
473
473
if True, force creation even if a symbolic reference with that name already exists.
474
474
Raise OSError otherwise
475
475
476
- :param msg :
476
+ :param logmsg :
477
477
If not None, the message to append to the reflog. Otherwise no reflog
478
478
entry is written.
479
479
@@ -484,7 +484,7 @@ def create(cls, repo, path, reference='HEAD', force=False, msg=None):
484
484
already exists.
485
485
486
486
:note: This does not alter the current HEAD, index or Working Tree"""
487
- return cls ._create (repo , path , cls ._resolve_ref_on_create , reference , force , msg )
487
+ return cls ._create (repo , path , cls ._resolve_ref_on_create , reference , force , logmsg )
488
488
489
489
def rename (self , new_path , force = False ):
490
490
"""Rename self to a new path
0 commit comments