Skip to content
Snippets Groups Projects
  1. Feb 22, 2025
  2. Apr 04, 2018
  3. Dec 11, 2017
    • Matt Harbison's avatar
      tests: remove (glob) annotations that were only for '\' matches · 4441705b7111
      Matt Harbison authored
      # skip-blame because this was mechanically rewritten the following script.  I
      ran it on both *.t and *.py, but none of the *.py changes were proper.  All *.t
      ones appear to be, and they run without addition failures on both Windows and
      Linux.
      
        import argparse
        import os
        import re
      
        ap = argparse.ArgumentParser()
        ap.add_argument('path', nargs='+')
        opts = ap.parse_args()
      
        globre = re.compile(r'^(.*) \(glob\)(.*)$')
      
        for p in opts.path:
            tmp = p + '.tmp'
            with open(p, 'rb') as src, open(tmp, 'wb') as dst:
                for line in src:
                    m = globre.match(line)
                    if not m or '$LOCALIP' in line or '*' in line:
                        dst.write(line)
                        continue
                    if '?' in line[:-3] or ('?' in line[:-3] and line[-3:] != '(?)'):
                        dst.write(line)
                        continue
                    dst.write(m.group(1) + m.group(2) + '\n')
            os.unlink(p)
            os.rename(tmp, p)
      4441705b7111
  4. Jun 08, 2015
  5. Jan 09, 2015
    • Durham Goode's avatar
      bundles: do not overwrite existing backup bundles (BC) · aa4a1672583e
      Durham Goode authored
      Previously, a backup bundle could overwrite an existing bundle and cause user
      data loss. For instance, if you have A<-B<-C and strip B, it produces backup
      bundle B-backup.hg. If you then hg pull -r B B-backup.hg and strip it again, it
      overwrites the existing B-backup.hg and C is lost.
      
      The fix is to add a hash of all the nodes inside that bundle to the filename.
      Fixed up existing tests and added a new test in test-strip.t
      aa4a1672583e
  6. Aug 18, 2014
    • Gregory Szorc's avatar
      hgweb: refresh repository using URL not path (issue4323) · c39d404f0eb0
      Gregory Szorc authored
      hgweb detects out-of-date repository instances (using a highly
      suspect mechanism that should probably be fixed) and obtains a new
      repository object if needed.
      
      This patch changes the repository object copy to use the repo URL
      (instead of path). This preserves more information about the source
      repository and allows bundles to be served through hgweb.
      
      A test verifying that bundles can now be served properly via
      `hg serve` has been added.
      c39d404f0eb0
Loading