view tests/test-commit-copy.t @ 14074:e8271159c8c2

filelog: extract metadata parsing and packing _parsemeta returns the dictionary and a list of keys in the order they appear in metadata. This can be used to repack the dictionary in the same order. _packmeta creates metadata from a dictionary and an optional key-order list. In _parsemeta, we use slices and re.search indead of str.index so we can accept both buffers and strings.
author Sune Foldager <cryo@cyanite.org>
date Sat, 30 Apr 2011 16:32:50 +0200
parents b90199179eb5
children ec5886db9dc6
line wrap: on
line source

  $ hg init dir
  $ cd dir
  $ echo bleh > bar
  $ hg add bar
  $ hg ci -m 'add bar'

  $ hg cp bar foo
  $ echo >> bar
  $ hg ci -m 'cp bar foo; change bar'

  $ hg debugrename foo
  foo renamed from bar:26d3ca0dfd18e44d796b564e38dd173c9668d3a9
  $ hg debugindex .hg/store/data/bar.i
     rev    offset  length   base linkrev nodeid       p1           p2
       0         0       6      0       0 26d3ca0dfd18 000000000000 000000000000
       1         6       7      1       1 d267bddd54f7 26d3ca0dfd18 000000000000