Patchwork clone: don't include empty revlogs in stream

login
register
mail settings
Submitter Mads Kiilerich
Date Jan. 15, 2013, 12:53 a.m.
Message ID <a8c9154dd941cf6eb952.1358211209@localhost6.localdomain6>
Download mbox | patch
Permalink /patch/624/
State Accepted
Commit 7ac4449f0f39993b5e00985ecb3369abdbac18a3
Headers show

Comments

Mads Kiilerich - Jan. 15, 2013, 12:53 a.m.
# HG changeset patch
# User Mads Kiilerich <mads@kiilerich.com>
# Date 1358211088 -3600
# Node ID a8c9154dd941cf6eb95298aad2d7134d3aed4375
# Parent  cf5c76017e11ed711d02824117baf770e45c2655
clone: don't include empty revlogs in stream
Bryan O'Sullivan - Jan. 15, 2013, 6:49 p.m.
On Mon, Jan 14, 2013 at 4:53 PM, Mads Kiilerich <mads@kiilerich.com> wrote:
> clone: don't include empty revlogs in stream

Looks reasonable.
Mads Kiilerich - Jan. 15, 2013, 8:02 p.m.
On 01/15/2013 07:49 PM, Bryan O'Sullivan wrote:
> On Mon, Jan 14, 2013 at 4:53 PM, Mads Kiilerich <mads@kiilerich.com> wrote:
>> clone: don't include empty revlogs in stream
> Looks reasonable.

In crew

/Mads
Martin Schröder - Jan. 15, 2013, 8:06 p.m.
Am 15.01.2013 21:02, schrieb Mads Kiilerich:
> On 01/15/2013 07:49 PM, Bryan O'Sullivan wrote:
>> On Mon, Jan 14, 2013 at 4:53 PM, Mads Kiilerich <mads@kiilerich.com>
>> wrote:
>>> clone: don't include empty revlogs in stream
>> Looks reasonable.
> 
> In crew
> 

Just for understanding: How can empty revlogs happen to exist?
Bryan O'Sullivan - Jan. 15, 2013, 8:41 p.m.
On Tue, Jan 15, 2013 at 12:06 PM, Martin Schröder
<martin.schroeder@nerdluecht.de> wrote:
> Just for understanding: How can empty revlogs happen to exist?

Destructive updates such as rollback or strip.

Patch

diff --git a/mercurial/wireproto.py b/mercurial/wireproto.py
--- a/mercurial/wireproto.py
+++ b/mercurial/wireproto.py
@@ -545,8 +545,9 @@  def stream(repo, proto):
         try:
             repo.ui.debug('scanning\n')
             for name, ename, size in repo.store.walk():
-                entries.append((name, size))
-                total_bytes += size
+                if size:
+                    entries.append((name, size))
+                    total_bytes += size
         finally:
             lock.release()
     except error.LockError: