##// END OF EJS Templates
git: initialize `extra` to have at least the branch name for nullid...
Matt Harbison -
r47826:f8fa7ec5 stable
parent child Browse files
Show More
@@ -221,9 +221,10 b' class changelog(baselog):'
221 n = self.node(nodeorrev)
221 n = self.node(nodeorrev)
222 else:
222 else:
223 n = nodeorrev
223 n = nodeorrev
224 extra = {b'branch': b'default'}
224 # handle looking up nullid
225 # handle looking up nullid
225 if n == nullid:
226 if n == nullid:
226 return hgchangelog._changelogrevision(extra={}, manifest=nullid)
227 return hgchangelog._changelogrevision(extra=extra, manifest=nullid)
227 hn = gitutil.togitnode(n)
228 hn = gitutil.togitnode(n)
228 # We've got a real commit!
229 # We've got a real commit!
229 files = [
230 files = [
@@ -253,7 +254,7 b' class changelog(baselog):'
253 filesremoved=filesremoved,
254 filesremoved=filesremoved,
254 description=c.message.encode('utf8'),
255 description=c.message.encode('utf8'),
255 # TODO do we want to handle extra? how?
256 # TODO do we want to handle extra? how?
256 extra={b'branch': b'default'},
257 extra=extra,
257 )
258 )
258
259
259 def ancestors(self, revs, stoprev=0, inclusive=False):
260 def ancestors(self, revs, stoprev=0, inclusive=False):
@@ -57,6 +57,12 b' Test some edge cases around a commitless'
57 $ hg init --git
57 $ hg init --git
58 $ hg heads
58 $ hg heads
59 [1]
59 [1]
60 $ hg tip
61 changeset: -1:000000000000
62 tag: tip
63 user:
64 date: Thu Jan 01 00:00:00 1970 +0000
65
60 $ cd ..
66 $ cd ..
61
67
62 Make a new repo with git:
68 Make a new repo with git:
General Comments 0
You need to be logged in to leave comments. Login now