Skip to content
Snippets Groups Projects
  1. Feb 08, 2016
    • Martin von Zweigbergk's avatar
      treemanifest: fix debugrebuildfncache · 6f248ba85309
      Martin von Zweigbergk authored
      When I taught debugrebuildfncache about dirlogs in fb92927f9775
      (treemanifests: fix streaming clone, 2016-02-04), I added a
      last-minute "if 'treemanifest' in repo" guard. That should have been
      checking for "... in repo.requirements". Fix that and add tests for
      it.
      6f248ba85309
  2. Feb 03, 2016
  3. Feb 02, 2016
    • Pierre-Yves David's avatar
      update: warn about other topological heads on bare update · 72072cfc7e91
      Pierre-Yves David authored
      A concern around the user experience of Mercurial is user getting stuck on there
      own topological branch forever. For example, someone pulling another topological
      branch, missing that message in pull asking them to merge and getting stuck on
      there own local branch.
      
      The current way to "address" this concern was for bare 'hg update' to target the
      tipmost (also latest pulled) changesets and complain when the update was not
      linear. That way, failure to merge newly pulled changesets would result in some
      kind of failure.
      
      Yet the failure was quite obscure, not working in all cases (eg: commit right
      after pull) and the behavior was very impractical in the common case
      (eg: issue4673).
      
      To be able to change that behavior, we need to provide other ways to alert a
      user stucks on one of many topological head. We do so with an extra message after
      bare update:
      
        1 other heads for branch "default"
      
      Bookmark get its own special version:
      
        1 other divergent bookmarks for "foobar"
      
      There is significant room to improve the message itself, and we should augment
      it with hint about how to see theses other heads or handle the situation (see
      in-line comment). But having "a" message is already a significant improvement
      compared to the existing situation. Once we have it we can iterate on a better
      version of it. As having such message is an important step toward changing the
      default destination for update and other nicety, I would like to move forward
      quickly on getting such message.
      
      This was discussed during London - October 2015 Sprint.
      72072cfc7e91
  4. Feb 03, 2016
    • timeless's avatar
      tests: mock getpid to reduce glob usage · ac49ecb2a897
      timeless authored
      With util.getpid, it is now possible to define fixed pids.
      
      Future iterations can define a map of pids on a locked
      first come first serve basis to create a more realistic
      harness, but for now this is good enough.
      
      This applies to blackbox, but could apply to other
      tests as well.
      ac49ecb2a897
    • timeless's avatar
      util: enable getpid to be replaced · 14033c5dd261
      timeless authored
      This will enable tests to write stable process ids.
      14033c5dd261
  5. Feb 08, 2016
  6. Feb 03, 2016
    • timeless's avatar
      blackbox: flush output file descriptor · ab6468270b83
      timeless authored
      Without this, when there are multiple ui views, each blackbox
      will have its own file handle, and the logging will be in
      a really bad order.
      
      Also, because of the way blackbox works, it never closes its
      file handles, which means the last output before exit is
      often lost.
      ab6468270b83
    • timeless's avatar
      tests: change blackbox test to work cross platform · 142891ab6e89
      timeless authored
      While it is not easy to make a file 000 on Windows, you can
      emulate most of the behaviors by replacing the file with a directory.
      
      Also corrects test description to properly indicate that failing to
      read from the log is fatal.
      142891ab6e89
  7. Feb 02, 2016
  8. Feb 03, 2016
    • Siddharth Agarwal's avatar
      rebase: respect checkunknown and checkignored in more cases · e397b58c0563
      Siddharth Agarwal authored
      checkunknown and checkignored are currently respected for updates and regular
      merges, but not for certain kinds of rebases. To be precise, they aren't
      respected for rebases when:
      
      (1) we're rebasing while currently on the destination commit, and
      (2) an untracked or ignored file F is currently in the working copy, and
      (3) the same file F is in a source commit, and
      (4) F has different contents in the source commit.
      
      This happens because rebases set force to True when calling merge.update.
      Setting force to True makes a lot of sense in general, but it turns out the
      force option is overloaded: there's a deprecated '--force' option in merge that
      allows you to merge in outstanding changes, including changes in untracked
      files. We use the 'mergeforce' parameter to tell those two cases apart.
      
      I think the behavior during rebases when checkunknown is 'abort' (the default)
      is wrong -- we should abort on or overwrite differing untracked files, not try
      to merge them in. However that currently breaks rebases by aborting in the
      middle -- we need better handling for that case before we can change the
      default.
      e397b58c0563
    • Siddharth Agarwal's avatar
      test-merge-force: add tests for merge.checkunknown=warn · d0d805df6a44
      Siddharth Agarwal authored
      In an upcoming patch we're going to change the behavior of some merges with
      merge.checkunknown=warn or ignore -- ensure that the behavior of the deprecated
      'merge --force' remains the same.
      d0d805df6a44
  9. Feb 02, 2016
  10. Feb 06, 2016
  11. Feb 03, 2016
  12. Feb 07, 2016
  13. Jan 19, 2016
    • Jun Wu's avatar
      chgserver: create new process group after fork (issue5051) · 83fc0c055664
      Jun Wu authored
      This is to make SIGTSTP work. Before the patch, the server process group is
      considered "orphaned" and will ignore SIGTSTP, SIGTTIN, SIGTTOU, according to
      POSIX. See the comment above `will_become_orphaned_pgrp` in `kernel/exit.c`
      from Linux 4.3 for details.
      
      SIGTSTP is important if chgserver runs some ncurses commend like `commit -i`.
      Ncurses has its own SIGTSTP handler which will do the following:
      
        1. Clean the screen
        2. Stop itself by resending SIGTSTP to itself
        3. Restore the screen
      
      If SIGTSTP is ignored, step 2 will be a noop, which means the process cannot
      be suspended properly.
      
      In order to make things work, chg client needs to forward SIGTSTP and SIGCONT
      to server as well.
      83fc0c055664
  14. Feb 05, 2016
    • Matt Mackall's avatar
      check-commit: check for double-addition of blank lines · e529b5f1b9e3
      Matt Mackall authored
      Previously, we were only checking for a blank line being added next to
      an existing one. Now we also check for two being added at the same time.
      e529b5f1b9e3
    • Matt Mackall's avatar
      897b2fcf079f
    • Durham Goode's avatar
      merge: add file ancestor linknode to mergestate · 8abd9f785030
      Durham Goode authored
      During a merge, each file has a current commitnode+filenode, an other
      commitnode+filenode, and an ancestor commitnode+filenode. The ancestor
      commitnode is not stored though, and we rely on the ability for the filectx() to
      look up the commitnode by using the filenode's linkrev. In alternative backends
      (like remotefilelog), linkrevs may have restriction that prevent arbitrary
      linkrev look up given a filenode.
      
      This patch accounts for that by storing the ancestor commitnode in
      the merge state so that it is available later at resolve time.
      
      This results in some test changes because the ancestor commitnode we're using at
      resolve time changes slightly. Before, we used the linkrev commit, which is the
      earliest commit that introduced that particular filenode (which may not be the
      latest common ancestor of the commits being merged). Now we use the latest
      common ancestor of the merged commits as the commitnode. This is fine though,
      because that commit contains the same filenode as the linkrev'd commit.
      8abd9f785030
    • Durham Goode's avatar
      merge: add debugmergestate support for _stateextras · eb22def9db3b
      Durham Goode authored
      Now that we can store extras for each file, we need to have support for showing
      it in debugmergestate (the tests depend on this).
      eb22def9db3b
    • Durham Goode's avatar
      merge: add state extras merge state data · 4a25e91fa55d
      Durham Goode authored
      In future commits we will want to store more data related to each file in the
      merge state. This patch adds an optional record for storing a dictionary of
      extras for each file.
      4a25e91fa55d
    • Durham Goode's avatar
      revset: use manifest.matches in _follow revset · 86c4cbdaffee
      Durham Goode authored
      The old _follow revset iterated over every file in the commit and checked if it
      matched. For repos with large manifests, this could take 500ms. By switching to
      use manifest.matches() we can take advantage of the fastpaths built in to
      manifest.py that allows iterating over only the files in the matcher when it's a
      simple matcher. This brings the time spent down from 500ms to 0ms during simple
      operations like 'hg log -f file.txt'.
      86c4cbdaffee
  15. Feb 04, 2016
    • Martin von Zweigbergk's avatar
      treemanifests: fix streaming clone · fb92927f9775
      Martin von Zweigbergk authored
      Similar to the previous patch, the .hg/store/meta/ directory does not
      get copied when when using "hg clone --uncompressed". Fix by including
      "meta/" in store.datafiles(). This seems safe to do, as there are only
      a few users of this method. "hg manifest" already filters the paths by
      "data/" prefix. The calls from largefiles also seem safe. The use in
      verify needs updating to prevent it from mistaking dirlogs for
      orphaned filelogs. That change is included in this patch.
      
      Since the dirlogs will now be in the fncache when using fncachestore,
      let's also update debugrebuildfncache(). That will also allow any
      existing treemanifest repos to get their dirlogs into the fncache.
      
      Also update test-treemanifest.t to use an a directory name that
      requires dot-encoding and uppercase-encoding so we test that the path
      encoding works.
      fb92927f9775
  16. Feb 03, 2016
  17. Feb 04, 2016
  18. Feb 05, 2016
    • Durham Goode's avatar
      copies: optimize forward copy detection logic for rebases · d4247c306d82
      Durham Goode authored
      Forward copy detection (i.e. detecting what files have been moved/copied in
      commit X since ancestor Y) previously required diff'ing the manifests of both X
      and Y. This was expensive since it required reading both entire manifests and
      doing a set difference (they weren't already in a set because of the
      lazymanifest work). This cost almost 1 second on very large repositories, and
      happens N times for a rebase of N commits.
      
      This patch optimizes it for the case of rebase. In a rebase, we are comparing a
      commit against it's immediate parent, and therefore we can know what files
      changed by looking at ctx.files().  This lets us drastically decrease the size
      of the set comparison, and makes it O(# of changes) instead of O(size of
      manifest). This makes it take 1ms instead of 1000ms.
      d4247c306d82
  19. Jan 26, 2016
  20. Feb 05, 2016
    • Katsunori FUJIWARA's avatar
      tests: remove protected file forcibly for portability · 90cff855ae1c
      Katsunori FUJIWARA authored
      Before this patch, test-command-template.t is timed out on Solaris,
      because "rm" on permission denied file implies prompting "override
      protection 0 (yes/no)?" and blocks execution of test script.
      90cff855ae1c
    • Katsunori FUJIWARA's avatar
      tests: dump journal file by python script instead of sed for portability · afb86ee925bf
      Katsunori FUJIWARA authored
      Before this patch, test-repair-strip.t fails on Solaris, because of
      "sed" on it doesn't work as expected if input contains null ('\0')
      character.
      afb86ee925bf
    • Katsunori FUJIWARA's avatar
      tests: execute check-config.py without xargs · 8f244b75cc5e
      Katsunori FUJIWARA authored
      Before this patch, test-check-config.t fails on Solaris, because
      "xargs" doesn't invoke check-config.py with all filenames at once.
      
      "xargs" may invoke specified command multiple times with part of
      arguments given from stdin: according to "xargs(1)" man page, this
      dividing arguments is system-dependent.
      
      For portability of test-check-config.t, this patch adds "xargs" like
      mode to check-config.py and executes it in test-check-config.t without
      "xargs".
      8f244b75cc5e
Loading