Patchwork [1,of,8] merge: use nullid instead of nullrev

login
register
mail settings
Submitter Durham Goode
Date May 31, 2013, 5:19 p.m.
Message ID <d6d28e9ca7f60bf791f0.1370020783@dev350.prn1.facebook.com>
Download mbox | patch
Permalink /patch/1685/
State Superseded, archived
Commit 9bfa86746c9c1f6ab51deb8f174ffc482417d09f
Headers show

Comments

Durham Goode - May 31, 2013, 5:19 p.m.
# HG changeset patch
# User Durham Goode <durham@fb.com>
# Date 1369961254 25200
#      Thu May 30 17:47:34 2013 -0700
# Node ID d6d28e9ca7f60bf791f0b9226804f9010441d88f
# Parent  913d6ce48c5173c5e8f425fa0c776efae454b192
merge: use nullid instead of nullrev

Using nullid instead of nullrev makes it easier to use a filelog implementation
that doesn't have the notion of rev numbers.

Patch

diff --git a/mercurial/merge.py b/mercurial/merge.py
--- a/mercurial/merge.py
+++ b/mercurial/merge.py
@@ -452,11 +452,11 @@ 
                 if fcl.parents():
                     fca = fcl.p1()
                 else:
-                    fca = repo.filectx(f, fileid=nullrev)
+                    fca = repo.filectx(f, fileid=nullid)
             else:
                 fca = fcl.ancestor(fco, actx)
             if not fca:
-                fca = repo.filectx(f, fileid=nullrev)
+                fca = repo.filectx(f, fileid=nullid)
             ms.add(fcl, fco, fca, fd)
             if f != fd and move:
                 moves.append(f)