Skip to content
Snippets Groups Projects
  1. Jul 06, 2012
  2. Jul 09, 2012
  3. Jul 05, 2012
  4. Jul 06, 2012
  5. Jul 04, 2012
  6. Jul 05, 2012
    • kiilerix's avatar
      parsers.c: remove warning: 'size' may be used uninitialized in this function · 249cc4ec
      kiilerix authored
      Some compilers / compiler options (such as gcc 4.7) would emit warnings:
      
      mercurial/parsers.c: In function 'pack_dirstate':
      mercurial/parsers.c:306:18: warning: 'size' may be used uninitialized in this function [-Wmaybe-uninitialized]
      mercurial/parsers.c:306:12: warning: 'mode' may be used uninitialized in this function [-Wmaybe-uninitialized]
      
      It is apparently not smart enough to figure out how the 'err' arithmetics makes
      sure that it can't happen.
      
      'err' is now replaced with simple checks and goto. That might also help the
      optimizer when it is inlining getintat().
      249cc4ec
  7. Jul 11, 2012
  8. Jul 06, 2012
    • Katsunori FUJIWARA's avatar
      localrepo: use file API via vfs while ensuring repository directory · be016e96
      Katsunori FUJIWARA authored
      As a part of migration to vfs, this patch invokes some file API
      indirectly via vfs, while ensuring repository directory in the
      constructor of "localrepository" class.
      
      New file API are added to "scmutil.abstractopener" class, because they
      are also used via other derived classes than "scmutil.opener".
      
      But "join()" is not yet defined other than "scmutil.opener" class,
      because it should not be used via other opener classes yet.
      be016e96
    • Katsunori FUJIWARA's avatar
      localrepo: use "vfs" intead of "opener" while ensuring repository directory · 22b9b1d2
      Katsunori FUJIWARA authored
      As a part of migration to vfs, this patch uses "self.vfs" instead of
      "self.opener", while ensuring repository directory in the constructor
      of "localrepository" class.
      22b9b1d2
    • Katsunori FUJIWARA's avatar
      localrepo: use the path relative to "self.vfs" instead of "path" argument · 36a30168
      Katsunori FUJIWARA authored
      As a part of migration to vfs, this patch uses "self.root", which can
      be recognized as the path relative to "self.vfs", instead of "path"
      argument.
      
      This fix allows to make invocations of "util.makedirs()" and
      "os.path.exists()" while ensuring repository directory in
      "localrepository.__init__()" ones indirectly via vfs.
      
      But this fix also raises issue 2528: "hg clone" with empty destination.
      
      "path" argument is empty in many cases, so this issue can't be fixed
      in the view of "localrepository.__init__()".
      
      Before this patch, it is fixed by empty-ness check ("not name") of
      exception handler in "util.makedirs()".
      
          try:
              os.mkdir(name)
          except OSError, err:
              if err.errno == errno.EEXIST:
                  return
              if err.errno != errno.ENOENT or not name:
                  raise
      
      This requires "localrepository.__init__()" to invoke "util.makedirs()"
      with "path" instead of "self.root", because empty "path" is treated as
      "current directory" and "self.root" becomes valid path.
      
      But "hg clone" with empty destination can be detected also in
      "hg.clone()" before "localrepository.__init__()" invocation, so this
      patch re-fixes issue2528 by checking it in "hg.clone()".
      36a30168
    • Katsunori FUJIWARA's avatar
      localrepo: use "self.wvfs.join()" instead of "os.path.join()" · 60338880
      Katsunori FUJIWARA authored
      As a part of migration to vfs, this patch uses "self.wvfs.join()"
      instead of "os.path.join()", while initialization of fields in the
      constructor of "localrepository" class.
      60338880
    • Katsunori FUJIWARA's avatar
      localrepo: use path expansion API via vfs · 87e84409
      Katsunori FUJIWARA authored
      As a part of migration to vfs, this patch moves path expansion API
      invocations in the constructor of "localrepository" to the constructor
      of "opener", because the root path to the repository is very important
      to handle paths using non-ASCII characters correctly.
      
      This patch also rearrange initialization order of "wvfs" field,
      because it is required to initialize "self.root".
      87e84409
    • Katsunori FUJIWARA's avatar
      localrepo: add "vfs" fields to "localrepository" for migration from "opener" · 70343650
      Katsunori FUJIWARA authored
      As a part of migration to vfs, this patch adds "vfs" fields to
      "localrepository" class.
      
      This allows new codes to access current "opener" objects related to
      repositories via "vfs" fields, so patches referring to "vfs" will
      replace referring to "opener" in time.
      
      This patch also adds initializations for "vfs" fields to
      "statichttprepository" class derived from it, because its constructor
      doesn't invoke the constructor of "localrepository", so "vfs" fields
      should be initialized explicitly as same as "opener" fields: it has no
      working directory, so "wvfs" field is not added.
      70343650
  9. Jul 13, 2012
  10. Jun 25, 2012
  11. Jun 27, 2012
    • Katsunori FUJIWARA's avatar
      mq: check subrepo synchronizations against parent of workdir or other appropriate context · 54da604f
      Katsunori FUJIWARA authored
      Before this patch, MQ checks each subrepo synchronizations against the
      working directory context, so ".hgsubstate" updating is not imported
      into MQ revision correctly in cases below:
      
        - qrefresh when current ".hgsubstate" is already synchronized with
          each subrepos: you can reproduce this easily by just twice or more
          qrefresh invocations
      
        - qnew just after rollback of commit which updates ".hgsubstate"
      
      This patch resolves this by checking subrepo states against:
      
        - the parent of "qtop" for qrefresh, or
        - the parent of working context otherwise
      54da604f
    • Katsunori FUJIWARA's avatar
      mq: create patch file after commit to import diff of ".hgsubstate" at qrefresh · f287d4a6
      Katsunori FUJIWARA authored
      Even though the committed revision contains diff of ".hgsubstate", the
      patch file created by qrefresh doesn't contain it, because:
      
        - ".hgsubstate" is not listed up as one of target files of the patch
          for reasons below, so diff of ".hgsubstate" is not imported into
          patch file
      
            - status of ".hgsubstate" in working directory is usually "clean"
            - ".hgsubstate" is not specified explicitly by users
      
        - the patch file is created before commit processing which updates
          or creates ".hgsubstate" automatically, so there is no diff for it
          at that time
      
      This patch resolves this problem by:
      
        - putting ".hgsubstate" into target list of the patch, if needed:
          this allows "patch.diff()" to import diff of ".hgsubstate" into
          patch file.
      
        - creating the patch file after commit processing:
          this updates ".hgsubstate" before "patch.diff()" invocation.
      
      For the former fixing, this patch introduces "putsubstate2changes()"
      to share same implementation with qnew. This is invoked only once per
      qnew/qrefresh at most, so there is less performance impact.
      
      This patch also omits "match" argument for "patch.diff()" invocation,
      because "patch.diff()" ignores "match" if "changes" is specified.
      f287d4a6
    • Katsunori FUJIWARA's avatar
      mq: add ".hgsubstate" to patch target list only if it is not listed up yet · 986df524
      Katsunori FUJIWARA authored
      If ".hgsubstate" is already listed up as one of commit targets, qnew
      put diff of ".hgsubstate" twice into the patch file stored under
      ".hg/patches".
      
      It causes rejections at applying such patches.
      
      Other than the case like in added test script, this can also occur
      when qnew is executed just after rolling back the committing updated
      ".hgsubstate".
      
      This patch checks whether ".hgsubstate" is already listed up as one of
      commit targets, and put it into the appropriate list only if it is not
      listed up yet.
      986df524
  12. Jul 12, 2012
  13. Jul 09, 2012
  14. Jul 06, 2012
  15. Jul 10, 2012
  16. Jul 12, 2012
  17. Jul 10, 2012
  18. Jul 11, 2012
    • Adrian Buehlmann's avatar
      rollback: move examples and --force note in help into verbose section · 3e66d00b
      Adrian Buehlmann authored
      Plain 'hg help rollback' now looks like this:
      
        $ hg help rollback
        hg rollback
      
        roll back the last transaction (dangerous)
      
            This command should be used with care. There is only one level of
            rollback, and there is no way to undo a rollback. It will also restore
            the dirstate at the time of the last transaction, losing any dirstate
            changes since that time. This command does not alter the working
            directory.
      
            Transactions are used to encapsulate the effects of all commands that
            create new changesets or propagate existing changesets into a repository.
      
            This command is not intended for use on public repositories. Once changes
            are visible for pull by other users, rolling a transaction back locally
            is ineffective (someone else may already have pulled the changes).
            Furthermore, a race is possible with readers of the repository; for
            example an in-progress pull from the repository may fail if a rollback is
            performed.
      
            Returns 0 on success, 1 if no rollback data is available.
      
        options:
      
         -n --dry-run do not perform actions, just print output
         -f --force   ignore safety measures
            --mq      operate on patch repository
      
        use "hg -v help rollback" to show more info
      3e66d00b
    • Adrian Buehlmann's avatar
  19. Jul 12, 2012
  20. Jul 11, 2012
  21. Jul 06, 2012
Loading