Skip to content
Snippets Groups Projects
  1. Nov 18, 2015
    • Laurent Charignon's avatar
      localrepo: put bookmark move following commit in one transaction · 4414d500604f
      Laurent Charignon authored
      Before this patch, making a commit on a local repo could move a bookmark and
      both operations would not be grouped as one transaction. This patch makes both
      operations part of one transaction. This is necessary to switch to the new api
      to save bookmarks repo._bookmarks.recordchange if we don't want to change the
      current behavior of rollback.
      
      Dirstate change happening after the commit is done is now part of the
      transaction mentioned above. This leads to a change in the expected output of
      several tests.
      
      The change to test-fncache happens because both lock are now released in the
      same finally clause. The lock release is made explicitly buggy in this test.
      Previously releasing lock would crash triggering release of wlock that crashes
      too. Now lock release crash does not directly result in the release of wlock.
      Instead wlock is released at garbage collection time and the error raised at
      that time "confuses" python.
      4414d500604f
  2. Nov 17, 2015
  3. Nov 18, 2015
  4. Nov 17, 2015
  5. Nov 12, 2015
  6. Nov 16, 2015
    • Siddharth Agarwal's avatar
      node: add 'nullhex', hex-encoded nullid · 18f50b8cbf1e
      Siddharth Agarwal authored
      We're going to need this for upcoming changes, because the merge state stores
      nodes as hex strings.
      18f50b8cbf1e
    • Siddharth Agarwal's avatar
      filemerge: introduce class whose objects represent files not in a context · 7b038ec6c5fd
      Siddharth Agarwal authored
      Most code is going to barf at the return values here (particularly from data
      and size), so we restrict it to the filemerge code.
      
      This is already somewhat supported via:
      
        ctx.filectx(f, fileid=nullid)
      
      Indeed, for add/add conflicts (ancestor doesn't have the file) we use precisely
      that. However, that is broken in subtle ways:
      - The cmp() function in filectx returns False (identical) for such a filectx
        when compared to a zero-length file.
      - size() returns 0 rather than some sort of value indicating that the file isn't
        present.
      - data() returns '' rather than some sort of value indicating that the file isn't
        present.
      
      Given the relatively niche use of such filectxes, this seems to be the simplest
      way to fix all these issues.
      7b038ec6c5fd
    • Siddharth Agarwal's avatar
      filectx: add isabsent method · 9b9d4bcc915e
      Siddharth Agarwal authored
      This will indicate whether this filectx represents a file that is *not* in a
      changectx. This will be used by merge and filemerge code to know about when a
      conflict is a change/delete conflict.
      
      While this is kind of hacky, it is the least bad of all the alternatives. Other
      options considered but rejected include:
      - isinstance(fctx, ...) -- not very Pythonic, doesn't support duck typing
      - fctx.size() is None -- the 'size()' call on workingfilectxes causes a disk stat
      - fctx.filenode() == nullid -- the semantics around filenode are incredibly
        confusing. In particular, for workingfilectxes, filenode() is always None no
        matter whether the file is present on disk or in either parent. Having different
        behavior for None versus nullid in the merge code is just asking for pain.
      
      Thanks to Pierre-Yves David for early review feedback here.
      9b9d4bcc915e
  7. Nov 14, 2015
    • Siddharth Agarwal's avatar
      filectx: allow custom comparators · bd19561b98d9
      Siddharth Agarwal authored
      We're going to introduce other sorts of filectxes very soon, and we'd like the
      cmp method to function properly (i.e. commutatively) for them. The only way to
      make that happen is for this cmp method to call into that specialized one if
      that defines a custom comparator.
      bd19561b98d9
    • Siddharth Agarwal's avatar
      debugmergestate: print out record type for files · c48fee950ce4
      Siddharth Agarwal authored
      We're going to add a separate record type for change/delete conflicts soon. We
      need to make sure they get stored with the correct record type so that older
      versions of Mercurial correctly abort when they see change/delete records.
      c48fee950ce4
  8. Nov 16, 2015
  9. Nov 17, 2015
  10. Nov 15, 2015
    • Shubhanshu Agrawal's avatar
      strip: renaming local variables · 4b0c3df5d635
      Shubhanshu Agrawal authored
      Renaming local variables to be more precise, i want to store
      a different list of bookmarks and it would be hard to
      understand what marks represents in that change therefore
      renaming it to repomarks. Renamed bookmarks(module)
      to bookmarksmod as to free up bookmarks which will be
      used when pluralizing bookmark.
      4b0c3df5d635
  11. Feb 12, 2015
    • Martin von Zweigbergk's avatar
      test-rename-merge2: make selected output less arbitrary · 9f3410a52f44
      Martin von Zweigbergk authored
      It's unclear why everything from the first 'updating:' line should be
      ignored. The arbitrariness makes it confusing that changing the code
      so e.g. the 'getting 8/f' line is printed later makes it disappear
      completely from the ouput. The list of 'preserving x for resolve of y'
      seems convered by the subsequent for loop in the test case. Perhaps
      it's only copies that are of interests, so let's keep only that part.
      9f3410a52f44
  12. Nov 16, 2015
  13. Nov 15, 2015
  14. Nov 11, 2015
  15. Nov 09, 2015
  16. Nov 01, 2015
    • Yuya Nishihara's avatar
      import-checker: reset context to verify convention in function scope · 1fa66d3ad28d
      Yuya Nishihara authored
      I got the following error by rewriting hgweb/webcommands.py to use
      absolute_import. It is false-positive because the import line appears in
      "help" function:
      
        hgweb/webcommands.py:1297: higher-level import should come first: mercurial
      
      This patch makes the import checker aware of the function scope and apply
      rules recursively.
      1fa66d3ad28d
  17. Oct 31, 2015
    • Yuya Nishihara's avatar
      import-checker: allow import of child modules from package root · 5abba2c92da3
      Yuya Nishihara authored
      I got the following error by rewriting hgweb/__init__.py to use
      absolute_import, which is obviously wrong:
      
        Import cycle: mercurial.hgweb.__init__ -> mercurial.hgweb.__init__
      
      "from foo import bar" should not make a cycle if "foo" is a package and
      if "bar" is a module or a package. On the other hand, it should be detected
      as a cycle if "bar" is a non-module name. Both cases are doc-tested already,
      so this patch does not add new doctest.
      5abba2c92da3
  18. Nov 02, 2015
  19. Nov 14, 2015
  20. Nov 13, 2015
  21. Nov 06, 2015
  22. Nov 12, 2015
Loading